From 3e8fba4cd41a3b324dffe921f9cd311e41f77a22 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Jul 2020 18:39:31 -0600 Subject: binman: Add support for calling mkimage As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass --- tools/binman/README.entries | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 6a816bb..4f2c48f 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -587,6 +587,29 @@ See README.x86 for information about Intel binary blobs. +Entry: mkimage: Entry containing a binary produced by mkimage +------------------------------------------------------------- + +Properties / Entry arguments: + - datafile: Filename for -d argument + - args: Other arguments to pass + +The data passed to mkimage is collected from subnodes of the mkimage node, +e.g.: + + mkimage { + args = "-n test -T imximage"; + + u-boot-spl { + }; + }; + +This calls mkimage to create an imximage with u-boot-spl.bin as the input +file. The output from mkimage then becomes part of the image produced by +binman. + + + Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot ----------------------------------------------------------------------------------------- -- cgit v1.1 From d498630ea9a5880302ee941f28925ee231b8f018 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Jul 2020 18:39:36 -0600 Subject: binman: Add an etype for external binary blobs It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for that. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- tools/binman/README.entries | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 4f2c48f..46f6ab1 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -42,6 +42,16 @@ obtained from the list of available device-tree files, managed by the +Entry: blob-ext: Entry containing an externally built binary blob +----------------------------------------------------------------- + +Note: This should not be used by itself. It is normally used as a parent +class by other entry types. + +See 'blob' for Properties / Entry arguments. + + + Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass ----------------------------------------------------------------------------------------- -- cgit v1.1 From 5f850fb9a62659edaa81167a4acc879c0ea104fc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Jul 2020 18:39:38 -0600 Subject: binman: Allow external binaries to be missing Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this behaviour. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- tools/binman/README.entries | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 46f6ab1..f45f514 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -48,6 +48,9 @@ Entry: blob-ext: Entry containing an externally built binary blob Note: This should not be used by itself. It is normally used as a parent class by other entry types. +If the file providing this blob is missing, binman can optionally ignore it +and produce a broken image with a warning. + See 'blob' for Properties / Entry arguments. -- cgit v1.1 From 3b9a87321cf5f40ad4c8dac535f94b0cbde19ce2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Jul 2020 18:39:45 -0600 Subject: binman: Add support for generating a FIT FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in Python To help address this, add support for FIT generation to binman. This works by putting the FIT source directly in the binman definition, with the ability to adjust parameters, etc. The contents of each FIT image come from sub-entries of the image, as is normal with binman. Signed-off-by: Simon Glass --- tools/binman/README.entries | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index f45f514..bf8edce 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -311,6 +311,46 @@ byte value of a region. +Entry: fit: Entry containing a FIT +---------------------------------- + +This calls mkimage to create a FIT (U-Boot Flat Image Tree) based on the +input provided. + +Nodes for the FIT should be written out in the binman configuration just as +they would be in a file passed to mkimage. + +For example, this creates an image containing a FIT with U-Boot SPL: + + binman { + fit { + description = "Test FIT"; + + images { + kernel@1 { + description = "SPL"; + os = "u-boot"; + type = "rkspi"; + arch = "arm"; + compression = "none"; + load = <0>; + entry = <0>; + + u-boot-spl { + }; + }; + }; + }; + }; + +Properties: + fit,external-offset: Indicates that the contents of the FIT are external + and provides the external offset. This is passsed to mkimage via + the -E and -p flags. + + + + Entry: fmap: An entry which contains an Fmap section ---------------------------------------------------- -- cgit v1.1