Which preloader image to use?

(xbgmsharp) #1

There is multiple image available and wonder which one should i use?

  • BPI-R2-720P-2k.img.gz
  • BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz

(Frank W.) #2

first is uboot-image (not preloader) for SD-card and must begin at 2k (skip 2048 byte) as the name says.


second one is preloader for emmc (0k) which must be written to boot0-partition starting at byte 0 (from beginning)


maybe it’s needed also for SD-card…have used my SD-Cards with jessie image and replaced only uboot, kernel and OS-files

the 0k/2k says where the image starts, see https://github.com/BPI-SINOVOIP/bpi-tools/blob/master/bpi-bootsel#L230 for details

for SD-Card-image https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/3823964822219743e0fe785e04832813726862a1/scripts/bootloader.sh#L26 is the reference, here preloader_iotg7623Np1_emmc.bin is used

(Alexey Loukianov) #3

A lot of time had passed since Jan 2018 and I think it is just the right time to revive this thread. So, what is the current situation w.r.t. preloader(s) for R2? Is there a single convenient place provided by vendor where I would find up-to-date preloader? Should I use the same preloader for EMMC and for SD card?

Asking this as I’m continuing my work on integrating R2 support into OpenWRT build system in a more “upstream-able” way compared to what is being offered by the vendor and I need to know what preloader(s) to use for this. Including binary blob into OpenWRT git tree is not an option so I’m looking for some “vendor official storage place” to fetch required files from at OpenWRT’s build time using OpenWRT’s built-in build system facilities.

(Alexey Loukianov) #4

While waiting for the answer I went through all the available preloaders in https://github.com/BPI-SINOVOIP/BPI-files/tree/master/SD/100MB and https://github.com/BPI-SINOVOIP/BPI-R2-bsp/tree/master/mt-pack/mtk/bpi-r2/bin (including changes available in tag v1.2.1 but missing from master branch). Some of them were preloader-only files but some other turned out to be SDMMC_BOOT+BRYLT+preloader+uboot combos. Thus I used HxD hex editor and “normalized” all filed to contain only preloader and then went on and compared all them.

Result is pretty interesting as most of them turned out to be identical:

There 4 are identical: BPI-R2-720P-DDR1600-2k.img == BPI-R2-EMMC-boot0-DDR1600-0k.img == BPI-R2-preloader-2k.img == preloader_iotg7623Np1_sd_1600M.bin

These 7 are identical: BPI-R2-1080P-2k.img == BPI-R2-2k-EMMC-20180320.img == BPI-R2-2k-SD-20180320.img == BPI-R2-720P-2k.img == BPI-R2-EMMC-boot0-0k.img == preloader_iotg7623Np1_emmc.bin == preloader_iotg7623Np1_sd_1333M.bin

There are three “exceptions” that are uniq:


Ones with name starting with “mtk-bpi-r2-preloader” came from this thread/repo: BananaPI BPI-R2 Openwrt18.06 Demo Image and Source Code Release 2019-03-06

Looking at file names it looks like that (a) preloader is the same for SD and EMMC and (b) main difference between preloaders is the speed that RAM gets initialized to, i.e. DDR1333 vs DDR1600.

Nevertheless, while these findings are interesting et al I still would like to get the “official” response from vendor representatives regarding where to look for “official” preloader image and - if there are two versions available differing in DDR freq - which one should I use?