Trouble booting from EMMC

Hi,

I’m having trouble making my bpi-r2 boot centos 7 lite from eMMC. As far as I know, the instructions for other boards are just doing:

# dd if=image.img of=/dev/emmc

with their respective image and device names. This, though, doesn’t seem to work on my board.

When I run that command, shut down (gracefully, and after a sync), remove the SD card and try to boot again, it doesn’t boot as if only thing the bpi-r2 could boot is the SD card. In my board, there’s a selector which has SD and EMMC labels, but it doesn’t seem to do anything either.

Has someone had a similar problem? If so, have you fixed it? And how?

Thanks.

have you changed your partition-config of emmc?

http://www.fw-web.de/dokuwiki/doku.php?id=en/bpi-r2/storage

Due to the way the MT7623 chip works, it will never be possible to have a single image that can be either copied to SD card or eMMC by simply using ‘dd’.

The MT7623 requires a preloader binary that is provided by Mediatek/Sinovoip. When using eMMC, this preloader is required to be in the eMMC’s protected boot partition.

Such a boot partition does not exist on SD cards, so the preloader is located at address 0x800 instead.

I’ve managed to boot from emmc by setting the partition mode to 0x48 (thanks frank-w).

As for the preloader binary, I’ve noticed that there is a partition (/dev/mmcblk1boot0 and /dev/mmcblk1boot1 I think), which is most likely to contain that binary.

Strangely enough, running dd on the root drive (/dev/mmcblk1) does not erase those partitions. That is probably why dd worked for me after setting the partition mode.