public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Jamin Lin <jamin_lin@aspeedtech.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH v2 1/4] uboot-sign: set load address and entrypoint
Date: Fri, 19 Jan 2024 14:19:34 +0800	[thread overview]
Message-ID: <20240119061937.1368163-1-jamin_lin@aspeedtech.com> (raw)

According to the design of uboot-sign.bbclass and kernel-fitimage.bbclass,
both of them use an UBOOT_LOADADDRESS variable to set the load address of
kernel and u-boot image and use an UBOOT_ENTRYPOINT variable to set the entry address of
kernel and u-boot image.

However, users may want to set the different load address of u-boot
and kernel image. Therefore, adds UBOOT_FIT_UBOOT_LOADADDRESS
and UBOOT_FIT_UBOOT_ENTRYPOINT variables to set the
load address and entry point of u-boot image, respectively.

The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_LOADADDRESS by default.
The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_ENTRYPOINT by default.

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

diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index ad04c82378..abde0bc61c 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -88,6 +88,9 @@ UBOOT_FIT_ADDRESS_CELLS ?= "1"
 # This is only necessary for determining the signing configuration
 KERNEL_PN = "${PREFERRED_PROVIDER_virtual/kernel}"
 
+UBOOT_FIT_UBOOT_LOADADDRESS ?= "${UBOOT_LOADADDRESS}"
+UBOOT_FIT_UBOOT_ENTRYPOINT ?= "${UBOOT_ENTRYPOINT}"
+
 python() {
     # We need u-boot-tools-native if we're creating a U-Boot fitImage
     sign = d.getVar('UBOOT_SIGN_ENABLE') == '1'
@@ -248,8 +251,8 @@ uboot_fitimage_assemble() {
             os = "u-boot";
             arch = "${UBOOT_ARCH}";
             compression = "none";
-            load = <${UBOOT_LOADADDRESS}>;
-            entry = <${UBOOT_ENTRYPOINT}>;
+            load = <${UBOOT_FIT_UBOOT_LOADADDRESS}>;
+            entry = <${UBOOT_FIT_UBOOT_ENTRYPOINT}>;
 EOF
 
 	if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then
-- 
2.25.1



             reply	other threads:[~2024-01-19  6:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  6:19 Jamin Lin [this message]
2024-01-19  6:19 ` [PATCH v2 2/4] uboot-sign: Fix to install nonexistent dtb file Jamin Lin
2024-01-19  6:19 ` [PATCH v2 3/4] u-boot-sign:uboot-config: support to verify signed FIT image Jamin Lin
2024-01-19  6:19 ` [PATCH v2 4/4] uboot-sign: support to load optee-os and TFA images Jamin Lin
2024-01-26 17:05   ` [OE-core] " Richard Purdie
2024-01-31  8:54     ` Jamin Lin
2024-01-31 13:26       ` Richard Purdie
2024-02-01  2:00         ` Jamin Lin
2024-02-08 18:02           ` Ross Burton
2024-02-15  2:31             ` Jamin Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240119061937.1368163-1-jamin_lin@aspeedtech.com \
    --to=jamin_lin@aspeedtech.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox