[OE-core] [PATCH 5/5] linux-yocto: warn when a generated BSP description is used

Ola X Nilsson ola.x.nilsson at axis.com
Thu Feb 26 07:21:50 UTC 2015


We use a custom yocto-style kernel recipe to build our non-yocto-style kernel.

To do this we add a defconfig file to the SRC_URI variable and then a bunch of scc files to the KERNEL_FEATURES variable.

I guess this makes our BSP description auto generated.  Can we have an option to turn the warning off?

-- 
Ola X Nilsson


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
> Of Bruce Ashfield
> Sent: den 20 februari 2015 19:38
> To: richard.purdie at linuxfoundation.org
> Cc: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH 5/5] linux-yocto: warn when a generated BSP
> description is used
> 
> The meta data (in tree or out of tree) that describes a BSP, its patches and
> configuration is not always available when a new/default or manually
> configured machine is built.
> 
> When this happens, the tools generate a skeleton BSP and use a architecture
> defconfig for the build. If this is by design, the build is typically sane and
> everything works fine. If an existing BSP description was expected, chances
> are that the resulting kernel will not be correct.
> 
> To avoid surprising the user when a default/skeleton BSP is used for the build,
> we can make it obvious to the user by emitting a warning like the following:
> 
>    WARNING: [kernel]: An auto generated BSP description was used, this
> normally indicates a misconfiguration.
>             Check that your machine (myqemux86-64) has an associated kernel
> description.
> 
> [YOCTO: #3383]
> 
> Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
> ---
>  meta/classes/kernel-yocto.bbclass | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-
> yocto.bbclass
> index 0cbbb5f2d22f..a5e2b180c496 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -281,6 +281,15 @@ python do_kernel_configcheck() {
>              with open (nonhw_file, "r") as myfile:
>                  results = myfile.read()
>                  bb.warn( "[kernel config]: BSP specified non-hw
> configuration:\n\n%s" % results)
> +
> +    bsp_desc = "${S}/" + kmeta + "/" + "top_tgt"
> +    if os.path.exists(bsp_desc):
> +        with open (bsp_desc, "r") as myfile:
> +                bsp_tgt = myfile.read()
> +                m = re.match("^(.*)scratch.obj(.*)$", bsp_tgt)
> +                if not m is None:
> +                    bb.warn( "[kernel]: An auto generated BSP description was used,
> this normally indicates a misconfiguration.\n" +
> +                             "Check that your machine (%s) has an
> + associated kernel description." % "${MACHINE}" )
>  }
> 
>  # Ensure that the branches (BSP and meta) are on the locations specified by
> --
> 2.1.0
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list