apritzel / pine64

Pine64 Linux images and information
119 stars 28 forks source link

boot0img: Add an option for embedding DTB to legacy images #9

Open zador-blood-stained opened 8 years ago

zador-blood-stained commented 8 years ago

This change allows building bootable legacy images without using sunxi-pack-tools.

Tested with following command line:

./boot0img -B blobs/boot0.bin -u u-boot-pine64/u-boot.bin -e -F pine64.dtb -s blobs/scp.bin \ 
 -d arm-trusted-firmware/build/sun50iw1p1/debug/bl31.bin -o u-boot-for-flashing.bin

where u-boot-pine64/u-boot.bin is a result of compiling legacy u-boot without any changes.

For the reference, setting u-boot size/DTB offset in header is needed due to this code in u-boot.