Hi Nathan,

> -----Original Message-----
> From: Nathan Rossi [mailto:nat...@nathanrossi.com]
> Sent: Friday, December 02, 2016 7:11 AM
> To: Manjukumar Harthikote Matha
> Cc: meta-xilinx@yoctoproject.org
> Subject: Re: [meta-xilinx] [PATCH] arm-trusted-firmware_git.bb: Fix 
> out-of-tree build
>
> On 2 December 2016 at 06:45, Manjukumar Matha <manjukumar.harthikote-
> ma...@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() {

Why append?

> +       oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM}
> +RESET_TO_BL31=1 bl31

Thanks, this would be the right way to handle it.

Thanks
Manju
>  }
>
>  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-ma...@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@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-xilinx


This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.

-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to