0
votes

Using Pandaboard ES, the Linaro 14.10 kernel treats mmcblk0p2 as root partition.
Is there a general way to configure the root partition to other mmcblk or just another partition?

Detail:
Two block devices, mmcblk0 is SD card and mmcblk1 is EMMC, both available in /dev/block.
The boot flow is: MLO(SD) => u-boot.img(SD) => uImage, initrd, boot.scr, board.dtb(EMMC)

u-boot.img loads uImage, initrd and board.dtb to RAM and starts the kernel.
After kernel starting, it treats the mmcblk0p2 as root partition.
How to modify the kernel source code so it uses mmcblk1pX as root partition?

2

2 Answers

0
votes

You can pass it as kernel command line root=/dev/mmcblk1pX

0
votes

You don't have to modify the kernel source. What you have to change is the U-Boot environment variable. U-Boot usually passes the root partition to the Linux Kernel in part of bootargs. And I believe you can override the default values with a boot.scr. In other words, set bootargs in a blank file, and compile a new boot.scr using tools like mkimage.