All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address
@ 2023-04-13 10:31 Jamin Lin
  2023-04-13 10:31 ` [PATCH 1/2] kernel-fitimage: support 64 bits address Jamin Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jamin Lin @ 2023-04-13 10:31 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
2.17.1



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

* [PATCH 1/2] kernel-fitimage: support 64 bits address
  2023-04-13 10:31 [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address Jamin Lin
@ 2023-04-13 10:31 ` Jamin Lin
  2023-04-13 16:04   ` [OE-core] " Luca Ceresoli
  2023-04-13 10:31 ` [PATCH 2/2] uboot-sign: support 64bits address Jamin Lin
  2023-05-04 11:45 ` [OE-core] [PATCH 0/2] kernel-fitimage/uboot-sign: " Richard Purdie
  2 siblings, 1 reply; 7+ messages in thread
From: Jamin Lin @ 2023-04-13 10:31 UTC (permalink / raw)
  To: openembedded-core

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)

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 meta/classes-recipe/kernel-fitimage.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index b77747404f..d294f28d17 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
 }
 
-- 
2.17.1



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

* [PATCH 2/2] uboot-sign: support 64bits address
  2023-04-13 10:31 [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address Jamin Lin
  2023-04-13 10:31 ` [PATCH 1/2] kernel-fitimage: support 64 bits address Jamin Lin
@ 2023-04-13 10:31 ` Jamin Lin
  2023-05-04 11:45 ` [OE-core] [PATCH 0/2] kernel-fitimage/uboot-sign: " Richard Purdie
  2 siblings, 0 replies; 7+ messages in thread
From: Jamin Lin @ 2023-04-13 10:31 UTC (permalink / raw)
  To: openembedded-core

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)

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 meta/classes-recipe/uboot-sign.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index 3065c54577..ad04c82378 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -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 {
-- 
2.17.1



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

* Re: [OE-core] [PATCH 1/2] kernel-fitimage: support 64 bits address
  2023-04-13 10:31 ` [PATCH 1/2] kernel-fitimage: support 64 bits address Jamin Lin
@ 2023-04-13 16:04   ` Luca Ceresoli
  2023-04-14  2:06     ` Jamin Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2023-04-13 16:04 UTC (permalink / raw)
  To: Jamin Lin; +Cc: openembedded-core

Hello Jamin,

thank you for your contribution!

On Thu, 13 Apr 2023 18:31:08 +0800
"Jamin Lin" <jamin_lin@aspeedtech.com> wrote:

> 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)

This line should not be there. It looks like  you generated your patches
from a poky repository where this patch landed via combo-layers, but it
just doesn't make sense as an oe-core patch. Also, that SHA-1 does not
exist in the public oe-core repository.

I removed that line while applying the patch for testing, so you
don't need to resend for this time, but please make sure you generate
your patches from an oe-core repository in the future.

The same applies to patch 2/2.

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

* Re: [PATCH 1/2] kernel-fitimage: support 64 bits address
  2023-04-13 16:04   ` [OE-core] " Luca Ceresoli
@ 2023-04-14  2:06     ` Jamin Lin
  0 siblings, 0 replies; 7+ messages in thread
From: Jamin Lin @ 2023-04-14  2:06 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Thanks for your review and correct me.

I should create a patch based on an openembedded-core repository rather than a poky repository.

[-- Attachment #2: Type: text/html, Size: 295 bytes --]

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

* Re: [OE-core] [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address
  2023-04-13 10:31 [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address Jamin Lin
  2023-04-13 10:31 ` [PATCH 1/2] kernel-fitimage: support 64 bits address Jamin Lin
  2023-04-13 10:31 ` [PATCH 2/2] uboot-sign: support 64bits address Jamin Lin
@ 2023-05-04 11:45 ` Richard Purdie
  2 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2023-05-04 11:45 UTC (permalink / raw)
  To: Jamin Lin, openembedded-core

On Thu, 2023-04-13 at 18:31 +0800, Jamin Lin wrote:
> 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(-)

Since this adds new variables, could you send patches to the
documentation please to document them?

I did also wonder if there was some way we could combine and share some
of this fit image information since we appear to have two variables
with different names encoding the same info here :/. Maybe that is
something we could fix or improve in a later patch?

I'm kind of living in hope we can simplify some of these different
places to share code ultimately.

Cheers,

Richard


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

* [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address
@ 2023-04-13 10:11 jamin_lin
  0 siblings, 0 replies; 7+ messages in thread
From: jamin_lin @ 2023-04-13 10:11 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
2.17.1



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

end of thread, other threads:[~2023-05-04 11:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 10:31 [PATCH 0/2] kernel-fitimage/uboot-sign: support 64bits address Jamin Lin
2023-04-13 10:31 ` [PATCH 1/2] kernel-fitimage: support 64 bits address Jamin Lin
2023-04-13 16:04   ` [OE-core] " Luca Ceresoli
2023-04-14  2:06     ` Jamin Lin
2023-04-13 10:31 ` [PATCH 2/2] uboot-sign: support 64bits address Jamin Lin
2023-05-04 11:45 ` [OE-core] [PATCH 0/2] kernel-fitimage/uboot-sign: " Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2023-04-13 10:11 jamin_lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.