[meta-freescale] [meta-fsl-ppc][PATCH] linux-qoriq: fix building using out-of-tree

Bob Cochran yocto at mindchasers.com
Thu Jan 8 21:37:52 PST 2015


On 01/04/2015 10:37 PM, ting.liu at freescale.com wrote:
> From: Ting Liu <ting.liu at freescale.com>
>
> Signed-off-by: Ting Liu <ting.liu at freescale.com>
> ---
>   recipes-kernel/linux/linux-qoriq.inc | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc
> index 9e463dd..a832b46 100644
> --- a/recipes-kernel/linux/linux-qoriq.inc
> +++ b/recipes-kernel/linux/linux-qoriq.inc
> @@ -36,8 +36,8 @@ do_configure_prepend() {
>               if [ -n "${SDK_VERSION}" ]; then
>                   sdkversion="-${SDK_VERSION}"
>               fi
> -            head=`git rev-parse --verify --short HEAD 2> /dev/null`
> -            printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
> +            head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
> +            printf "%s%s%s" $sdkversion +g $head > ${B}/.scmversion
>       fi
>   }
>
>


Hi Ting,

I'm having a problem forcing a compile after allowing the kernel to 
finish baking all the way.

The problem that I see is that

$ bitbake virtual/kernel -c compile -f

will fail due to the sysroot not being clean (e.g., having a .config 
file under usr/src/kernel

It seems that do_populate_sysroot is being called when I initially bake 
the kernel ($ bitbake virtual/kernel), and this task copies the .config 
file into the sysroot.

Below is a log of the error I see when I try forcing a compile (note the 
prepare3 error, which alerted me to the problem of having a .config file 
present.

| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 uImage CC=powerpc64-poky-linux-gcc 
--sysroot=/build/yocto/t1040_1/tmp/sysroots/t1040rdb-64b 
LD=powerpc64-poky-linux-ld.bfd 
--sysroot=/build/yocto/t1040_1/tmp/sysroots/t1040rdb-64b
|   CHK     include/config/kernel.release
|   GEN 
/build/yocto/t1040_1/tmp/work/t1040rdb_64b-poky-linux/linux-qoriq/3.12-r0/build/Makefile
|   CHK     include/generated/uapi/linux/version.h
|   Using /build/yocto/t1040_1/tmp/sysroots/t1040rdb-64b/usr/src/kernel 
as source for kernel
|   /build/yocto/t1040_1/tmp/sysroots/t1040rdb-64b/usr/src/kernel is not 
clean, please run 'make mrproper'
|   in the 
'/build/yocto/t1040_1/tmp/sysroots/t1040rdb-64b/usr/src/kernel' directory.
|   CHK     include/generated/utsrelease.h
| make[2]: *** [prepare3] Error 1
| make[2]: *** Waiting for unfinished jobs....
|   CC      scripts/mod/empty.o
|   CC      scripts/mod/devicetable-offsets.s
|   MKELF   scripts/mod/elfconfig.h
|   HOSTCC  scripts/mod/modpost.o
|   HOSTCC  scripts/mod/sumversion.o
|   GEN     scripts/mod/devicetable-offsets.h
|   HOSTCC  scripts/mod/file2alias.o
|   HOSTLD  scripts/mod/modpost
| make[1]: *** [sub-make] Error 2
| make: *** [all] Error 2
| ERROR: oe_runmake failed


If I manually rm .config and include/config in my sysroot, I can then 
force a recompile.

Thanks

Bob






More information about the meta-freescale mailing list