]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - scripts/Makefile.lib
arm64: boot: Support Flat Image Tree
[thirdparty/linux.git] / scripts / Makefile.lib
index 3179747cbd2cc014d0a8ba98cff008f28fbbc050..afa1099b6b8e5a3a78bde33627b65ca587d121e2 100644 (file)
@@ -504,6 +504,22 @@ quiet_cmd_uimage = UIMAGE  $@
                        -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
                        -n '$(UIMAGE_NAME)' -d $< $@
 
+# Flat Image Tree (FIT)
+# This allows for packaging of a kernel and all devicetrees files, using
+# compression.
+# ---------------------------------------------------------------------------
+
+MAKE_FIT := $(srctree)/scripts/make_fit.py
+
+# Use this to override the compression algorithm
+FIT_COMPRESSION ?= gzip
+
+quiet_cmd_fit = FIT     $@
+      cmd_fit = $(MAKE_FIT) -o $@ --arch $(UIMAGE_ARCH) --os linux \
+               --name '$(UIMAGE_NAME)' \
+               $(if $(findstring 1,$(KBUILD_VERBOSE)),-v) \
+               --compress $(FIT_COMPRESSION) -k $< @$(word 2,$^)
+
 # XZ
 # ---------------------------------------------------------------------------
 # Use xzkern to compress the kernel image and xzmisc to compress other things.