Skip to contentSkip to conversation

kernel-fitimage/uboot-sign: support 64bits address

PATCH New [email protected] 1 participant 3 messages Apr 13, 2023

lore
Share & tools
lore
#0 lore raw

cover kernel-fitimage/uboot-sign: support 64bits address

v1:
kernel-fitimage.bbclass: allow users to change address-cells to support 64bits address
uboot-sign.bbclass: allow users to change address-cells to support 64bits address.

Jamin Lin (2):
kernel-fitimage: support 64 bits address
uboot-sign: support 64bits address

 meta/classes-recipe/kernel-fitimage.bbclass | 6 +++++-
 meta/classes-recipe/uboot-sign.bbclass      | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/2 kernel-fitimage: support 64 bits address

The default value of address-cells is "1", so the generated "its" file only supports 32bits address for kernel FIT image.
However, some platforms may want to support 64bits address
of UBOOT_LOADADDRESS and UBOOT_ENTRYPOINT.
Therefore, adds a variable to support both 64bits and 32bits address cells.

By default, the address-cell is "1" which is used for 32bits load address. If users would like to use 64bits load address, users are able to set as following for "0x400000000" 64bits load address.
1. FIT_ADDRESS_CELLS = "2"
2. UBOOT_LOADADDRESS= "0x04 0x00000000"

(From OE-Core rev: f79046d082f3a7752e6780b2990470dcd36cbba4)

---
 meta/classes-recipe/kernel-fitimage.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes-recipe/kernel-fitimage.bbclass +5 -1
index b77747404f..d294f28d17 100644
@@ -92,6 +92,10 @@ FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst
 # Allow user to select the default DTB for FIT image when multiple dtb's exists.
 FIT_CONF_DEFAULT_DTB ?= ""
 
+# length of address in number of <u32> cells
+# ex: 1 32bits address, 2 64bits address
+FIT_ADDRESS_CELLS ?= "1"
+
 # Keys used to sign individually image nodes.
 # The keys to sign image nodes must be different from those used to sign
 # configuration nodes, otherwise the "required" property, from
@@ -110,7 +114,7 @@ fitimage_emit_fit_header() {
 
 / {
         description = "${FIT_DESC}";
-        #address-cells = <1>;
+        #address-cells = <${FIT_ADDRESS_CELLS}>;
 EOF
 }
 
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 2/2 uboot-sign: support 64bits address

In reply to [email protected]

The default value of address-cells is "1", so the generated "its" file only support 32bits address for uboot FIT image.
However, some platforms may want to support 64bits address of UBOOT_LOADADDRESS and UBOOT_ENTRYPOINT.
Therefore, add variables to support both 64bits and 32bits address.

By default, the address-cell is 1 which is used for 32bits load address. If users would like to use 64bits load address,
users are able to set as following for "0x400000000" 64bits load address.
1. FIT_ADDRESS_CELLS = "2"
2. UBOOT_LOADADDRESS= "0x04 0x00000000"

(From OE-Core rev: f79046d082f3a7752e6780b2990470dcd36cbba4)

---
 meta/classes-recipe/uboot-sign.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes-recipe/uboot-sign.bbclass +5 -1
index 3065c54577..ad04c82378 100644
@@ -81,6 +81,10 @@ UBOOT_FIT_KEY_REQ_ARGS ?= "-batch -new"
 # Standard format for public key certificate
 UBOOT_FIT_KEY_SIGN_PKCS ?= "-x509"
 
+# length of address in number of <u32> cells
+# ex: 1 32bits address, 2 64bits address
+UBOOT_FIT_ADDRESS_CELLS ?= "1"
+
 # This is only necessary for determining the signing configuration
 KERNEL_PN = "${PREFERRED_PROVIDER_virtual/kernel}"
 
@@ -234,7 +238,7 @@ uboot_fitimage_assemble() {
 
 / {
     description = "${UBOOT_FIT_DESC}";
-    #address-cells = <1>;
+    #address-cells = <${UBOOT_FIT_ADDRESS_CELLS}>;
 
     images {
         uboot {
Signature · 1 line
2.17.1