mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3] ptxd_make_fit_image: Add support for kernel load/entry addresses
@ 2020-11-16 11:41 avazquez.dev
  2020-11-27  8:39 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: avazquez.dev @ 2020-11-16 11:41 UTC (permalink / raw)
  To: ptxdist; +Cc: AVazquez

From: AVazquez <avazquez.dev@gmail.com>

Make it possible to specify load/entry addresses for the kernel.
These are required by the FIT image specification, but in some cases
users may not want to include them, so they are made optional.

Also add mandatory "os" property for kernel and ramdisk.

Signed-off-by: AVazquez <avazquez.dev@gmail.com>
---
Changes since v2:
- add help text.
- fix align problem.
Changes since v1:
- load/entry addresses made optional.

 platforms/kernel-fit.in            | 12 ++++++++++++
 scripts/lib/ptxd_make_fit_image.sh | 14 ++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
index 8cbc1a8..9585ce6 100644
--- a/platforms/kernel-fit.in
+++ b/platforms/kernel-fit.in
@@ -17,6 +17,18 @@ menuconfig KERNEL_FIT
 
 if KERNEL_FIT
 
+config KERNEL_FIT_LOAD
+	string
+	prompt "Kernel load address (optional)"
+	help
+	  Required by most bootloaders. Optional for Barebox.
+
+config KERNEL_FIT_ENTRY
+	string
+	prompt "Kernel entry address (optional)"
+	help
+	  Required by most bootloaders. Optional for Barebox.
+
 config KERNEL_FIT_SIGNED
 	bool
 	prompt "sign FIT image"
diff --git a/scripts/lib/ptxd_make_fit_image.sh b/scripts/lib/ptxd_make_fit_image.sh
index 9754d1e..af53566 100644
--- a/scripts/lib/ptxd_make_fit_image.sh
+++ b/scripts/lib/ptxd_make_fit_image.sh
@@ -21,7 +21,20 @@ ptxd_make_image_fit_its() {
 			data = /incbin/("${image_kernel}");
 			type = "kernel";
 			arch = "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)";
+			os = "linux";
 			compression = "none";
+EOF
+    if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)" ]; then
+        cat << EOF
+			load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
+EOF
+    fi
+    if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then
+        cat << EOF
+			entry = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>;
+EOF
+    fi
+    cat << EOF
 			hash-1 {
 				algo = "sha256";
 			};
@@ -33,6 +46,7 @@ EOF
 			description = "initramfs";
 			data = /incbin/("${image_initramfs}");
 			type = "ramdisk";
+			os = "linux";
 			compression = "none";
 			hash-1 {
 				algo = "sha256";
-- 
1.9.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-27  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 11:41 [ptxdist] [PATCH v3] ptxd_make_fit_image: Add support for kernel load/entry addresses avazquez.dev
2020-11-27  8:39 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox