Yes, I managed to trace the boot script from my vendor and saw what needs to be done to set the correct arguments.
For future reference, the steps I have taken to boot from a USB with Yocto is as follows: 1. Create .wic and .wic.bmap files by following the steps in https://docs.yoctoproject.org/dev/dev-manual/bmaptool.html - TLDR: Put `IMAGE_FSTYPES="wic wic.bmap"` to your image 2. Flash the image onto your USB - Run the following command: `bmaptool copy /path/to/image.wic /path/to/usb` 3. Plug in the USB and start U-Boot's USB system: - `usb start` - (Optional) Verify that the USB is visible, has a partition and has the expected structure - List USB: `usb storage` - List partition: `part list usb 0` (0 here is the number of the USB device according to the above result) - LIst the content in the USB: `ls usb 0:1` (1 here is the bootable partition on the USB) 4. Loading fitImage and setting `bootargs` - Load fitImage into memory: `load usb 0:1 $loadaddr /boot/fitImage` (I know that there is a fitImage according to my Yocto build) - Get the UUID of the partition and put it in the `uuid` variable: `part uuid usb 0:1 uuid` - Set the value for `bootargs`: `setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rw rootwait consolebank=0"` - Boot: `bootm` On Tue, Nov 19, 2024 at 11:08 AM Quentin Schulz <quentin.sch...@cherry.de> wrote: > Hi, > > On 11/18/24 10:19 PM, Uy Ha via lists.yoctoproject.org wrote: > >> > >> Or you can boot your system not using eMMC (external USB, network > >> TFTP/NFS, ...) and then use bmaptool on your target to flash the eMMC. > >> > > > > I am trying this approach now. I created a bootable USB (well, > theoretically bootable, I haven't actually managed to boot from it) using > `bmaptool`. However, I am not sure how to boot from it from the U-Boot > console. I tried loading the `fitImage` in the /boot and run `bootm` to > boot (I am just trying random things at this point, I am not really sure > what I am doing) but the kernel panics. > > > > The steps I have done: > > * Run: `usb start` > > * Load the `fitImage` into memory: `load usb 0:1 $loadaddr > /boot/fitImage` > > * Boot: `bootm` > > Then the kernel panics with the following error message > > > >> > >> /dev/root: Can't open blockdev > >> VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 > >> Please append a correct "root=" boot option; here are the available > >> partitions: > >> 0100 65536 ram0 > >> (driver?) > >> 0101 65536 ram1 > >> (driver?) > >> 0102 65536 ram2 > >> (driver?) > >> 0103 65536 ram3 > >> (driver?) > >> 0104 65536 ram4 > >> (driver?) > >> 0105 65536 ram5 > >> (driver?) > >> 0106 65536 ram6 > >> (driver?) > >> 0107 65536 ram7 > >> (driver?) > >> 0108 65536 ram8 > >> (driver?) > >> 0109 65536 ram9 > >> (driver?) > >> 010a 65536 ram10 > >> (driver?) > >> 010b 65536 ram11 > >> (driver?) > >> 010c 65536 ram12 > >> (driver?) > >> 010d 65536 ram13 > >> (driver?) > >> 010e 65536 ram14 > >> (driver?) > >> 010f 65536 ram15 > >> (driver?) > >> b300 7634944 mmcblk2 > >> driver: mmcblk > >> b301 134010 mmcblk2p1 076c4a2a-01 > >> b302 7496704 mmcblk2p2 076c4a2a-02 > >> b308 4096 mmcblk2boot0 > >> (driver?) > >> b310 4096 mmcblk2boot1 > >> (driver?) > >> Kernel panic - not syncing: VFS: Unable to mount root fs on > >> unknown-block(0,0) > >> > > > > What am I missing here? > > > > You are missing a rootfs. Usually passed via bootargs with root= or as > an initramfs if part of the fitimage configuration that is used by default. > > Cheers, > Quentin >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#64299): https://lists.yoctoproject.org/g/yocto/message/64299 Mute This Topic: https://lists.yoctoproject.org/mt/109628914/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-