Skip to content

Commit

Permalink
Makefile: Build additional binaries for dtb FIT blobs appended to U-boot
Browse files Browse the repository at this point in the history
Add additional make targets and options for building embedded FIT U-boot
images.

Signed-off-by: Franklin S Cooper Jr <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
  • Loading branch information
fcooperti authored and trini committed Jul 10, 2017
1 parent af9e6ad commit 6f59fb0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#
# Top-level generic files
#
fit-dtb.blob
/MLO*
/SPL*
/System.map
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,21 @@ dts/dt.dtb: checkdtc u-boot
quiet_cmd_copy = COPY $@
cmd_copy = cp $< $@

ifeq ($(CONFIG_OF_SEPARATE),y)
ifeq ($(CONFIG_FIT_EMBED),y)

fit-dtb.blob: dts/dt.dtb FORCE
$(call if_changed,mkimage)

MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
-a 0 -e 0 -E \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null

u-boot-fit-dtb.bin: u-boot-nodtb.bin fit-dtb.blob
$(call if_changed,cat)

u-boot.bin: u-boot-fit-dtb.bin FORCE
$(call if_changed,copy)
else ifeq ($(CONFIG_OF_SEPARATE),y)
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
$(call if_changed,cat)

Expand Down Expand Up @@ -1473,7 +1487,7 @@ CLEAN_DIRS += $(MODVERDIR) \
$(filter-out include, $(shell ls -1 $d 2>/dev/null))))

CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
boot* u-boot* MLO* SPL System.map
boot* u-boot* MLO* SPL System.map fit-dtb.blob

# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include/generated spl tpl \
Expand Down

0 comments on commit 6f59fb0

Please sign in to comment.