diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-03-25 19:07:12 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-26 22:49:36 +0000 |
commit | eb90d1c8fc7b82ca2593185930b3bf175f40ae13 (patch) | |
tree | ab3e987f0fa825da455317b80d119dfc0fe75c9b /meta/recipes-bsp/u-boot/u-boot.inc | |
parent | f7d52d12f943b9e1f79b32758308607036d6a760 (diff) | |
download | openembedded-core-eb90d1c8fc7b82ca2593185930b3bf175f40ae13.tar.gz openembedded-core-eb90d1c8fc7b82ca2593185930b3bf175f40ae13.tar.bz2 openembedded-core-eb90d1c8fc7b82ca2593185930b3bf175f40ae13.zip |
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.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/u-boot/u-boot.inc')
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 21 |
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}" # deploy directory. For those versions they can set the following variables # to allow packaging the SPL. SPL_BINARY ?= "" -SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" -SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}" +SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY", True))}" +SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" +SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" # Additional environment variables or a script can be installed alongside # u-boot to be used automatically on boot. This file, typically 'uEnv.txt' @@ -166,8 +167,8 @@ do_install () { if [ $j -eq $i ] then install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} fi done unset j @@ -175,7 +176,7 @@ do_install () { unset i else install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} fi fi @@ -257,9 +258,9 @@ do_deploy () { if [ $j -eq $i ] then install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} - rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} fi @@ -269,8 +270,8 @@ do_deploy () { unset i else install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} fi fi |