diff options
author | Alexander Kochetkov <al.kochet@gmail.com> | 2024-09-19 19:10:42 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-02 13:38:59 -0600 |
commit | f27e83062956c3b09d2ee3ea3b3c815f9d57e42d (patch) | |
tree | 13f0a38d53deb9d5995552b4ac07b72c6caf46a3 | |
parent | 983fd3d06db68e57a0fc8d6e4a2dffe4c69e9743 (diff) |
Makefile: pass external DTB provided by make variable EXT_DTB to binman
Yocto build is using EXT_DTB to repack U-Boot during signed
FIT kernel creation. First, it takes the DTB from U-Boot, then
it creates signed FIT kernel image and places kernel key into
the DTB. After that it executes:
make EXT_DTB=/path/to/dtb/with/kernel/key
Despite the fact that in the documentation all examples with EXT_DTB
use only single DTB, the patch allows pass many DTB files separated
by spaces, e.g.:
make EXT_DTB="/path1/to/1.dtb /path2/to/2.dtb"
The first DTB from the list become default configuration.
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1367,7 +1367,17 @@ u-boot.ldr: u-boot # --------------------------------------------------------------------------- # Use 'make BINMAN_DEBUG=1' to enable debugging # Use 'make BINMAN_VERBOSE=3' to set vebosity level + +ifneq ($(EXT_DTB),) +ext_dtb_list := $(basename $(notdir $(EXT_DTB))) +default_dt := $(firstword $(ext_dtb_list)) +of_list := "$(ext_dtb_list)" +of_list_dirs := $(dir $(EXT_DTB)) +else +of_list := $(CONFIG_OF_LIST) +of_list_dirs := $(dt_dir) default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE)) +endif quiet_cmd_binman = BINMAN $@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ @@ -1377,7 +1387,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ build -u -d u-boot.dtb -O . -m \ --allow-missing $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ - -I $(dt_dir) -a of-list=$(CONFIG_OF_LIST) \ + $(foreach f,$(of_list_dirs),-I $(f)) -a of-list=$(of_list) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ -a atf-bl31-path=${BL31} \ -a tee-os-path=${TEE} \ |