Patchwork [meta-fsl-arm,1/2] image_types_fsl: Use explit task dependency to boost build

login
register
mail settings
Submitter Otavio Salvador
Date March 5, 2014, 9:09 p.m.
Message ID <1394053748-5611-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/68083/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - March 5, 2014, 9:09 p.m.
Instead of depending of all tasks of recipes, we should depend on the
required task so we can start building the rootfs earlier in the build
process and earn some build time gain.

Change-Id: I770afe79edba0320ae697f9bcdaf340fbcb09eeb
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 classes/image_types_fsl.bbclass | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
David Chirgwin - March 6, 2014, 9:14 a.m.
Hi there,
 
I have a customer who wants to add vivante support to an existing softfp rootfs (their own custom distro).
At the moment I have supplied them a Yocto distro as a proof-of-concept (based on Dora branch, using hardfp).
 
I have seen this post https://community.freescale.com/message/372390#372390 which tells me how to persuade Yocto to use softfp for compilation. But how would I tell Yocto I want the softfp versions of pre-compiled binaries (in particular the vivante drivers)?
 
Is there a setting in conf/local.conf, or do I need a new recipe or something else?
 
All comments very welcome.
 
DaveC


Blue Chip Technology Limited. Chowley Oak Lane, Tattenhall, Chester, Cheshire CH3 9EX Tel: 01829 772000 Registered in England 3110403 Vat No: GB 618 374134
Eric BENARD - March 6, 2014, 10:21 a.m.
Hi David,

