linux - How to make correct bootargs for rootfs when device mapping changes -


i use imx.6 sabresd board can boot using sd-card or emmc. can boot linux correctly both of them using u-boot , give appropriate bootargs correct location rootfs. when booting linux using emmc device name change /dev/mmcblk1 when sd card inserted /dev/mmcblk0 when sd card not inserted.

now how can give correct root= in u-boot using bootargs parameter when don't know device use?

of course can tests in u-boot check if sd-card inserted , change bootargs parameter (just idea not yet tested) hoping there more elegant solution this? suggestions?

if kernel , rootfs locates @ same device (sd-card or emmc) can try boot in series firstly sd-card , emmc . see idea:

boot_sdcard=setenv bootargs 'root=/dev/mmcblk1 ...'; run load_kernel_sdcard; bootm boot_emmc=setenv bootargs 'root=/dev/mmcblk0 ...'; run load_kernel_emmc; bootm bootcmd=run boot_sdcard; run boot_emmc 

kernel wouldn't start if there no sdcard , u-boot continue boot form emmc.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -