Mainline u-boot for BPI-M2 Magic R16

(Michał Wołowik) #1

Hello, I have a trouble to write to the sd card and run new mainline uboot taken and compiled from github ( Everything compiled well but which files are valid and how to prepare sdcard for new uboot. Please give me some hints which files should be copied to which partition. Thanks.

(Michał Wołowik) #2

It seems that boot0.bin is missing. Can someone tell where I can download a source code for boot0 or just download boot0.bin? Thanks

(Michał Wołowik) #3

Hi again, I achieve a small progress. I found on wiki sunxi how to get boot0.bin from the ready image. The procedure is easy(taken from sunxi wiki)

dd if=2017-10-23-ubuntu-16.04-mate-desktop-beta3-bpi-m2m-sd-emmc.img.bin of=boot0.bin bs=1024 skip=8 count=32

After this operation, I get the boot0.bin file. I was not sure if this file is good so I made a simple examination. If no SD card is present and EMMC memory is empty Allwinner devices start in USB as ONDA device and is ready for transmission from the master. So when I issued from the command line

sunxi-fel uboot boot0.bin

I saw normal start procedure of boot0 section.

To write such captured binary to sd card use following syntax

dd if=boot0.bin of=/dev/sdX bs=1024 seek=8

To understand what is what on above syntax a small explanation

0 8KB Unused, available for MBR (partition table etc.)
8 32KB Initial SPL loader