[meta-xilinx] [PATCH] arm-trusted-firmware_git.bb: Fix out-of-tree build

Nathan Rossi nathan at nathanrossi.com
Fri Dec 2 07:10:58 PST 2016


On 2 December 2016 at 06:45, Manjukumar Matha
<manjukumar.harthikote-matha at xilinx.com> wrote:
> This patch enabled out-of-tree build for arm-trusted-firmware. This also
> enables EXTERNALSRC builds for ATF

This does not appear to fix the out-of-tree building problem, it just
enforces that B = S at the make execution level. By default recipes
already have B = S, making this change redundant.

You can use EXTERNALSRC_BUILD = "<foo>" to ensure your B = S when
using externalsrc.

It appears though that arm-trusted-firmware makefile can build
out-of-tree if the make variable 'BUILD_BASE' was set to B when
calling the atf makefile. With just some quick testing, the following
appeared to work.

diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
index 4cd9cf3f7f..47c2ae2200 100644
--- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
+++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
@@ -10,6 +10,7 @@ inherit deploy
 DEPENDS += "u-boot-mkimage-native"

 S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"

 BRANCH = "master"
 SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}"
@@ -35,15 +36,15 @@ do_configure() {
        :
 }

-do_compile() {
-       oe_runmake PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
+do_compile_append() {
+       oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
 }

 do_install() {
        :
 }

-OUTPUT_DIR = "${S}/build/${PLATFORM}/release"
+OUTPUT_DIR = "${B}/${PLATFORM}/release"

 do_deploy() {
        install -d ${DEPLOYDIR}

Regards,
Nathan

>
> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
> ---
>  recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
> index 4cd9cf3..0a4e55a 100644
> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb
> @@ -36,7 +36,7 @@ do_configure() {
>  }
>
>  do_compile() {
> -       oe_runmake PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
> +       oe_runmake -C ${S} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
>  }
>
>  do_install() {
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx



More information about the meta-xilinx mailing list