Which preloader image to use?

As this differs from eMMC string,how can we now check for bootsevice in uboot? Which address is set to which byte (i guess 0xea).this should work too if sd is available but boot from emmc

it looks like you read boot signature from first bytes (SDMMC_BOOT vs. EMMC_BOOT) of mmc-device…but how is this passed to uboot?

The uboot code doesn’t need to change, just like before

1 Like

We should have EMMC string on memory address 0x81dffff0?

yes, R2 have update this code.

1 Like

Thank you, we will try this one: https://github.com/BPI-SINOVOIP/BPI-files/blob/master/SD/100MB/BPI-R2-EMMC-boot0-DDR1600-20191024-0k.img.gz

@LeXa2 can you try it too?


echo 0 > /sys/block/mmcblk1boot0/force_ro
gunzip -c BPI-R2-EMMC-boot0-DDR1600-20191024-0k.img.gz  | dd of=/dev/mmcblk1boot0 bs=1024 seek=0

seems to work well:

BPI-R2> md.b 0x81dffff0 4
81dffff0: 65 4d 4d 43                                        eMMC

i can also load bigger uboot (2020-01 with ahci-support, so it looks good so far)

1 Like

Sure will do, but not today - in a middle of house move right now. Probably would be able to test it on Friday.

Have you tested it? From my PoV it looks good

Nice question, I would like to know deeply. Please clear it.

Hello Frank-w,

Currently I can not boot u-boot from SD. it have the same problem. But I can boot u-boot completely from eMMC after following your instruction My preloader for SD: preloader_iotg7623Np1_sd_1333M.bin and my preloader for emmc is BPI-R2-EMMC-boot0-DDR1600-20190722-0k.img.gz U-boot version: https://github.com/frank-w/u-boot.git

Can you suggest to me some step to fix this issue ?

Thank so much

which issue do you have?? SD or eMMC? my repo contains multiple uboot-versions…whch one do you use?

Currently I can not boot u-boot from SD but can boot u-boot from eMMC my u-boot that i use: 2019-07-bpi-r2

then just use the 20190722 preloader for SD-Card instead of your old one

these both should be for SD:



for emmc you should use this one


because only this has extended memory-range for uboot and the emmc-flag

1 Like

OK I will try again thank you so much.

And I have also 1 question about use 4G module at link

Do you have file “ppp1.sh” ? Can you send to me ? Because I can not download “ppp1.sh” from Viet Nam


unrelated to this topic and no, i don’t have it…i also don’t have such module

1 Like

OK. Thank you so much I will flash preloader again

And do you have source code of preloader ? Can you share me ? Thanks

preloader is closed source, for the memory-expansion (to load bigger uboot) and the emmc-flag we needed vendor-support

1 Like

I got it. thank you so much

Hai frank… can you guide me how to write to sd card or emmc… I use armbian and stuck on <0x81e00004>=0xe59ff014

These preloaders are written like others…except armbian does anything different…

Just backup your sd (part you overwrite) and flash new one


sudo dd if=BPI-R2-preloader-DDR1600-20190722-2k.img of=${dev} bs=1k seek=2


sudo dd if=BPI-R2-EMMC-boot0-DDR1600-20190722-0k.img of=/dev/mmcblk1boot0

Afair emmc also needs sd-preloader on userpartition

sudo dd if=BPI-R2-preloader-DDR1600-20190722-2k.img of=/dev/mmcblk1 bs=1k seek=2
1 Like