boot partition in SD card and rootfs in the USB flash disk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

boot partition in SD card and rootfs in the USB flash disk

1,401 Views
HEXER
Contributor III

Greetings community.

I am using i.MX8 MQ based MaaXBoard. It has SD card slot and USB 3.0 ports. I want to prepare a system such that boot partition will be in the SD card and rootfs will be in the USB flash disk.

I can write only u-boot to the SD card and use it on my development board.

I can use yocto build system and generate yocto images (bootloader, rootfs etc) but i dont know how to achieve above goal. I can use u-boot command line and i think it is possible to achieve this using u-boot command line.

 

Could you give me the some command so i can boot from SD card and install footfs to my usb flash disk so that u-boot read my usb flash disk which includes rootfs.

 

Best regard and sorry for my bad english.

0 Kudos
5 Replies

1,350 Views
smithcoba
Contributor III

1. You need to prepare usb the same as you prepare sdcard. 

2, The you use the following commands

usb reset

fatls usb 0:1

fatload usb 0:1 ${fdt_addr} imx8mm-evk.dtb


fatload usb 0:1 ${loadaddr} ${image}

setenv bootargs console=${console},${baudrate} ${smp} root=/dev/sda2 rootwait rw

booti ${loadaddr} - ${fdt_addr_r}

If you use mount command, you will see the rootfs is usb sda2.(default emmc is /dev/mmcblk2p2 on / type ext4 (rw,relatime))

/dev/sda2 on / type ext4 (rw,relatime)

 

root@imx8mmevk:~#
root@imx8mmevk:~# mount
/dev/sda2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=668780k,nr_inodes=167195,mode=755)

 

1,284 Views
HEXER
Contributor III

First, Thank you for your response.

I think these commands what i needed.

I am going to give it a try and i am going to inform you about the result and possible errors.

Best regards.

0 Kudos

1,360 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hi @HEXER 

I think that you can refer to the "4.3.6 Copying the root file system (rootfs)" from i.MX Linux User's Guide (nxp.com) which documents with detailed commands.

 

Best regards

Harvey

0 Kudos

1,302 Views
smithcoba
Contributor III

Harvey,

I checked the 4.3.6 Copying the root file system (rootfs) the document in the link you provided, there are no details information about the bootloader on emmc but rootfs on usb, which you said "documents with detailed commands".

Could you please kindly highlight, better to take picture of those detailed commands?

1,281 Views
HEXER
Contributor III

i agree, there was no rootfs on usb related commands

0 Kudos