[PATCH 20/22] ARM: k3: BeaglePlay: generate FIT image

Sascha Hauer s.hauer at pengutronix.de
Thu Aug 3 03:50:01 PDT 2023


The K3 SoCs are currently not fully bareboxified, we still need
U-Boot to bring up the SoC. Only the last stage, u-boot.img can be
replaced by barebox. Create a FIT image to generate an image
suitable for replacing u-boot.img.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 images/Makefile                |  9 +++++++++
 images/Makefile.k3             |  4 ++++
 images/k3-am625-beagleplay.its | 29 +++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 images/k3-am625-beagleplay.its

diff --git a/images/Makefile b/images/Makefile
index d8cb45dbc0..84ad79698a 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -111,6 +111,15 @@ $(obj)/%.pblb: $(obj)/%.pbl FORCE
 $(obj)/%.s: $(obj)/% FORCE
 	$(call if_changed,disasm)
 
+quiet_cmd_fit = FIT     $@
+cmd_fit = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) \
+	-D'$(subst -,_,$(*F))_dts=1' $(foreach f,$< $(2),-include '$(f)') /dev/null ; \
+	mkimage -f $(dtc-tmp) $@ -E \
+	cat $(depfile).pre $(depfile).dtc > $(depfile)
+
+$(obj)/%.fit: $(obj)/%.its FORCE
+	$(call if_changed,fit)
+
 $(obj)/piggy.o: $(obj)/barebox.z FORCE
 
 $(obj)/sha_sum.o: $(obj)/barebox.sha.bin FORCE
diff --git a/images/Makefile.k3 b/images/Makefile.k3
index 55d2e7ceeb..f7acd78014 100644
--- a/images/Makefile.k3
+++ b/images/Makefile.k3
@@ -7,3 +7,7 @@ pblb-$(CONFIG_MACH_BEAGLEPLAY) += start_beagleplay
 FILE_barebox-beagleplay.img = start_beagleplay.pblb
 image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay.img
 
+$(obj)/k3-am625-beagleplay.fit: $(obj)/barebox-beagleplay.img
+FILE_barebox-beagleplay-fit.img = k3-am625-beagleplay.fit
+image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay-fit.img
+
diff --git a/images/k3-am625-beagleplay.its b/images/k3-am625-beagleplay.its
new file mode 100644
index 0000000000..987d4d1660
--- /dev/null
+++ b/images/k3-am625-beagleplay.its
@@ -0,0 +1,29 @@
+
+/dts-v1/;
+
+/ {
+	description = "barebox for BeaglePlay board";
+
+	images {
+		barebox {
+			description = "barebox for BeaglePlay board";
+			type = "firmware";
+			os = "linux";
+			arch = "arm";
+			compression = "none";
+			load = <0x80800000>;
+			entry = <0x80800000>;
+			data = /incbin/("barebox-beagleplay.img");
+		};
+	};
+
+	configurations {
+		default = "conf-0";
+
+		conf-0 {
+			description = "barebox for BeaglePlay board";
+			firmware = "barebox";
+			loadables = "barebox";
+		};
+	};
+};
-- 
2.39.2




More information about the barebox mailing list