
Date: Mon, 5 Feb 2018 21:06:59 +1100 From: Jonathan Gray jsg@jsg.id.au
booting sd0a:/bsd: open sd0a:/bsd: Device not configured failed(6). will try /bsd
How do you find out that it's sd0a instead of sd1a?
The loaded image protocol I believe.
Actually the OpenBSD bootloader currently only supports loading the bsd kernel from the same device as the bootloader. It will always call that device sd0. It invokes the device path protocol on the loaded image handle and then matches that path to a device that supports the block io protocol.
The only thing I can think of that changed with this commit is that now we're honoring the device tree's pinmuxing rules. So if the DT wants to use the sdhost mmc controller instead of the sdhci one, it will actually get muxed there. Before, we didn't mux, so on the rpi3 we just happened to run on the sdhci.
At least the default Linux dtb uses sdhost for SD card access.
So maybe all that happened was a change in device numbers because we end up creating device nodes for mmc devices that don't have a card plugged in (sdhci).
In that case however, I guess it means you really were booting from MMC before, rather than USB?
There is no driver for either broadcom mmc controller in OpenBSD. U-Boot is loaded of the sd card, then bootaa64.efi is loaded from usb via "boot_targets=usb0 mmc0 pxe dhcp" and distro bootcmd. Root filesystem is then on usb.
Right. So what the bootloader calls sd0 above is really the usb disk.
boot>
U-Boot> part list mmc 0
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type 1 8192 8192 00000000-01 0c Boot 4 16384 26624 00000000-04 a6 U-Boot> part list usb 0
Partition Map for USB device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type 1 8192 32768 00000000-01 0c Boot 4 40960 60021540 00000000-04 a6 U-Boot> ls mmc 0:1 /
I assume "ls usb 0:1 /" also works?
U-Boot> ls usb 0:1 / efi/ 50248 bootcode.bin 2820196 start.elf 6551 fixup.dat 17794 bcm2710-rpi-3-b.dtb 16550 bcm2710-rpi-cm3.dtb 422776 u-boot.bin 76 config.txt
7 file(s), 1 dir(s)
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot