From nobody Tue Jan 16 09:30:45 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TDkJz18sxz57FwH for ; Tue, 16 Jan 2024 09:30:59 +0000 (UTC) (envelope-from andrew.hankinson@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TDkJy3tpGz4Z5f for ; Tue, 16 Jan 2024 09:30:58 +0000 (UTC) (envelope-from andrew.hankinson@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5534dcfdd61so16979568a12.0 for ; Tue, 16 Jan 2024 01:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705397457; x=1706002257; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qpxvbQ6+Hm7igHkJGPCdoaiOqydclNx4dHag7R2yZjg=; b=c24Jel7/EyA36N4xvNkXdMZ+QOVaki2QoB9KtUOvlN41V4Cubi0lbED7SCglU5MLVG tSDNLiZjznQKTxtDSoL8IpoRIP6jW7hUeUDSIDdEgOu+SwBs5qD/xAmt0Lsjmt6a2+Rp sF2vlm+DcduyM72HiOmmrvI9hiyYpP++b6MDWWTCtTOIR1WCURbdp2VeyOQaNKiZnU7y p6Z7tj4Zm7XJgZCjygSnVLP9tfHmMFNAAmbkJpejSU1mmAGssk3CnRl+UYBIod3tKXXI AbL+Pc6Yb5F18YwNZVbePQWtv0AN5XrFKt0apB9ApgZq4FjaK3sA94pO2iaIiZcrx6We 2R5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705397457; x=1706002257; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qpxvbQ6+Hm7igHkJGPCdoaiOqydclNx4dHag7R2yZjg=; b=n3tcorCydM6Bm0pOeoc3dH/E8YucR0upITjkCo+6ejqT9z++civO+fifxPORUH322y SqExLPZBlMREgcKYx5zFauOvGcIezEs1SZYIByLdArb6V9bXYgjcmzSHScd2zgU6NxXx J2lCBTXFdCZL5KEnljktETCv/War5FR5rSkVWy7CYGWrMbag4PWvkyThWQroNEP7qLzA ikiAqoYGKGcghDGyBkUqLyz/4FWTdVxaCJc3lMqBn2hA0EavaQM/njiW9rGmkoBrhRIA s93MuaBjhY1A5EiCr0N8WY/CFmtjXLVz9wYtUyxOTdkTf1xp2EGyL1wYpWlJaptIS5gc u1aw== X-Gm-Message-State: AOJu0YwZHG3GQKDYDWr/I7Y8Ev9G8m+Bvz4kP3SToZyDRHJQMnIsXVZF v/KKwvLreXpvEjwRiim24v6jYxvBI04= X-Google-Smtp-Source: AGHT+IG297xYiIKfLTb8PeC5IFU7SmXeTKc7LtuuB5n29IflVooNqEAMXpbX2hk4DNU+2KQdErYFZA== X-Received: by 2002:a05:6402:354b:b0:559:ae87:3b3f with SMTP id f11-20020a056402354b00b00559ae873b3fmr467153edd.28.1705397457038; Tue, 16 Jan 2024 01:30:57 -0800 (PST) Received: from smtpclient.apple ([178.197.206.108]) by smtp.gmail.com with ESMTPSA id n13-20020a05640204cd00b0055971af7a23sm1264786edw.95.2024.01.16.01.30.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2024 01:30:56 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.100.2.1.4\)) Subject: Re: Nanobsd for RPI4 From: Andrew Hankinson In-Reply-To: <3c3c23dc-dd28-4c0c-984e-7654e115c1e2@madpilot.net> Date: Tue, 16 Jan 2024 10:30:45 +0100 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <53E50A6F-11A4-40D8-B71F-D742FBC06D29@gmail.com> References: <3c3c23dc-dd28-4c0c-984e-7654e115c1e2@madpilot.net> To: Guido Falsi X-Mailer: Apple Mail (2.3774.100.2.1.4) X-Rspamd-Queue-Id: 4TDkJy3tpGz4Z5f X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] > On 16 Jan 2024, at 10:03, Guido Falsi wrote: >=20 > On 16/01/24 09:52, Andrew Hankinson wrote: >> Hello, >> I saw a recent posting to this list about nanobsd for RPI3: >> Re: Nanobsd builds for rpi3 out of embedded blow up during build = >> lists.freebsd.org = >> favicon.ico = >> = >> I just wanted to chime in to say I am seeing the exact same thing for = a RPI4 build with both 14.0 release and 15.0 current. I asked about it = on the forums, but there didn=E2=80=99t seem to be any solution. >> Has anyone here managed to get a nanobsd build working? >=20 > I am using nanobsd with RPi3. Never tried RPi4. I did some = customization to the nanobsd scripts and configuration to get it working = though. >=20 > Last time I rebuilt my image was in mid december. I'm going to build a = new image in the next pair of weeks. >=20 > Is the problem limited to the boot code? I haven't been able to get past the boot code bit, but up until this = point it works OK. I've simply copied the RPI3.cfg file and changed a = few variables. My build stops with the following logs: # cat /usr/embedded/rpi4/_.cust.dos_boot_part + dos_boot_part + local 'd=3D/usr/local/share/u-boot/u-boot-rpi4' + local 'f=3D/usr/embedded/rpi4/_.fat' + rm -rf /usr/embedded/rpi4/_.fat + mkdir /usr/embedded/rpi4/_.fat + chdir /usr/embedded/rpi4/_.fat + cp /usr/local/share/u-boot/u-boot-rpi4/README = /usr/local/share/u-boot/u-boot-rpi4/metadata = /usr/local/share/u-boot/u-boot-rpi4/u-boot.bin . + touch uEnv.txt + cp '/usr/embedded/rpi4/_.w/boot/dtb/*.dtb' . cp: /usr/embedded/rpi4/_.w/boot/dtb/*.dtb: No such file or directory This seems to be a problem with the dos_boot_part() function in = /usr/src/tools/tools/nanobsd/embedded/common.=20 Your code seems to bypass this and uses the rpi-firmware package .dtbo = files.=20 So I guess my questions are: 1. What changed that the .dtb files are no longer created in the regular = build? 2. Should the dos_boot_part() function be changed to take the files from = the rpi-firmware pkg instead? Not being familiar with the nanobsd building process, I'm not really = sure what is the best way to go. >=20 > I have this code to create that partition: >=20 > populate_boot_part ( ) ( > MNT=3D$1 >=20 > UBOOT_DIR=3D"/usr/local/share/u-boot/${NANO_BOOT_PKG}" > FIRMW_DIR=3D"/usr/local/share/rpi-firmware" > FIRMO_DIR=3D"${FIRMW_DIR}/overlays" >=20 > # Required files > UBOOT_FILES=3D"README u-boot.bin" > DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > OVERLAYS=3D"mmc.dtbo pwm.dtbo disable-bt.dtbo" > DTB_FILES=3D"armstub8.bin armstub8-gic.bin bootcode.bin = fixup_cd.dat \ > fixup_db.dat fixup_x.dat fixup.dat LICENCE.broadcom \ > start_cd.elf start_db.elf start_x.elf start.elf \ > fixup4.dat fixup4cd.dat fixup4db.dat fixup4x.dat start4.elf \ > start4cd.elf start4db.elf start4x.elf ${DTB}" >=20 > for _F in ${UBOOT_FILES}; do > cp ${UBOOT_DIR}/${_F} ${MNT}/${_F} > done > for _F in ${DTB_FILES}; do > cp ${FIRMW_DIR}/${_F} ${MNT}/${_F} > done > cp -p ${FIRMW_DIR}/config_arm64.txt ${MNT}/config.txt > mkdir -p ${MNT}/overlays > for _F in ${OVERLAYS}; do > cp -p ${FIRMO_DIR}/${_F} ${MNT}/overlays/${_F} > done >=20 > mkdir -p ${MNT}/EFI/BOOT > cp -p ${NANO_WORLDDIR}/boot/loader_lua.efi \ > ${MNT}/EFI/BOOT/bootaa64.efi >=20 > cp -R ${NANO_WORLDDIR}/boot/dtb ${MNT} >=20 > # tell loader what partition to startup from > mkdir -p ${MNT}/EFI/freebsd > echo "rootdev=3Ddisk0s3a" >${MNT}/EFI/freebsd/loader.env > ) >=20 > Hope this helps. >=20 > --=20 > Guido Falsi >=20