All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make-mod-scripts: Add nostamp flag on configure task
@ 2019-05-24  5:49 Haiqing Bai
  2019-05-24 17:29 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Haiqing Bai @ 2019-05-24  5:49 UTC (permalink / raw)
  To: openembedded-core

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@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}""
-- 
2.13.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] make-mod-scripts: Add nostamp flag on configure task
  2019-05-24  5:49 [PATCH] make-mod-scripts: Add nostamp flag on configure task Haiqing Bai
@ 2019-05-24 17:29 ` Richard Purdie
  2019-05-28  7:25   ` Bai, Haiqing
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2019-05-24 17:29 UTC (permalink / raw)
  To: Haiqing Bai, openembedded-core

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@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.

We need to ensure that these clean commands are not cleaning things out
of the shared kernel directory that they don't own.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] make-mod-scripts: Add nostamp flag on configure task
  2019-05-24 17:29 ` Richard Purdie
@ 2019-05-28  7:25   ` Bai, Haiqing
  2019-05-29 12:25     ` richard.purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Bai, Haiqing @ 2019-05-28  7:25 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

Comments below, thanks your review.

-----Original Message-----
From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org] 
Sent: 2019年5月25日 1:29
To: Bai, Haiqing; openembedded-core@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@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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] make-mod-scripts: Add nostamp flag on configure task
  2019-05-28  7:25   ` Bai, Haiqing
@ 2019-05-29 12:25     ` richard.purdie
  0 siblings, 0 replies; 4+ messages in thread
From: richard.purdie @ 2019-05-29 12:25 UTC (permalink / raw)
  To: Bai, Haiqing, openembedded-core

On Tue, 2019-05-28 at 07:25 +0000, Bai, Haiqing wrote:
> On Fri, 2019-05-24 at 13:49 +0800, Haiqing Bai wrote:
> > Error appears while building out of tree kernel module
> > l/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'. 

Having all external kernel modules rebuild at every build is not an
acceptable solution.

> 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 ]

Only make-mod-scripts should be removing these files since its the one
that has added them.

We should not be running "make clean" in the kernel build tree in those
cases if its going to remove things it doesn't "own".

Cheers,

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-29 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  5:49 [PATCH] make-mod-scripts: Add nostamp flag on configure task Haiqing Bai
2019-05-24 17:29 ` Richard Purdie
2019-05-28  7:25   ` Bai, Haiqing
2019-05-29 12:25     ` richard.purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.