summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorJamin Lin <jamin_lin@aspeedtech.com>2024-01-19 14:19:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-08 17:54:47 +0000
commita3c69c088eb627eec39280538a3bda2c203cfe20 (patch)
tree9547624de29ae5242d02420b487a020b5f0b5fc5 /meta/classes-recipe
parent20fd415a5ab26c30f604c97e8d26dc69706455ea (diff)
downloadpoky-a3c69c088eb627eec39280538a3bda2c203cfe20.tar.gz
uboot-sign: set load address and entrypoint
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. (From OE-Core rev: 2060691a56b45f746efdd04ccdae3fb74df60cb5) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/uboot-sign.bbclass7
1 files 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"
88# This is only necessary for determining the signing configuration 88# This is only necessary for determining the signing configuration
89KERNEL_PN = "${PREFERRED_PROVIDER_virtual/kernel}" 89KERNEL_PN = "${PREFERRED_PROVIDER_virtual/kernel}"
90 90
91UBOOT_FIT_UBOOT_LOADADDRESS ?= "${UBOOT_LOADADDRESS}"
92UBOOT_FIT_UBOOT_ENTRYPOINT ?= "${UBOOT_ENTRYPOINT}"
93
91python() { 94python() {
92 # We need u-boot-tools-native if we're creating a U-Boot fitImage 95 # We need u-boot-tools-native if we're creating a U-Boot fitImage
93 sign = d.getVar('UBOOT_SIGN_ENABLE') == '1' 96 sign = d.getVar('UBOOT_SIGN_ENABLE') == '1'
@@ -248,8 +251,8 @@ uboot_fitimage_assemble() {
248 os = "u-boot"; 251 os = "u-boot";
249 arch = "${UBOOT_ARCH}"; 252 arch = "${UBOOT_ARCH}";
250 compression = "none"; 253 compression = "none";
251 load = <${UBOOT_LOADADDRESS}>; 254 load = <${UBOOT_FIT_UBOOT_LOADADDRESS}>;
252 entry = <${UBOOT_ENTRYPOINT}>; 255 entry = <${UBOOT_FIT_UBOOT_ENTRYPOINT}>;
253EOF 256EOF
254 257
255 if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then 258 if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then