[U-Boot] Reg UBoot ITB Image Support for Sunxi Cortex A53 Family SOCS
André Przywara
andre.przywara at arm.com
Mon Aug 28 22:49:08 UTC 2017
On 28/08/17 17:21, Chakra D wrote:
Hi,
> I'm trying to build ITB image for sunxi banana Pi M64 image in
> Buildroot. I'm facing issues with ITB format Uboot build.
>
> As per the readme file "board/sunxi/README.sunxi64", we need to build
> the bl31.bin image before uboot and pass the path of image as BL31
> variable to UBOOT.
>
> Is there any procedure or some kind of script that can be used to
> combine uboot.bin and bl31.bin images and generate uboot.itb image ?
Well, the U-Boot build system of course does this, it's just a bit hidden.
An .itb file is essentially using a a .dtb (device tree blob). You can
use the "dtc" tool (device-tree-compiler) to assemble and disassemble
it. If you delete u-boot.itb after a successful build, then do "make
V=1" afterwards you should be able to spot the commands:
$ ./board/sunxi/mksunxi_fit_atf.sh \
arch/arm/dts/sun50i-a64-pine64.dtb \
arch/arm/dts/sun50i-a64-pine64-plus.dtb > u-boot.its
$ ./tools/mkimage -f u-boot.its -E u-boot.itb
The first command generates the source file which describes the various
files to be combined (u-boot.bin, ATF and the device trees), the second
command generates the final binary from this source file and the files
referenced in it.
If you are in dire need, you could hook in there and use that source
file together with u-boot.bin, bl31.bin and the .dtb's to recompile the
.itb at any time.
Whether combining firmware and rootfs in such a way is the right way to
go forward in the long run is another question, though. Ideally the
firmware sits somewhere else - some newer boards have SPI flash or eMMC.
Cheers,
Andre
>
> Can we build uboot independently and post build combine with bl31.bin to
> generate uboot.itb ?
>
> Regards.
> Chakra
>
>
>
>
More information about the U-Boot
mailing list