summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-03-25 19:07:12 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 15:55:48 +0100
commitc6ab82882cd49be5510d1f8c967d0dc2da2490c2 (patch)
tree5623f195dd52710451dcc060f4d506c2a746c894 /meta
parentddedab4d1d6d14cd08a0b084a2da705ef3c191e7 (diff)
downloadpoky-c6ab82882cd49be5510d1f8c967d0dc2da2490c2.tar.gz
u-boot.inc: Add sub-dir support for SPL_BINARY
Add support for the SPL_BINARY variable to handle sub directories. In some cases the SPL binary that needs to be deployed is only built to the spl/ directory in U-Boot. So that a sub directory can be specified in the SPL_BINARY variable, handle the case so that the deploy code uses the basename of the path specified in SPL_BINARY. (From OE-Core rev: eb90d1c8fc7b82ca2593185930b3bf175f40ae13) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc21
1 files changed, 11 insertions, 10 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 48be71d2ef..3ba866de01 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -50,8 +50,9 @@ UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
50# deploy directory. For those versions they can set the following variables 50# deploy directory. For those versions they can set the following variables
51# to allow packaging the SPL. 51# to allow packaging the SPL.
52SPL_BINARY ?= "" 52SPL_BINARY ?= ""
53SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" 53SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY", True))}"
54SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}" 54SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
55SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
55 56
56# Additional environment variables or a script can be installed alongside 57# Additional environment variables or a script can be installed alongside
57# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' 58# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
@@ -166,8 +167,8 @@ do_install () {
166 if [ $j -eq $i ] 167 if [ $j -eq $i ]
167 then 168 then
168 install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} 169 install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
169 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type} 170 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type}
170 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY} 171 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}
171 fi 172 fi
172 done 173 done
173 unset j 174 unset j
@@ -175,7 +176,7 @@ do_install () {
175 unset i 176 unset i
176 else 177 else
177 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} 178 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
178 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} 179 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME}
179 fi 180 fi
180 fi 181 fi
181 182
@@ -257,9 +258,9 @@ do_deploy () {
257 if [ $j -eq $i ] 258 if [ $j -eq $i ]
258 then 259 then
259 install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} 260 install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
260 rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} 261 rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
261 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type} 262 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
262 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY} 263 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
263 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} 264 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
264 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} 265 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
265 fi 266 fi
@@ -269,8 +270,8 @@ do_deploy () {
269 unset i 270 unset i
270 else 271 else
271 install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} 272 install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
272 rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK} 273 rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
273 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} 274 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
274 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} 275 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
275 fi 276 fi
276 fi 277 fi