diff options
author | Simon Glass <sjg@chromium.org> | 2021-11-23 21:09:48 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-12-05 09:21:44 -0700 |
commit | 7945077f7934fff2b9a5fba2860fe330e86093f1 (patch) | |
tree | aab3795cf865edbb9808905c41f2df5ea457e16d | |
parent | d5b6e91ba2cac6cb0a2f7437fdbbe792d1acb387 (diff) | |
download | u-boot-7945077f7934fff2b9a5fba2860fe330e86093f1.zip u-boot-7945077f7934fff2b9a5fba2860fe330e86093f1.tar.gz u-boot-7945077f7934fff2b9a5fba2860fe330e86093f1.tar.bz2 |
binman: Allow providing tools and blob directories
At present it is necessary to symlink files containing external blobs into
the U-Boot tree in order for binman to find them. This is not very
convenient.
Add two new environment/Makefile variables to help with this. Add
documentation as well, fixing a related nit.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | tools/binman/binman.rst | 31 |
2 files changed, 32 insertions, 1 deletions
@@ -1303,11 +1303,13 @@ default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE)) quiet_cmd_binman = BINMAN $@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ + $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m --allow-missing \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \ + $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ -a atf-bl31-path=${BL31} \ -a opensbi-path=${OPENSBI} \ -a default-dt=$(default_dt) \ diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index 35de93b..210d0c5 100644 --- a/tools/binman/binman.rst +++ b/tools/binman/binman.rst @@ -942,7 +942,7 @@ Replacing files in an image --------------------------- You can replace files in an existing firmware image created by binman, provided -that there is an 'fdtmap' entry in the image. For example: +that there is an 'fdtmap' entry in the image. For example:: $ binman replace -i image.bin section/cbfs/u-boot @@ -1081,6 +1081,35 @@ the tool's output will be used for the target or for the host machine. If those aren't given, it will also try to derive target-specific versions from the CROSS_COMPILE environment variable during a cross-compilation. +If the tool is not available in the path you can use BINMAN_TOOLPATHS to specify +a space-separated list of paths to search, e.g.:: + + BINMAN_TOOLPATHS="/tools/g12a /tools/tegra" binman ... + + +External blobs +-------------- + +Binary blobs, even if the source code is available, complicate building +firmware. The instructions can involve multiple steps and the binaries may be +hard to build or obtain. Binman at least provides a unified description of how +to build the final image, no matter what steps are needed to get there. + +Binman also provides a `blob-ext` entry type that pulls in a binary blob from an +external file. If the file is missing, binman can optionally complete the build +and just report a warning. Use the `-M/--allow-missing` option to enble this. +This is useful in CI systems which want to check that everything is correct but +don't have access to the blobs. + +If the blobs are in a different directory, you can specify this with the `-I` +option. + +For U-Boot, you can use set the BINMAN_INDIRS environment variable to provide a +space-separated list of directories to search for binary blobs:: + + BINMAN_INDIRS="odroid-c4/fip/g12a \ + odroid-c4/build/board/hardkernel/odroidc4/firmware \ + odroid-c4/build/scp_task" binman ... Code coverage ------------- |