diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2016-08-09 10:15:07 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:31:02 +0100 |
commit | 36f110594506fbee5dc18de3a04981f019f2024d (patch) | |
tree | e2b782764856da1033fff13fee9585766461aede /meta/recipes-bsp/u-boot | |
parent | c0efbcb47ab37c2d9c298fcd40ecaadd3ca050a7 (diff) | |
download | openembedded-core-36f110594506fbee5dc18de3a04981f019f2024d.tar.gz openembedded-core-36f110594506fbee5dc18de3a04981f019f2024d.tar.bz2 openembedded-core-36f110594506fbee5dc18de3a04981f019f2024d.zip |
u-boot.inc: Enable out-of-tree builds
This patch enabled out-of-tree builds for u-boot. This also helps building
u-boot using EXTERNALSRC flow
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-bsp/u-boot')
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index 1f64faa6f6..9e19c4f70f 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" SRC_URI = "git://git.denx.de/u-boot.git;branch=master" S = "${WORKDIR}/git" +B = "${WORKDIR}/build" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -88,12 +89,12 @@ do_compile () { j=$(expr $j + 1); if [ $j -eq $i ] then - oe_runmake O=${config} ${config} - oe_runmake O=${config} ${UBOOT_MAKE_TARGET} + oe_runmake -C ${S} O=${B}/${config} ${config} + oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} for binary in ${UBOOT_BINARIES}; do k=$(expr $k + 1); if [ $k -eq $i ]; then - cp ${S}/${config}/${binary} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} + cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} fi done unset k @@ -103,8 +104,8 @@ do_compile () { done unset i else - oe_runmake ${UBOOT_MACHINE} - oe_runmake ${UBOOT_MAKE_TARGET} + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} + oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} fi } @@ -119,7 +120,7 @@ do_install () { if [ $j -eq $i ] then install -d ${D}/boot - install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + install ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} fi @@ -129,7 +130,7 @@ do_install () { unset i else install -d ${D}/boot - install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + install ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} fi @@ -143,7 +144,7 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install ${S}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + install ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} fi @@ -152,7 +153,7 @@ do_install () { done unset i else - install ${S}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} + install ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} fi fi @@ -172,7 +173,7 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} + install ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} fi @@ -181,7 +182,7 @@ do_install () { done unset i else - install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + install ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} fi fi @@ -205,7 +206,7 @@ do_deploy () { if [ $j -eq $i ] then install -d ${DEPLOYDIR} - install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + install ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} cd ${DEPLOYDIR} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} @@ -218,7 +219,7 @@ do_deploy () { unset i else install -d ${DEPLOYDIR} - install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + install ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} cd ${DEPLOYDIR} rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} @@ -235,7 +236,7 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install ${S}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + install ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} @@ -246,7 +247,7 @@ do_deploy () { done unset i else - install ${S}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} + install ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} fi @@ -263,7 +264,7 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} + install ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} 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} @@ -275,7 +276,7 @@ do_deploy () { done unset i else - install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + install ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} |