Boot from eMMC, rootfs on SATA

Hello. I recompiled the kernel image to have SATA and RAID support built-in. Now, when I try to copy MBR, partition table and BOOT partition data only, rest to SATA drive (rootfs) I made:

  • enter the uboot prompt and change pratition config: emmc pconf 48
  • reset to boot OS from SD Card
  • enable write mode: echo 0 > /sys/block/mmcblk1boot0/force_ro
  • write preloader to EMMC: bpi-bootsel BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz /dev/mmcblk1boot0
  • copy partition table: sfdisk -d /dev/mmcblk1 | sfdisk -f of=/dev/mmcblk1
  • copy MBR from SD card to eMMC: dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=512 count=1
  • copy BOOT partition data: dd if=/dev/mmcblk0p1 of=/dev/mmcblk1p1
  • change root partition point in uEnv.txt file on BOOT partition (/dev/mmcblk1p1)
  • save and reboot and boot process hang on [BLDR] jump to 0x81E00000 [BLDR] <0x81E00000>=0x0 [BLDR] <0x81E00004>=0x0

What I should do to could copy only the BOOT partition on eMMC and boot successfully from it.

When I copy full XXX.img to eMMC everything works as should, but I can’t waste a time for copying rootfs twice :wink:


OK, I have it! Regarding to description from this post I made: dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=512 count=524289 then mount and replace root partition point in uEnv.txt file and BPI-R2 boot with success.


1 Like