From nobody Sat Dec 18 03:02:00 2021 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 C520E18E1F75 for ; Sat, 18 Dec 2021 03:02:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JG9cm34n0z3FSL for ; Sat, 18 Dec 2021 03:02:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639796529; bh=CJYB8LeDaJdjSyCe/6hO4l6Rkfl1RNygZ1+00Pn9B6c=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Y1AKqCZoLkE4/0OL4b+IM6uyd8R/MoZ365H+bG/NKAd5osoEa+VUp25Z5COcRbtxH65q19Kl6ymsPegHftHL1fVyAMR8bJERMnXc0H2BVCEDHzSOOn6mMcBmqJB0kjJeyhnt//S6+Ykqrx+XJvg2kYu7WXEJj4YGEOToQyiL8titNOGpDG/QrBf515nSDH+fc3TMc1ol/AU6eTI9sG13cKPo0RumzRKH0w7pC8ZB9A7vF8cjyqjdkkteha3fE+YpfykNUwEcNQFSASFf19G7lRodIaqj0zLw/DHt/f4GFYFVqABaZXHA2ANZhNsKzuF7GB4DfNl8bxcVzORZ+6ZXMA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639796529; bh=+28t0Vn15Dq96tf9fbMP1yh1GhRwwfnRHEZzZh/iLbw=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=XjOYZ2aG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RRl39NS3WRqdsm O.ZEG6L4VbvHLs2j.WAHSodXEp.L1vO2RB0nfs.nNjQ1T86NBr_08G2x2h28jPnWkfv7G3LVfjBh 3tnkCD8wFEVne_ELSxGrqhSNPiBDSxH38ry6EqjAmwjo0sCTcGyyjhKhb4._g.9qZqf9TSV7ONos TkZTtsfTzoVI3DzbEKkRavcfbXlR7XKRPoW9H2wAeJdqlTivFVpm8jND1NHDjfYs.Ed00npnhgds sICQrr6LvMD_fxDJzUtngadA_.onZ8vf2aIyJUkSPpnXCzAcbPhofPtAxOWvtd4X1K8Gq9JALOx0 ZKHGlvQgmYh5rU66X9bDl8ldgXxWVtSoYqTpgrZLUdj3wK1mABPIWDHD9aXBXErdsuoLOJDhvQ1R NfVfgVAwIX8mXHu.c2j7xm_tMH2NKZaj42MP9DbMx2EZvkUTRAHf2u4b0SWaChI_cQG60Rkbr7bg BIX0a.2sjxMLUBm6NLce2_hevNeJtkHe3gA8vPN50jTlJMw-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sat, 18 Dec 2021 03:02:09 +0000 Received: by kubenode531.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID cf8276c701630664d3eaa808317f0cb5; Sat, 18 Dec 2021 03:02:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 14.0 \(3654.120.0.1.13\)) Subject: Re: Saving environment variables in u-boot In-Reply-To: <20211218005946.GA7670@www.zefox.net> Date: Fri, 17 Dec 2021 19:02:00 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5C44D0E6-2FF1-4EEB-B21A-83333D6FCF46@yahoo.com> References: <20211216180704.GA4173@www.zefox.net> <214132DD-A095-4349-BB81-B79CB8CF6B0C@yahoo.com> <20211217013613.GA4452@www.zefox.net> <20211218005946.GA7670@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4JG9cm34n0z3FSL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-arm X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N On 2021-Dec-17, at 16:59, bob prohaska wrote: > On Thu, Dec 16, 2021 at 11:00:46PM -0800, Mark Millard wrote: >> On 2021-Dec-16, at 17:36, bob prohaska wrote: >>=20 >>>=20 >>> Yes, the microSD contains a dd of=20 >>> FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img >>> The DOS partition is writeable, AFAIK. >>=20 >> Hmm. That means there is also a UFS root with >> a kernel and world on the microsd card. Both >> the microsd card and the USB drive contain >> contain such, as well as each having an >> /etc/fstab (and so on). >>=20 >> Having multiple such makes for a mess for >> controlling which is used (and knowing which >> is used). What is the first stage that you >> made sure the USB drive was in use and how >> did you make sure? >>=20 >=20 > I installed a microSD containing only the FAT slice from=20 > FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img, the FreeBSD > slice being deleted using gpart. There is a timeout file. Ultimately, you may need to publish a full capture of the debug output that goes to the serial console when such debug output has been fully enabled. This could end up being for each of several variations tried. Did you still have the MSDOSFS material on the USB in a viable form as well? https://www.raspberrypi.com/documentation/computers/config_txt.html reports that there are boot options that can go in config.txt : bootcode_delay boot_delay boot_delay_ms Quoting . . . QUOTE bootcode_delay The bootcode_delay command delays for a given number of seconds in = bootcode.bin before loading start.elf: the default value is 0. END QUOTE QUOTE boot_delay The boot_delay command instructs to wait for a given number of seconds = in start.elf before loading the kernel: the default value is 1. The = total delay in milliseconds is calculated as (1000 x boot_delay) + = boot_delay_ms. This can be useful if your SD card needs a while to get = ready before Linux is able to boot from it. boot_delay_ms The boot_delay_ms command means wait for a given number of milliseconds = in start.elf, together with boot_delay, before loading the kernel. The = default value is 0. END QUOTE (So boot_delay_ms is only for smaller scale adjustments and can be ignored here.) Here "loading the kernel" means what config.txt was told was the kernel: some *u-boot*.bin for the FreeBSD context. So one experiment is to have only bootcode.bin and a config.txt on the microsd card's MSDOSFS, specifying a significantly large value for bootcode_delay . The hope would be to be able to get the start*.elf file and the rest from the USB drive. If that does not work, then the next is to have the RPi* firmware only on the microsd card's MSDOSFS and have config.txt also specify a significantly large value for boot_delay . This first variation would not have a *u-boot*.bin or the FreeBSD loader on the microsd card's MSDOSFS but only on the USB drive's MSDOSFS. If that does not work, then the next variation moves just the *u-boot*.bin file to the microsd card. (If that fails then controlling U-Boot's delays can be involved. For now I only list the path of leaving U-Boot's delays as they are: one short branch of the exploration.) If that does not work, then the next variation moves just the FreeBSD loader file to the microsd card. With that I'll stop listing things to test, pending results on what I've listed. > A hands-off warm boot reports > resetting system ...=20 >=20 > U-Boot 2020.10 (Apr 09 2021 - 03:55:54 +0000) >=20 > DRAM: 948 MiB > RPI 3 Model B (0xa02082) > MMC: mmc@7e300000: 0 > Loading Environment from FAT... In: serial > Out: vidconsole > Err: vidconsole > Net: No ethernet found. > starting USB... > Bus usb@7e980000: USB DWC2 > scanning bus usb@7e980000 for devices... 5 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found I would need to also see the RPi* firmware's prior debug output to be able to interpret this. I can not tell for sure which device's U-Boot copy is operating for the above. I'd guess that is the the micrsd card's MSDOSFS one. > Hit any key to stop autoboot: 0=20 > switch to partitions #0, OK > mmc0 is current device > Scanning mmc 0:1... This looks to be getting a copy of the FreeBSD loader from the microsd card's MSDOSFS. The FreeBSD loader will only see the same Storage Devices that U-Boot did: it gets the information from U-Boot. > Found EFI removable media binary efi/boot/bootaa64.efi There was a FreeBSD loader in the microsd card's MSDOSFS. > libfdt fdt_check_header(): FDT_ERR_BADMAGIC > Scanning disk mmc@7e300000.blk... > Found 2 disks > No EFI system partition > BootOrder not defined > EFI boot manager: Cannot load any image > 1259212 bytes read in 125 ms (9.6 MiB/s) > libfdt fdt_check_header(): FDT_ERR_BADMAGIC > Booting /efi\boot\bootaa64.efi That FreeBSD loader is what it is using, not one from the USB drive. > [whitespace deleted] > Consoles: EFI console =20 > Reading loader env vars from /efi/freebsd/loader.env > Setting currdev to disk0p1: "disk0p1" is U-Boot terminology for a drive, despite this being the FreeBSD loader's output. The FreeBSD loader uses the U-Boot information, not FreeBSD's information. > FreeBSD/arm64 EFI loader, Revision 1.1 >=20 > Command line arguments: loader.efi > Image base: 0x39e03000 > EFI version: 2.80 > EFI Firmware: Das U-Boot (rev 8224.4096) > Console: comconsole (0) > Load Path: /efi\boot\bootaa64.efi > Load Device: = /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,0x01,0,0x81f= ,0x18fa8) > Trying ESP: = /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,0x01,0,0x81f= ,0x18fa8) This is reporting where the FreeBSD loader was found. It indicates that disk0p1 was the microsd card's MSDOSFS. > Setting currdev to disk0p1: The microsd card's MSDOSFS again. > ERROR: cannot open /boot/lua/loader.lua: no such file or directory. There is no FreeBSD directory-tree there to find things like /boot/lua/loader.lua in. Currently we are trying to have the /boot/lua/loader.lua come from the USB drive's UFS file system, not the microsd card. > Type '?' for a list of commands, 'help' for more detailed help. > OK=20 >=20 > AIUI, disk0p1 is the microSD, which has no /boot/lua/loader.lua > That makes sense. If u-boot finds the USB mass storage device > then running=20 > run bootcmd_usb0 starts the system successfully. >=20 > It does appear that the FAT partition on the USB disk is involved. I see no evidence of that above. (Below is a different context.) > If I hide the contents of da0s1 by placing them in a subdirectory > the boot fails, even if u-boot has found the USB disk: >=20 > Hit any key to stop autoboot: 0=20 > U-Boot> usb reset > resetting USB... > Bus usb@7e980000: USB DWC2 > scanning bus usb@7e980000 for devices... 6 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found >=20 > [Note that the six devices include the disk, it can be seen in usb = tree. > For some reason it isn't recognized as a mass storage device.] >=20 > U-Boot> editenv usb_pgood_delay > edit: 2 > U-Boot> usb reset > resetting USB... > Bus usb@7e980000: USB DWC2 > scanning bus usb@7e980000 for devices... 6 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found > U-Boot> run bootcmd_usb0 >=20 > Device 0: Vendor: SABRENT Rev: 1214 Prod:=20 > Type: Hard Disk > Capacity: 953869.7 MB =3D 931.5 GB (1953525168 x 512) > ... is now current device > Scanning usb 0:1... > U-Boot>=20 > and there it stops. Looks like both FAT partitions have a role to = play. That is not clear to me. But I'd rather be lookning into earlier stages at this point, so that "1 Storage Device(s) found" hopefully ends up being automatic. If we get that to be automatic, then what is happening here becomes the next area to investigate. But the investigation is not far enough along to justify investigating this now. > An earlier experiment tried booting the microSD card in a USB adapter, > That worked correctly with nothing in the microSD slot, so the = internal > "boot from USB" feature might work if it could be slowed down = sufficiently.=20 Agreed, that the first thing is to get it to start up the disk and wait for it. There may be more at issue after that. >> The order of activity is: >>=20 >> MSDOSFS: (all on one of: microsd card vs. usb drive) >> RPi* firmware (I do not report the file-level sequencing) >> U-Boot >> FreeBSD loader (which uses information from U-Boot) >>=20 >> UFS: (both: together on one of: microsd card vs. usb drive) >> FreeBSD kernel >> FreeBSD world >>=20 >> (I do not specify which MSDOSFS is used when >> there are multiple viable ones in separate places. >> Similarly for UFS.) >>=20 > =46rom the experiment today it seems both are required. I do not get such an interpretation from your experiment. Until "1 Storage Device(s) found" happens automatically the context is not nicely comparable for the later stages. > The first discovers the USB disk, the second uses that > information to proceed further.=20 >=20 >>=20 >> (It is technically possible to have kernel vs. >> world in separate UFS partitions, possibly on >> separate media. I've an example context that I >> deal with that way to avoid a U-boot limitation >> for the device: the kernel can find the world >> where the U-Boot/FreeBSD-Loader can not. (The >> FreeBSD loader depends on what USB can find: it >> does not look elsewhere.) I only mention this >> in case I need to reference it in the future, >> avoiding a surprise in such a case. Otherwise >> ignore the complication.) >>=20 >=20 > Are you referring to a case where the root is on > microSD but /usr and friends is on a USB device?=20 Again: I suggest ignoring the details of this for now. It would just confuse things. But if you insist: On the Rock64 I have a e.MMC in use instead of a microsd card, and in the end the world is on a USB3 SSD. But the U-Boot involved can not access the USB3 --os neither can the FreeBSD loader. The FreeBSD kernel is the first stage that can access USB3. The e.MMC has the MSDOSFS. It has an partial copy of what would normally be some of the USB3 drive's content. (I named the mount point microsd_ufs before I switched to the e.MMC .) It has only (much hidden in ". . ."s). # find /microsd_ufs -print | sort | less /microsd_ufs /microsd_ufs/.snap /microsd_ufs/COPYRIGHT /microsd_ufs/boot /microsd_ufs/boot/beastie.4th /microsd_ufs/boot/boot1.efi /microsd_ufs/boot/brand-fbsd.4th /microsd_ufs/boot/brand.4th /microsd_ufs/boot/check-password.4th /microsd_ufs/boot/color.4th /microsd_ufs/boot/copy_boot_to_microsd.sh /microsd_ufs/boot/defaults /microsd_ufs/boot/defaults/loader.conf /microsd_ufs/boot/delay.4th /microsd_ufs/boot/dtb . . . /microsd_ufs/boot/kernel /microsd_ufs/boot/kernel/accf_data.ko /microsd_ufs/boot/kernel/accf_dns.ko . . . /microsd_ufs/boot/kernel/kernel . . . /microsd_ufs/boot/loader.4th /microsd_ufs/boot/loader.conf /microsd_ufs/boot/loader.conf.d /microsd_ufs/boot/loader.efi /microsd_ufs/boot/loader.help /microsd_ufs/boot/loader.rc /microsd_ufs/boot/loader_4th.efi /microsd_ufs/boot/loader_lua.efi /microsd_ufs/boot/loader_simp.efi /microsd_ufs/boot/logo-beastie.4th /microsd_ufs/boot/logo-beastiebw.4th /microsd_ufs/boot/logo-fbsdbw.4th /microsd_ufs/boot/logo-orb.4th /microsd_ufs/boot/logo-orbbw.4th /microsd_ufs/boot/lua /microsd_ufs/boot/lua/cli.lua /microsd_ufs/boot/lua/color.lua /microsd_ufs/boot/lua/config.lua /microsd_ufs/boot/lua/core.lua /microsd_ufs/boot/lua/drawer.lua /microsd_ufs/boot/lua/gfx-beastie.lua /microsd_ufs/boot/lua/gfx-beastiebw.lua /microsd_ufs/boot/lua/gfx-fbsdbw.lua /microsd_ufs/boot/lua/gfx-orb.lua /microsd_ufs/boot/lua/gfx-orbbw.lua /microsd_ufs/boot/lua/hook.lua /microsd_ufs/boot/lua/loader.lua /microsd_ufs/boot/lua/menu.lua /microsd_ufs/boot/lua/password.lua /microsd_ufs/boot/lua/screen.lua /microsd_ufs/boot/menu-commands.4th /microsd_ufs/boot/menu.4th /microsd_ufs/boot/menu.rc /microsd_ufs/boot/menusets.4th /microsd_ufs/boot/modules /microsd_ufs/boot/screen.4th /microsd_ufs/boot/shortcuts.4th /microsd_ufs/boot/support.4th /microsd_ufs/boot/uboot /microsd_ufs/boot/version.4th /microsd_ufs/boot/zfs /microsd_ufs/etc /microsd_ufs/etc/hostid /microsd_ufs/lost+found Almost no world content. /microsd_ufs/boot/loader.conf has (in part): vfs.root.mountfrom=3D"ufs:/dev/gpt/Rock64root" kern.cam.boot_delay=3D10000 vfs.mountroot.timeout=3D10 vfs.root_mount_always_wait=3D1 That vfs.root.mountfrom notation redirects to the USB3 drive for world but the /boot/loader.conf and /boot/kernel/kernel and /etc/hostid were first loaded from the e.MMC media, not the USB drive. As I have it, the USB3 drive also has a copy of the same /boot/... and such materials and load module activity is from the USB3 copy. I have to keep the two places tracking so nothing ends up mismatching. >> You might move (not copy) the MSDOSFS material >> between the microsd card and the usb drive during >> experiments, avoiding having duplications. There >> is the possibility of instead renaming things so >> files are not found on a partition, for example. >> A similar point goes for UFS materials: avoid >> having multiple viable-for-booting UFS file >> systems present. >>=20 >> As stands, things seem too hard to track for me >> to be of much help. Please make things obvious for >> what was in use by making the material uniquely >> placed (for the form that can be used). >>=20 > I believe the experiment above (deleting UFS on microSD,=20 > hiding the DOS files on USB) has been an equivalent=20 > configuration. It looks like control passes in some way=20 > between the DOS slices, though how is unclear. I do not agree to that specific interpretation of the sequence you did (on the evidence currently available). Until "1 Storage Device(s) found" is automatic this later-stage material is too late to yet be relevant or to have an appropriate context. I'm staying focused on getting the "1 Storage Device(s) found" to be automatic. Absent that you are likely stuck with doing something similar to be Rock64 e.MMC way of working --where /boot/loader.conf and /boot/kernel/kernel and /etc/hostid for early activity is from a UFS partition on the microsd card. >> Separate issues/questions: >>=20 >> Do you have the file "timeout" in the MSDOSFS, in >> addition to config.txt and the like? If not, I >> recommend including it. >>=20 > Yes, it's been tried on both microSD and USB devices.=20 > Seems like the only one that can matter is on microSD. >=20 >=20 >> What other RPi* firmware controls for having >> various deliberate RPi* firmware delays do you >> have set up? >>=20 >=20 > The Raspberry Pi config.txt description lists several delay commands > that can be placed in config.txt. None seem related to USB discovery, > might any come into play early enough to be useful? They're named > bootcode_delay > boot_delay > boot_delay_ms >=20 > I tried them casually and didn't notice much change. Are they worth > revisiting more carefully?=20 See my earlier notes. >> It is not so much that these would be sufficient, >> but they do establish some context before U-Boot >> is even active. It could be important to >> understand that context. (Unsure at this point.) >>=20 >>=20 >>>> But that was for the u-boot-rpi4 or u-boot-rpi-arm64 ports. >>>> (They also later mentioned using "usb_pgood_delay=3D2000\0" >>>> instead, a figure they found in a bunch of configrations.) >>>>=20 >>> The Pi3 in question is capable of booting from solid-state USB >>> storage without any microSD card, but fails to detect a mechanical >>> disk. Which is the appropriate u-boot-rpi3 port to tamper with? I=20 >>> tried sysutils/u-boot-rpi3 as an upgrade but that simply froze.=20 >>> The u-boot from FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img finds >>> the USB mechanical disk, but erratically.=20 >>=20 >> FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img uses u-boot-rpi-arm64 >> as I remember: it is set up for both the RPI3 and RPI4. Given that >> it works some, that would be the U-Boot port I would experiment >> with if I was doing the experiments. >>=20 >>>> So something somewhat analogous might help if you are willing >>>> to build and use your own u-boot port variant. >>>=20 >>> Obviously, that's a fraught enterprise at my skill level.... >>> I'm still somewhat hazy on the actual boot sequence when >>> chaining from microSD to USB.=20 >>=20 >> Having the extra text in the U-Boot build does not really >> depend on the chaining order question. >>=20 >> But, to repeat (sticking to the simpler context), >> the order is: >>=20 >> MSDOSFS: (all on one of: microsd card vs. usb drive) >> RPi* firmware (I do not report the file-level sequencing) >> U-Boot >> FreeBSD loader (which uses information from U-Boot) >>=20 >> UFS: (both: together on one of: microsd card vs. usb drive) >> FreeBSD kernel >> FreeBSD world >>=20 >>=20 >>> Indeed, it's unclear how or if u-boot plays a role in starting=20 >>> RasPiOS. The term u-boot isn't found on the Raspberry Pi doc=20 >>> website, and the Pi isn't mentioned in the Denx manuals. Those >>> discoveries surprised me. >>=20 >> RaspiOS and RaspiOS64 do not use U-boot. The RPi*'s can boot some >> forms of a linux kernel directly and that is what RaspiOS and >> RaspiOS64 are doing.=20 >=20 > That clears up a major misunderstanding, thank you! >=20 >> That is why the config.txt type of content >> makes no mention of u-boot or of any kernel=3D assignment in RaspiOS >> and RaspiOS64. By contrast, config.txt for FreeBSD lists kernel=3D >> and an explicit *u-boot*.bin as the value. >=20 > Without thinking about it very carefully I tried to use the > "bootcode.bin-only" method for booting an older Pi2 from a > usb hard disk, as described in > = https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#spec= ial-bootcode-bin-only-boot-mode > It worked on the Pi2 but failed on the Pi3, causing an immediate hang. This gets back into the use of a config.txt with a bootcode_delay assignment also being in the MSDOSFS on the microsd card and the file timeout also being in the MSDOSFS on the microsd card. Only if those delays together can lead to the USB drive being accessible will it get any farther. I'd suggest such experiments. The vintage of bootcode.bin matters as I understand. > Might that avenue be worth pursuing? In hindsight, that it worked on a > Pi2 is quite surprising. =20 >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com