Hi Quentin, On 10 February 2025 16:25:23 UTC, Quentin Schulz <quentin.sch...@cherry.de> wrote: > [...] >What I can say from glancing at the code is that for Rockchip they do the >following: > >Register a bootsource type (e.g. MMC, SPI, I2C, USB, etc...), a bootsource >instance of that type (e.g. MMC0, SPI3, I2C7, ...). The mapping between what >the ROM says the device is vs what it is in the DT is done in their >Barebox-specific DT via this custom prop in /chosen: > >barebox,bootsource-<bootsourcetype><bootsourceinstance> = &label; # à-la >/aliases > >This gets read and resolved and then inserted as > >/chosen/bootsource = "/some/path" > >into the kernel DT.
We are doing something quite similar downsream at openwrt.org for MediaTek router SoCs, see for example: https://github.com/openwrt/openwrt/blob/main/package/boot/uboot-mediatek/patches/310-mt7988-select-rootdisk.patch https://github.com/openwrt/openwrt/blob/main/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi#L32 https://github.com/openwrt/openwrt/blob/main/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso#L60 Of course we could use the standard "bootsource" property instead, but having a way to reference the volume or partition used as rootfs instead of just passing a referencd to a physical device is advantagous...