[OE-core] [PATCH] make-mod-scripts: Add nostamp flag on configure task

Bai, Haiqing Haiqing.Bai at windriver.com
Tue May 28 07:25:56 UTC 2019


Comments below, thanks your review.

-----Original Message-----
From: Richard Purdie [mailto:richard.purdie at linuxfoundation.org] 
Sent: 2019年5月25日 1:29
To: Bai, Haiqing; openembedded-core at lists.openembedded.org
Cc: Bruce Ashfield
Subject: Re: [OE-core] [PATCH] make-mod-scripts: Add nostamp flag on configure task

On Fri, 2019-05-24 at 13:49 +0800, Haiqing Bai wrote:
> Error appears while building out of tree kernel module
> after recompiling the kernel:
> bitbake -c cleanall/cleansstate virtual/kernel
> bitbake -c cleanall/cleansstate hello-mod
> bitbake virtual/kernel
> bitbake hello-mod
> 
> ERROR: Kernel configuration is invalid.
>        include/generated/autoconf.h or include/config/auto.conf are
> missing.
>        Run 'make oldconfig && make prepare' on kernel src to fix it.
> error: 'struct pt_regs' has no member named 'ds'; did you mean 'dx'?
> 
> make-mod-scripts must be forced to rebuild in this case to generate
> config data in 'kernel-build-artifacts/include/config'
> 
> Signed-off-by: Haiqing Bai <Haiqing.Bai at windriver.com>
> ---
>  meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-
> scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-
> scripts_1.0.bb
> index 97c58c5233..f55104070d 100644
> --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> @@ -12,6 +12,8 @@ S = "${WORKDIR}"
>  do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-
> native:do_populate_sysroot"
>  do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
>  
> +do_configure[nostamp] = "1"
> +
>  DEPENDS += "bc-native"
>  
>  EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}
> ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""

This sounds like a really bad idea and will make anything depending on
it rebuild in every build.
[hqbai:  Actually package 'make-mod-scripts' is a building tool needed only by external modules,  if 'anything'   your mean here is these external  modules,  then the answer is 'yes',
These external modules depend on 'make-mod-scripts.',   what's this package do is actually equal to  'make scripts'. 


We need to ensure that these clean commands are not cleaning things out
of the shared kernel directory that they don't own.
[hqbai: Since the shared directory is 'kernel-build-artifacts/include/config/xxx', kernel is the owner of folder but not these files,   I think it does not make sense for kernel to keeps these stuff when do  clean/cleanall ]

Cheers,

Richard



More information about the Openembedded-core mailing list