diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2016-10-21 22:07:27 +1000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 22:47:20 +0000 |
| commit | 492ee05c657790c9a1961d6727d7f6205f5c03af (patch) | |
| tree | b91ecf3b9b8a9583e026bbafbc04891930dae2e2 | |
| parent | 28ef841440bbd27fcf89b1f73a8c5f8e5591d30a (diff) | |
| download | poky-492ee05c657790c9a1961d6727d7f6205f5c03af.tar.gz | |
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)
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>
| -rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 13 |
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 | |||
| 178 | fitimage_emit_section_ramdisk() { | 178 | fitimage_emit_section_ramdisk() { |
| 179 | 179 | ||
| 180 | ramdisk_csum="sha1" | 180 | ramdisk_csum="sha1" |
| 181 | ramdisk_loadline="" | ||
| 182 | ramdisk_entryline="" | ||
| 183 | |||
| 184 | if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then | ||
| 185 | ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;" | ||
| 186 | fi | ||
| 187 | if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then | ||
| 188 | ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" | ||
| 189 | fi | ||
| 181 | 190 | ||
| 182 | cat << EOF >> ${1} | 191 | cat << EOF >> ${1} |
| 183 | ramdisk@${2} { | 192 | ramdisk@${2} { |
| @@ -187,8 +196,8 @@ fitimage_emit_section_ramdisk() { | |||
| 187 | arch = "${UBOOT_ARCH}"; | 196 | arch = "${UBOOT_ARCH}"; |
| 188 | os = "linux"; | 197 | os = "linux"; |
| 189 | compression = "none"; | 198 | compression = "none"; |
| 190 | load = <${UBOOT_RD_LOADADDRESS}>; | 199 | ${ramdisk_loadline} |
| 191 | entry = <${UBOOT_RD_ENTRYPOINT}>; | 200 | ${ramdisk_entryline} |
| 192 | hash@1 { | 201 | hash@1 { |
| 193 | algo = "${ramdisk_csum}"; | 202 | algo = "${ramdisk_csum}"; |
| 194 | }; | 203 | }; |
