summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-10-21 22:07:27 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:45:41 +0000
commit941b6ce3b297ed83f1c05dd76bfeefbf93482e6f (patch)
tree804f8250a635c4694d3cae08ef5aa0ac9e017f4f /meta
parent0704f15d1ad7483f80ffa18fa32b6115923641cf (diff)
downloadopenembedded-core-941b6ce3b297ed83f1c05dd76bfeefbf93482e6f.tar.gz
openembedded-core-941b6ce3b297ed83f1c05dd76bfeefbf93482e6f.tar.bz2
openembedded-core-941b6ce3b297ed83f1c05dd76bfeefbf93482e6f.zip
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-fitimage.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 2934b3a31a..706beed82c 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -178,6 +178,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} {
@@ -187,8 +196,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}";
};