Le Thu, 6 Mar 2014 09:14:38 +0000 (GMT),
David Chirgwin <dchirgwin@bluechiptechnology.co.uk> a écrit :
> I have a customer who wants to add vivante support to an existing softfp rootfs (their own custom distro).
> At the moment I have supplied them a Yocto distro as a proof-of-concept (based on Dora branch, using hardfp).
>  
> I have seen this post https://community.freescale.com/message/372390#372390 which tells me how to persuade Yocto to use softfp for compilation. But how would I tell Yocto I want the softfp versions of pre-compiled binaries (in particular the vivante drivers)?
>  
> Is there a setting in conf/local.conf, or do I need a new recipe or something else?
>  
that's handled in
meta-fsl-arm/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc :
# Skip package if it does not match the machine float-point type in use
python __anonymous () {
        is_machine_hardfp = base_contains("TUNE_FEATURES",
"callconvention-hard", True, False, d) is_package_hardfp =
d.getVar("PACKAGE_FP_TYPE", True) == "hardfp"

        if is_package_hardfp != is_machine_hardfp:
                PN = d.getVar("PN", True)
                PV = d.getVar("PV", True)
                bb.debug(1, "Skipping %s (%s) as machine and package
        float-point does not match" % (PN, PV)) raise
        bb.parse.SkipPackage("Package Float-Point is not compatible
        with the machine") }


Eric
Otavio Salvador - March 6, 2014, 12:33 p.m.
On Thu, Mar 6, 2014 at 6:14 AM, David Chirgwin
<dchirgwin@bluechiptechnology.co.uk> wrote:
> I have a customer who wants to add vivante support to an existing softfp rootfs (their own custom distro).
> At the moment I have supplied them a Yocto distro as a proof-of-concept (based on Dora branch, using hardfp).
>
> I have seen this post https://community.freescale.com/message/372390#372390 which tells me how to persuade Yocto to use softfp for compilation. But how would I tell Yocto I want the softfp versions of pre-compiled binaries (in particular the vivante drivers)?
>
> Is there a setting in conf/local.conf, or do I need a new recipe or something else?

If you use a Soft-FP build  it will do the right thing for you. Or it
is a bug ;-)
Daiane Angolini - March 6, 2014, 12:44 p.m.
> -----Original Message-----
> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
> bounces@yoctoproject.org] On Behalf Of Otavio Salvador
> Sent: Wednesday, March 05, 2014 6:09 PM
> To: meta-freescale Mailing List
> Cc: Otavio Salvador
> Subject: [meta-freescale] [meta-fsl-arm][PATCH 1/2] image_types_fsl: Use
> explit task dependency to boost build
> 
> Instead of depending of all tasks of recipes, we should depend on the
> required task so we can start building the rootfs earlier in the build
> process and earn some build time gain.

Cool!

Do you need help to test this?


Daiane
> 
> Change-Id: I770afe79edba0320ae697f9bcdaf340fbcb09eeb
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  classes/image_types_fsl.bbclass | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/classes/image_types_fsl.bbclass
> b/classes/image_types_fsl.bbclass index 47e8338..39ceb7a 100644
> --- a/classes/image_types_fsl.bbclass
> +++ b/classes/image_types_fsl.bbclass
> @@ -12,7 +12,9 @@ UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}"
>  #
> 
>  # IMX Bootlets Linux bootstream
> -IMAGE_DEPENDS_linux.sb = "elftosb-native imx-bootlets virtual/kernel"
> +IMAGE_DEPENDS_linux.sb = "elftosb-native:do_populate_sysroot \
> +                          imx-bootlets:do_deploy \
> +                          virtual/kernel:do_deploy"
>  IMAGE_LINK_NAME_linux.sb = ""
>  IMAGE_CMD_linux.sb () {
>  	kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-
> ${MACHINE}.bin`"
> @@ -37,7 +39,10 @@ IMAGE_CMD_linux.sb () {  }
> 
>  # IMX Bootlets barebox bootstream
> -IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native u-boot-mxsboot-
> native imx-bootlets barebox"
> +IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native:do_populate_sysroot
> \
> +                                        u-boot-mxsboot-
> native:do_populate_sysroot \
> +                                        imx-bootlets:do_deploy \
> +                                        barebox:do_deploy"
>  IMAGE_CMD_barebox.mxsboot-sdcard () {
>  	barebox_bd_file=imx-bootlets-barebox_ivt.bd-${MACHINE}
> 
> @@ -49,7 +54,8 @@ IMAGE_CMD_barebox.mxsboot-sdcard () {
> 
>  # U-Boot mxsboot generation to SD-Card
>  UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard"
> -IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native u-boot"
> +IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-
> native:do_populate_sysroot \
> +                                      u-boot:do_deploy"
>  IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-
> ${MACHINE}.${UBOOT_SUFFIX} \
> 
> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
> 
> @@ -65,8 +71,10 @@ BAREBOX_ENV_SPACE ?= "512"
>  # Set alignment to 4MB [in KiB]
>  IMAGE_ROOTFS_ALIGNMENT = "4096"
> 
> -IMAGE_DEPENDS_sdcard = "parted-native dosfstools-native mtools-native \
> -                        virtual/kernel ${IMAGE_BOOTLOADER}"
> +IMAGE_DEPENDS_sdcard = "parted-native:do_populate_sysroot \
> +                        dosfstools-native:do_populate_sysroot \
> +                        mtools-native:do_populate_sysroot \
> +                        virtual/kernel:do_deploy
> ${IMAGE_BOOTLOADER}:do_deploy"
> 
>  SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard"
> 
> --
> 1.9.0
> 
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
Otavio Salvador - March 6, 2014, 12:48 p.m.
On Thu, Mar 6, 2014 at 9:44 AM, Daiane.Angolini@freescale.com
<Daiane.Angolini@freescale.com> wrote:
>> -----Original Message-----
>> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
>> bounces@yoctoproject.org] On Behalf Of Otavio Salvador
>> Sent: Wednesday, March 05, 2014 6:09 PM
>> To: meta-freescale Mailing List
>> Cc: Otavio Salvador
>> Subject: [meta-freescale] [meta-fsl-arm][PATCH 1/2] image_types_fsl: Use
>> explit task dependency to boost build
>>
>> Instead of depending of all tasks of recipes, we should depend on the
>> required task so we can start building the rootfs earlier in the build
>> process and earn some build time gain.
>
> Cool!
>
> Do you need help to test this?

Testing is welcome. I am using it here and added it in the
autobuilder. So far, all seems to be working as expected.

Alexandre, could you try that at your side as well with barebox?
David Chirgwin - March 25, 2014, 12:29 p.m.
----- Original Message -----
> From: "Otavio Salvador" <otavio@ossystems.com.br>
> To: "David Chirgwin" <dchirgwin@bluechiptechnology.co.uk>
> Cc: "meta-freescale Mailing List" <meta-freescale@yoctoproject.org>
> Sent: Thursday, 6 March, 2014 12:33:58 PM
> Subject: Re: [meta-freescale] Vivante softfp with Yocto dora ??
> 
> On Thu, Mar 6, 2014 at 6:14 AM, David Chirgwin
> <dchirgwin@bluechiptechnology.co.uk> wrote:
> > I have a customer who wants to add vivante support to an existing
> > softfp rootfs (their own custom distro).
> > At the moment I have supplied them a Yocto distro as a
> > proof-of-concept (based on Dora branch, using hardfp).
> >
> > I have seen this post
> > https://community.freescale.com/message/372390#372390 which tells
> > me how to persuade Yocto to use softfp for compilation. But how
> > would I tell Yocto I want the softfp versions of pre-compiled
> > binaries (in particular the vivante drivers)?
> >
> > Is there a setting in conf/local.conf, or do I need a new recipe or
> > something else?
> 
> If you use a Soft-FP build  it will do the right thing for you. Or it
> is a bug ;-)

Thanks for this. 

I added this line to conf/local.conf :
 
DEFAULTTUNE_mx6 = "cortexa9-neon"

and it all worked after that. :-)

> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> 
Blue Chip Technology Limited. Chowley Oak Lane, Tattenhall, Chester, Cheshire CH3 9EX Tel: 01829 772000 Registered in England 3110403 Vat No: GB 618 374134
Alexandre Belloni - April 7, 2014, 10:11 p.m.
Hi,

On 06/03/2014 at 09:48:55 -0300, Otavio Salvador wrote :
> On Thu, Mar 6, 2014 at 9:44 AM, Daiane.Angolini@freescale.com
> <Daiane.Angolini@freescale.com> wrote:
> >> -----Original Message-----
> >> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
> >> bounces@yoctoproject.org] On Behalf Of Otavio Salvador
> >> Sent: Wednesday, March 05, 2014 6:09 PM
> >> To: meta-freescale Mailing List
> >> Cc: Otavio Salvador
> >> Subject: [meta-freescale] [meta-fsl-arm][PATCH 1/2] image_types_fsl: Use
> >> explit task dependency to boost build
> >>
> >> Instead of depending of all tasks of recipes, we should depend on the
> >> required task so we can start building the rootfs earlier in the build
> >> process and earn some build time gain.
> >
> > Cool!
> >
> > Do you need help to test this?
> 
> Testing is welcome. I am using it here and added it in the
> autobuilder. So far, all seems to be working as expected.
> 
> Alexandre, could you try that at your side as well with barebox?
> 

I'm probably one month late but I just realized I never replied but
this seems to be working fine :)

Patch

diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index 47e8338..39ceb7a 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -12,7 +12,9 @@  UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}"
 #
 
 # IMX Bootlets Linux bootstream
-IMAGE_DEPENDS_linux.sb = "elftosb-native imx-bootlets virtual/kernel"
+IMAGE_DEPENDS_linux.sb = "elftosb-native:do_populate_sysroot \
+                          imx-bootlets:do_deploy \
+                          virtual/kernel:do_deploy"
 IMAGE_LINK_NAME_linux.sb = ""
 IMAGE_CMD_linux.sb () {
 	kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
@@ -37,7 +39,10 @@  IMAGE_CMD_linux.sb () {
 }
 
 # IMX Bootlets barebox bootstream
-IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native u-boot-mxsboot-native imx-bootlets barebox"
+IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native:do_populate_sysroot \
+                                        u-boot-mxsboot-native:do_populate_sysroot \
+                                        imx-bootlets:do_deploy \
+                                        barebox:do_deploy"
 IMAGE_CMD_barebox.mxsboot-sdcard () {
 	barebox_bd_file=imx-bootlets-barebox_ivt.bd-${MACHINE}
 
@@ -49,7 +54,8 @@  IMAGE_CMD_barebox.mxsboot-sdcard () {
 
 # U-Boot mxsboot generation to SD-Card
 UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard"
-IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native u-boot"
+IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native:do_populate_sysroot \
+                                      u-boot:do_deploy"
 IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
                                              ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
 
@@ -65,8 +71,10 @@  BAREBOX_ENV_SPACE ?= "512"
 # Set alignment to 4MB [in KiB]
 IMAGE_ROOTFS_ALIGNMENT = "4096"
 
-IMAGE_DEPENDS_sdcard = "parted-native dosfstools-native mtools-native \
-                        virtual/kernel ${IMAGE_BOOTLOADER}"
+IMAGE_DEPENDS_sdcard = "parted-native:do_populate_sysroot \
+                        dosfstools-native:do_populate_sysroot \
+                        mtools-native:do_populate_sysroot \
+                        virtual/kernel:do_deploy ${IMAGE_BOOTLOADER}:do_deploy"
 
 SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard"