summaryrefslogtreecommitdiffstats
path: root/tools/zynqmpbif.c
Commit message (Collapse)AuthorAgeFilesLines
* tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32Bin Meng2019-10-281-1/+1
| | | | | | | | __swab32() is a Linux specific macro defined in linux/swab.h. Let's use the compiler equivalent builtin function __builtin_bswap32() for better portability. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* tools: zynqmpimage: Align image_size/image_stored_sizeMichal Simek2019-01-241-2/+2
| | | | | | | | Bootrom is not capable to work with non aligned bootloader sizes. SPL with OF_SEPARATE generates non-align images quite often that's why this change is required before OF_SEPARATE enableding. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* tools: zynqmpimage: round up partition sizeMichael Tretter2019-01-241-3/+12
| | | | | | | | | | | | | | | The FSBL copies "Total Partition Word Length" * 4 bytes from the boot.bin, which implies that the partition size is 4 byte aligned. When writing the partition, mkimage calculates "Total Partition Word Length" by dividing the size by 4. This implicitly cuts unaligned bytes at the end of the added binary. Instead of rounding down, the size must be round up to 4 bytes and the binary padded accordingly. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* tools: zynqmpimage: Add bif supportAlexander Graf2018-05-111-0/+1008
The officially described way to generate boot.bin files for ZynqMP is to describe the contents of the target binary using a file of the "bif" format. This file then links to other files that all get packed into a bootable image. This patch adds support to read such a .bif file and generate a respective ZynqMP boot.bin file that can include the normal image and pmu files, but also supports image partitions now. This makes it a handy replacement for the proprietary "bootgen" utility that is currently used to generate boot.bin files with FSBL. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>