summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2024-02-02 16:12:06 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2024-02-04 22:18:26 +0100
commitd2be5e8d92708ef2c0fdcfa86c9d351556379537 (patch)
tree8777ac42b0ccedf9459ea8f97ed95284b5c1321b /scripts/lib
parent12cafdf4df8fbf127757805f7d4c65faa861bb98 (diff)
downloadptxdist-d2be5e8d92708ef2c0fdcfa86c9d351556379537.tar.gz
ptxdist-d2be5e8d92708ef2c0fdcfa86c9d351556379537.tar.xz
kernel-fit: Allow using 'kernel_noload' as sub-image type
Multi platform kernels built by the kernel-fit rule before are not usable in U-Boot, which adheres more strictly to the Flat Image Tree (FIT) spec than barebox does. For image sub-type 'kernel' U-Boot expects valid 'load' and 'entry' addresses. Setting those addresses to a generic value is impossible however for generic kernels, e.g. the DistroKit v7a kernel needs different addresses on at91 SAMA5 than on i.MX6. barebox circumvents this by ignoring missing 'load' and 'entry' addresses and finding a suitable address by itself. For using generic kernels in U-Boot you need sub-image type 'kernel_noload' and dummy addresses, which is also supported in barebox from v2024.01.0 release onwards. Link: https://github.com/open-source-firmware/flat-image-tree/releases/download/v0.8/fit-specification-v0.8.pdf Link: https://lore.barebox.org/barebox/20231129203106.2417486-1-a.fatoum@pengutronix.de/ Signed-off-by: Alexander Dahl <ada@thorsis.com> Message-Id: <20240202151209.2535721-3-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/ptxd_make_fit_image.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_fit_image.sh b/scripts/lib/ptxd_make_fit_image.sh
index dd0f63b7b..4b99e6fbf 100644
--- a/scripts/lib/ptxd_make_fit_image.sh
+++ b/scripts/lib/ptxd_make_fit_image.sh
@@ -19,20 +19,30 @@ ptxd_make_image_fit_its() {
kernel {
description = "kernel";
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
+ if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_NOLOAD)" ]; then
cat << EOF
- load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
+ type = "kernel_noload";
+ load = <0x00000000>;
+ entry = <0x00000000>;
EOF
- fi
- if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then
+ else
cat << EOF
+ type = "kernel";
+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
fi
cat << EOF
hash-1 {