[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250102-mpc83xx-v1-8-86f78ba2a7af@posteo.net>
Date: Thu, 02 Jan 2025 19:31:49 +0100
From: J. Neuschäfer via B4 Relay <devnull+j.ne.posteo.net@...nel.org>
To: Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Frank Li <Frank.Li@....com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
J. Neuschäfer <j.ne@...teo.net>
Subject: [PATCH 08/19] powerpc: boot: Enable FIT image generation
From: "J. Neuschäfer" <j.ne@...teo.net>
The Flat Image Tree (FIT) format combines a kernel, a set of
devicetrees, and optionally additional resources into a single file that
can be loaded by a bootloader such as U-Boot. Generating a FIT image as
part of the kernel build reduces the need for additional build scripts,
and produces a single boot image without falling back to one of the
many legacy methods implemented in arch/powerpc/boot/Makefile, which
would require additional changes for arch/powerpc/boot for each board.
Signed-off-by: J. Neuschäfer <j.ne@...teo.net>
---
Checkpatch warns:
arch/powerpc/boot/Makefile:364: WARNING: Possible repeated word: 'Image'
for this line:
image-y += Image image.fit
This is bogus and can be ignored.
---
arch/powerpc/Makefile | 3 ++-
arch/powerpc/boot/Makefile | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index f3804103c56ccfdb16289468397ccaea71bf721e..693c82c06072fb0529288736efee460e375b2476 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -225,7 +225,7 @@ KBUILD_CFLAGS += $(cflags-y)
all: zImage
# With make 3.82 we cannot mix normal and wildcard targets
-BOOT_TARGETS1 := zImage zImage.initrd uImage
+BOOT_TARGETS1 := zImage zImage.initrd uImage image.fit
BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.% uImage.%
PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2)
@@ -237,6 +237,7 @@ $(BOOT_TARGETS1): vmlinux
$(BOOT_TARGETS2): vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
+image.fit: dtbs
PHONY += bootwrapper_install
bootwrapper_install:
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 1ff6ad4f6cd27755ea7bfe5b02af4a47ca33cea7..e0c62ab1cc5af99e43f6639be11bf1c64d352db8 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -360,6 +360,9 @@ ifdef CONFIG_PPC32
image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot
endif
+# FIT support (generic)
+image-y += Image image.fit
+
# Allow extra targets to be added to the defconfig
image-y += $(CONFIG_EXTRA_TARGETS)
@@ -398,6 +401,14 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/dts/%.dtb FORCE
$(obj)/vmlinux.strip: vmlinux
$(STRIP) -s -R .comment $< -o $@
+OBJCOPYFLAGS += -O binary
+
+$(obj)/Image: vmlinux FORCE
+ $(call if_changed,objcopy)
+
+$(obj)/image.fit: $(obj)/Image $(obj)/dts/dtbs-list FORCE
+ $(call if_changed,fit)
+
$(obj)/uImage: vmlinux $(wrapperbits) FORCE
$(call if_changed,wrap,uboot)
--
2.45.2
Powered by blists - more mailing lists