diff options
author | Simon Glass <sjg@chromium.org> | 2019-04-26 06:58:38 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-05-08 07:44:07 +0300 |
commit | 4fc2365ccb911a1a3401e88be702c5c42ab6386a (patch) | |
tree | 3568edc5e1eaca95bfa2bfa80f3b74aac039eb35 /scripts | |
parent | 003331827a1c7c97ea5b2e29961858e004a485e1 (diff) | |
download | u-boot-4fc2365ccb911a1a3401e88be702c5c42ab6386a.tar.xz |
spl: Allow sandbox to build a device-tree file
At present only OF_SEPARATE is considered valid for building a device-tree
file in SPL. However sandbox uses OF_HOSTFILE instead. Update the logic to
handle this and make it easier to understand.
Note that the new logic is not quite the same as the old logic. It was
previously assumed that checking for:
$(CONFIG_$(SPL_TPL_)OF_CONTROL)
$(CONFIG_OF_SEPARATE)
$(CONFIG_$(SPL_TPL_)OF_PLATDATA)
producing 'yy' meant that the first two were 'y' and the last was empty.
Strictly speaking it would be possible for any two of the three to be 'y'
and still yield the same result. However, that was not the intention of
the new logic, since OF_PLATDATA always ensures that no device-tree file
is included. So in effect the new logic is the same, with the addition of
OF_HOSTFILE as an option for OP_SEPARATE.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 56dbbe127b..8d76a2d400 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -253,8 +253,20 @@ else FINAL_DTB_CONTAINER = $(obj)/$(SPL_BIN).multidtb.fit endif +# Build the .dtb file if: +# - we are not using OF_PLATDATA +# - we are using OF_CONTROL +# - we have either OF_SEPARATE or OF_HOSTFILE +build_dtb := +ifeq ($(CONFIG_$(SPL_TPL_)OF_PLATDATA),) +ifneq ($(CONFIG_$(SPL_TPL_)OF_CONTROL),) +ifeq ($(CONFIG_OF_SEPARATE)$(CONFIG_OF_HOSTFILE),y) +build_dtb := y +endif +endif +endif -ifeq ($(CONFIG_$(SPL_TPL_)OF_CONTROL)$(CONFIG_OF_SEPARATE)$(CONFIG_$(SPL_TPL_)OF_PLATDATA),yy) +ifneq ($(build_dtb),) $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin \ $(if $(CONFIG_SPL_SEPARATE_BSS),,$(obj)/$(SPL_BIN)-pad.bin) \ $(FINAL_DTB_CONTAINER) FORCE |