Which preloader image to use?

@sinovoip is this string set via the preloader or where does it came from? can you set this string to SD if booted from SD? why is it only changed on power-cycle?

Preloaders update:

BPI-R2-EMMC-boot0-DDR1600-20190722-0k.img.gz

Also known as: BPI-R2-preloader-DDR1600-20190722-2k.img.gz
This preloader was published here. Release highlight is the change of maximum u-boot binary size from 300000 to 524288 bytes. It allows to use u-boot with more features compiled in (like fatwrite support or pci + sata ahci). Preloader codebase seems to originate from BPI-R2-720P-2k.img instead of more recently released mtk-bpi-r2-preloader-emmc.bin/mtk-bpi-r2-preloader-sd.bin: no “eMMC” signature placed to 0x81dffff0 and “Boot from SD Card!!” or “Boot from eMMC!!” are printed in the bootlog to indicate the device u-boot is loaded from. More recent preloaders print “Load u-boot from SD Card...” or “Load u-boot from eMMC...” instead.

Except for increased u-boot load size behavior is the same as for BPI-R2-720P-2k.img. It makes this one a bad choice for enforced eMMC-only boot cases (for boards having hardware boot switch set to eMMC position) as preloader will always to load u-boot from SD card if one is inserted. No boot signatures are checked on SD card in such cases meaning that inserting any SD card without u-boot on it would lead to boot hang/failure.

1 Like

@sinovoip can you add boot-signature (string of booted device to memory-address 0x81dffff0) to the recent preloaders? eMMC for emmc-image and SD to the sd-preloader

Ping to push thread on top for @sinovoip

@sinovoip have you changed preloaders (at least for emmc)?

I guess sd-preloader cannot be changed if it is also loaded on emmc (like on r64) and will override emmc-string.

we have update BPI-R2 , please check it.

2 Likes

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?

edit:

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:

https://github.com/BPI-SINOVOIP/BPI-files/blob/master/SD/100MB/BPI-R2-preloader-DDR1600-20191024-2k.img.gz

https://github.com/BPI-SINOVOIP/BPI-files/blob/master/SD/100MB/BPI-R2-preloader-DDR1600-20190722-2k.img.gz

for emmc you should use this one

https://github.com/BPI-SINOVOIP/BPI-files/blob/master/SD/100MB/BPI-R2-EMMC-boot0-DDR1600-20191024-0k.img.gz

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

Thanks

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

1 Like