Dear misc, I am trying to figure out how the U-Boot gets updated on my BeagleBone Black (and other uboot machines).
While booting, the machine says (full dmesg below): U-Boot SPL 2021.10 (Apr 20 2024 - 17:53:20 -0600) Trying to boot from MMC1 U-Boot 2021.10 (Apr 20 2024 - 17:53:20 -0600) CPU : AM335X-GP rev 2.0 Model: TI AM335x BeagleBone Black The machine runs off a SD card (the inner mmc is broken). There is an MSDOS 'i' partition, which holds this: total 3976 -rw-r--r-- 1 root wheel 108112 Jan 14 13:36 MLO -rw-r--r-- 1 root wheel 67020 Jan 14 13:36 am335x-bone.dtb -rw-r--r-- 1 root wheel 70207 Jan 14 13:36 am335x-boneblack-wireless.dtb -rw-r--r-- 1 root wheel 70482 Jan 14 13:36 am335x-boneblack.dtb -rw-r--r-- 1 root wheel 69207 Jan 14 13:36 am335x-boneblue.dtb -rw-r--r-- 1 root wheel 68601 Jan 14 13:36 am335x-bonegreen-wireless.dtb -rw-r--r-- 1 root wheel 67248 Jan 14 13:36 am335x-bonegreen.dtb -rw-r--r-- 1 root wheel 72868 Jan 14 13:36 am335x-evm.dtb -rw-r--r-- 1 root wheel 71662 Jan 14 13:36 am335x-evmsk.dtb -rw-r--r-- 1 root wheel 68669 Jan 14 13:36 am335x-icev2.dtb -rw-r--r-- 1 root wheel 68577 Jan 14 13:36 am335x-pocketbeagle.dtb drwxr-xr-x 1 root wheel 2048 Jan 14 13:36 efi -rw-r--r-- 1 root wheel 1221056 Jan 14 13:36 u-boot.img I suppose that is what gets used when the machine boots. The partition was created and populated by the installer. Now, there is the sysutils/u-boot port (subpackage arm seems the one relevant here), currently at version u-boot-arm-2021.10p9. Guessing by the name and "U-Boot SPL 2021.10 (Apr 20 2024 - 17:53:20 -0600)", does that mean that the 2021.10 version of the uboot is the latest that the port holds? (The port itself was last updated in April 2024.) The amd64 package has these files, among others (there doesn't seem to be an armv7 package of u-boot, that's why I am looking at the amd64 package): $ cd /usr/local/share/u-boot/am335x_evm/ $ ls -l -rw-r--r-- 1 root bin 108112 Jan 25 08:42 MLO -rw-r--r-- 1 root bin 1221056 Jan 25 08:42 u-boot.img $ cksum * 809009931 108112 MLO 1142329276 1221056 u-boot.img These are of the same size, but not the same content, as the files actualy present on the BBB's SD partition: $ ls -l MLO u-boot.img -rw-r--r-- 1 root wheel 108112 Jan 14 13:36 MLO -rw-r--r-- 1 root wheel 1221056 Jan 14 13:36 u-boot.img $ cksum MLO u-boot.img 1491516067 108112 MLO 726808210 1221056 u-boot.img The diff is small: for MLO, it's just the build time string, for u-boot.img, this seems to be a s ingle 'line' different in the header. So I'm _guessing_ these are supposed to be the "same" files. Also, the BBB ones are timestamped Jan 14, which is when I last updated the machine. (1) Does the installer, when sysupgrading, also upgrade these uboot files on the MSDOS partition, as it seems? (2) Where does the armv7 installer get them, given that there is no u-boot package for armv7? What is their relation to the ones present in the sysutils/u-boot port? Thank you for the insight. Jan U-Boot SPL 2021.10 (Apr 20 2024 - 17:53:20 -0600) Trying to boot from MMC1 U-Boot 2021.10 (Apr 20 2024 - 17:53:20 -0600) CPU : AM335X-GP rev 2.0 Model: TI AM335x BeagleBone Black DRAM: 512 MiB WDT: Started with servicing (60s timeout) NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... <ethaddr> not set. Validating first E-fuse MAC Net: eth2: ethernet@4a100000, eth3: usb_ether Hit any key to stop autoboot: 0 ** Invalid partition 2 ** switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... r999;999H6nScanning disk m...@48060000.blk... Scanning disk m...@481d8000.blk... Found 6 disks No EFI system partition BootOrder not defined EFI boot manager: Cannot load any image Found EFI removable media binary efi/boot/bootarm.efi 119296 bytes read in 13 ms (8.8 MiB/s) Booting /efi\boot\bootarm.efi disks: sd0* sd1 >> OpenBSD/armv7 BOOTARM 1.23 boot> booting sd0a:/bsd: 4899016+1012320+139736+607956/[286059+107+345456+307688]=0x0 OpenBSD/armv7 booting ... arg0 0xc0a40ff0 arg1 0x0 arg2 0x9cde2000 Allocating page tables IRQ stack: p0x80a6f000 v0xc0a6f000 ABT stack: p0x80a70000 v0xc0a70000 UND stack: p0x80a71000 v0xc0a71000 SVC stack: p0x80a72000 v0xc0a72000 Creating L1 page table at 0x80a44000 Mapping kernel Constructing L2 page tables undefined page type 0x2 pa 0x80000000 va 0x80000000 pages 0x2000 attr 0x8 type 0x7 pa 0x82000000 va 0x82000000 pages 0x5eeb attr 0x8 type 0x9 pa 0x87eeb000 va 0x87eeb000 pages 0x2a attr 0x8 type 0x7 pa 0x87f15000 va 0x87f15000 pages 0x14ecd attr 0x8 type 0x2 pa 0x9cde2000 va 0x9cde2000 pages 0x13 attr 0x8 type 0x4 pa 0x9cdf5000 va 0x9cdf5000 pages 0x1 attr 0x8 type 0x7 pa 0x9cdf6000 va 0x9cdf6000 pages 0x1 attr 0x8 type 0x2 pa 0x9cdf7000 va 0x9cdf7000 pages 0x100 attr 0x8 type 0x1 pa 0x9cef7000 va 0x9cef7000 pages 0x1e attr 0x8 type 0x4 pa 0x9cf15000 va 0x9cf15000 pages 0x8 attr 0x8 type 0x6 pa 0x9cf1d000 va 0x9cf1d000 pages 0x1 attr 0x8000000000000008 type 0x4 pa 0x9cf1e000 va 0x9cf1e000 pages 0x3 attr 0x8 type 0x6 pa 0x9cf21000 va 0x9cf21000 pages 0x3 attr 0x8000000000000008 type 0x4 pa 0x9cf24000 va 0x9cf24000 pages 0x1 attr 0x8 type 0x6 pa 0x9cf25000 va 0x9cf25000 pages 0x4 attr 0x8000000000000008 type 0x4 pa 0x9cf29000 va 0x9cf29000 pages 0xe attr 0x8 type 0x2 pa 0x9cf37000 va 0x9cf37000 pages 0x3035 attr 0x8 type 0x5 pa 0x9ff6c000 va 0x9ff6c000 pages 0x1 attr 0x8000000000000008 type 0x2 pa 0x9ff6d000 va 0x9ff6d000 pages 0x93 attr 0x8 pmap [ using 939844 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2025 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.6-current (GENERIC) #0: Tue Jan 14 16:57:37 CET 2025 h...@bbb.stare.cz:/usr/src/sys/arch/armv7/compile/GENERIC real mem = 484147200 (461MB) avail mem = 464535552 (443MB) random: good seed from bootblocks mainbus0 at root: TI AM335x BeagleBone Black cpu0 at mainbus0 mpidr 0: ARM Cortex-A8 r3p2 cpu0: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu0: 256KB 64b/line 8-way L2 cache omap0 at mainbus0 prcm0 at omap0 rev 0.2 dmtimer0 at omap0 rev 3.1 dmtimer1 at omap0 rev 3.1 omsysc0 at mainbus0: "target-module" omsysc1 at omsysc0: "target-module" "pmu" at omsysc1 not configured simplebus0 at mainbus0: "ocp" intc0 at simplebus0 rev 5.0 simplebus1 at simplebus0: "interconnect" simplebus2 at simplebus1: "segment" simplebus3 at simplebus1: "segment" omsysc2 at simplebus3: "target-module" "cpu" at omsysc2 not configured simplebus4 at simplebus1: "segment" omsysc3 at simplebus4: "target-module" simplebus5 at omsysc3: "prcm" omcm0 at simplebus5: "clock" omclock0 at omcm0: "clock" omclock1 at omcm0: "clock" omclock2 at omcm0: "clock" omclock3 at omcm0: "clock" omclock4 at omcm0: "clock" omclock5 at omcm0: "clock" omclock6 at omcm0: "clock" omclock7 at omcm0: "clock" omcm1 at simplebus5: "clock" omclock8 at omcm1: "clock" omclock9 at omcm1: "clock" omclock10 at omcm1: "clock" omcm2 at simplebus5: "clock" omclock11 at omcm2: "clock" omcm3 at simplebus5: "clock" omclock12 at omcm3: "clock" omcm4 at simplebus5: "clock" omclock13 at omcm4: "clock" omcm5 at simplebus5: "clock" omclock14 at omcm5: "clock" "prm" at simplebus5 not configured "prm" at simplebus5 not configured "prm" at simplebus5 not configured "prm" at simplebus5 not configured "prm" at simplebus5 not configured "prm" at simplebus5 not configured "prm" at simplebus5 not configured omsysc4 at simplebus4: "target-module" simplebus6 at omsysc4: "scm" syscon0 at simplebus6: "scm_conf" pinctrl0 at simplebus6 "control" at simplebus6 not configured "wkup_m3_ipc" at simplebus6 not configured "dma-router" at simplebus6 not configured omsysc5 at simplebus4: "target-module" omgpio0 at omsysc5: rev 0.1 gpio0 at omgpio0: 32 pins omsysc6 at simplebus4: "target-module" com0 at omsysc6: ti16750, 64 byte fifo com0: console omsysc7 at simplebus4: "target-module" tiiic0 at omsysc7 rev 0.11 iic0 at tiiic0 "ti,tps65217" at iic0 addr 0x24 not configured "atmel,24c256" at iic0 addr 0x50 not configured nxphdmi0 at iic0 addr 0x70: rev 0x0301 nxphdmi0: no display detected omsysc8 at simplebus4: "target-module" omsysc9 at simplebus4: "target-module" "timer" at omsysc9 not configured omsysc10 at simplebus4: "target-module" omdog0 at omsysc10 rev 0.1 omsysc11 at simplebus4: "target-module" "rtc" at omsysc11 not configured simplebus7 at simplebus0: "interconnect" simplebus8 at simplebus7: "segment" omsysc12 at simplebus8: "target-module" omsysc13 at simplebus8: "target-module" omsysc14 at simplebus8: "target-module" omsysc15 at simplebus8: "target-module" omsysc16 at simplebus8: "target-module" "mcasp" at omsysc16 not configured omsysc17 at simplebus8: "target-module" omsysc18 at simplebus8: "target-module" "timer" at omsysc18 not configured omsysc19 at simplebus8: "target-module" "timer" at omsysc19 not configured omsysc20 at simplebus8: "target-module" "timer" at omsysc20 not configured omsysc21 at simplebus8: "target-module" "timer" at omsysc21 not configured omsysc22 at simplebus8: "target-module" "timer" at omsysc22 not configured omsysc23 at simplebus8: "target-module" "timer" at omsysc23 not configured omsysc24 at simplebus8: "target-module" omgpio1 at omsysc24: rev 0.1 gpio1 at omgpio1: 32 pins omsysc25 at simplebus8: "target-module" ommmc0 at omsysc25 sdmmc0 at ommmc0: 4-bit omsysc26 at simplebus8: "target-module" omsysc27 at simplebus8: "target-module" "mailbox" at omsysc27 not configured omsysc28 at simplebus8: "target-module" "spinlock" at omsysc28 not configured simplebus9 at simplebus7: "segment" omsysc29 at simplebus9: "target-module" tiiic1 at omsysc29 rev 0.11 iic1 at tiiic1 "atmel,24c256" at iic1 addr 0x54 not configured "atmel,24c256" at iic1 addr 0x55 not configured "atmel,24c256" at iic1 addr 0x56 not configured "atmel,24c256" at iic1 addr 0x57 not configured omsysc30 at simplebus9: "target-module" omsysc31 at simplebus9: "target-module" omsysc32 at simplebus9: "target-module" omsysc33 at simplebus9: "target-module" omsysc34 at simplebus9: "target-module" omgpio2 at omsysc34: rev 0.1 gpio2 at omgpio2: 32 pins omsysc35 at simplebus9: "target-module" omgpio3 at omsysc35: rev 0.1 gpio3 at omgpio3: 32 pins omsysc36 at simplebus9: "target-module" omsysc37 at simplebus9: "target-module" omsysc38 at simplebus9: "target-module" ommmc1 at omsysc38 sdmmc1 at ommmc1: 8-bit simplebus10 at simplebus7: "segment" omsysc39 at simplebus10: "target-module" "mpu" at omsysc39 not configured simplebus11 at simplebus7: "segment" omsysc40 at simplebus11: "target-module" omsysc41 at simplebus11: "target-module" omsysc42 at simplebus11: "target-module" omsysc43 at simplebus11: "target-module" amdisplay0 at omsysc43 amdisplay0: no display attached. omsysc44 at simplebus11: "target-module" omrng0 at omsysc44 simplebus12 at simplebus0: "interconnect" simplebus13 at simplebus12: "segment" simplebus14 at simplebus0: "interconnect" simplebus15 at simplebus14: "segment" omsysc45 at simplebus15: "target-module" cpsw0 at omsysc45: version 1.12 (0), address 90:59:af:82:2e:7e ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 0x0001f0, model 0x000f omsysc46 at simplebus15: "target-module" "pruss" at omsysc46 not configured simplebus16 at simplebus0: "interconnect" simplebus17 at simplebus16: "segment" omsysc47 at simplebus0: "target-module" "dma" at omsysc47 not configured omsysc48 at simplebus0: "target-module" "dma" at omsysc48 not configured omsysc49 at simplebus0: "target-module" "dma" at omsysc49 not configured omsysc50 at simplebus0: "target-module" "dma" at omsysc50 not configured omsysc51 at simplebus0: "target-module" omsysc52 at simplebus0: "target-module" "usb-phy" at omsysc52 not configured "usb" at omsysc52 not configured "usb-phy" at omsysc52 not configured "usb" at omsysc52 not configured "dma-controller" at omsysc52 not configured omsysc53 at simplebus0: "target-module" "sram" at omsysc53 not configured omsysc54 at simplebus0: "target-module" "emif" at omsysc54 not configured omsysc55 at simplebus0: "target-module" omsysc56 at simplebus0: "target-module" "sham" at omsysc56 not configured omsysc57 at simplebus0: "target-module" "aes" at omsysc57 not configured omsysc58 at simplebus0: "target-module" "gpu" at omsysc58 not configured scsibus0 at sdmmc0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SD32G, 0061> removable sd0: 29862MB, 512 bytes/sector, 61157376 sectors scsibus1 at sdmmc1: 2 targets, initiator 0 sd1 at scsibus1 targ 1 lun 0: <SD/MMC, MMC02G, 0000> removable sd1: 1832MB, 512 bytes/sector, 3751936 sectors vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets bootfile: sd0a:/bsd boot device: sd0 root on sd0a (74d0dc7983596b16.a) swap on sd0b dump on sd0b WARNING: CHECK AND RESET THE DATE!