summaryrefslogtreecommitdiff
path: root/import-layers
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-10-21 15:07:27 +0300
committerPatrick Williams <patrick@stwcx.xyz>2017-01-25 06:57:52 +0300
commitb4a4dc0de8b301a2970d8ad2f79297becec7816e (patch)
treee04942d34021ff556e5080e24e4ba0a925e204c9 /import-layers
parentd5d32a416a00ac7448e2e9db36c79e3d9b1cb58e (diff)
downloadopenbmc-b4a4dc0de8b301a2970d8ad2f79297becec7816e.tar.xz
kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks
Allow the load and entry addresses to remain unset if the UBOOT_RD_* variables are also unset for ramdisk entries in the image tree. This allows for U-Boot to decide dynamically where to load the ramdisk. (From OE-Core rev: 941b6ce3b297ed83f1c05dd76bfeefbf93482e6f) Change-Id: I2c9fc1044080148bd6d4e955e732eced87855b5e Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Rick Altherr <raltherr@google.com> (cherry picked from commit 492ee05c657790c9a1961d6727d7f6205f5c03af)
Diffstat (limited to 'import-layers')
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
index 95a134437..3d1f85588 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
@@ -140,6 +140,15 @@ EOF
fitimage_emit_section_ramdisk() {
ramdisk_csum="sha1"
+ ramdisk_loadline=""
+ ramdisk_entryline=""
+
+ if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
+ ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
+ fi
+ if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
+ ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
+ fi
cat << EOF >> ${1}
ramdisk@${2} {
@@ -149,8 +158,8 @@ fitimage_emit_section_ramdisk() {
arch = "${UBOOT_ARCH}";
os = "linux";
compression = "none";
- load = <${UBOOT_RD_LOADADDRESS}>;
- entry = <${UBOOT_RD_ENTRYPOINT}>;
+ ${ramdisk_loadline}
+ ${ramdisk_entryline}
hash@1 {
algo = "${ramdisk_csum}";
};