Skip to contentSkip to conversation

kernel.bbclass: Preserve generated headers

PATCH Applied Khem Raj 4 participants 10 messages Jul 31, 2012 – Aug 20, 2012

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 kernel.bbclass: Preserve generated headers

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +2 -0
index b19ed4c..4ac3d48 100644
@@ -197,6 +197,8 @@ kernel_do_install() {
 	if [ -f include/generated/bounds.h ]; then
 		cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
 	fi
+	mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+	cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 
 	# Remove the following binaries which cause strip or arch QA errors
 	# during do_package for cross-compiled platforms
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 21 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644

meta/classes/kernel.bbclass kernel_do_install() { · line 201

Quoted 5 lines
meta/classes/kernel.bbclass +2 -0
@@ -197,6 +197,8 @@ kernel_do_install() {
        if [ -f include/generated/bounds.h ]; then
                cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
        fi
+       mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+       cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/

If we take the blanket protection, we should be able to drop the bounds.h specific
case a the same time .. right ?

I'm ok with this, but I can run a test with 'make modules_prepare' being run if you
already haven't.

Cheers,

Bruce

Quoted 11 lines
meta/classes/kernel.bbclass +0 -1
        # Remove the following binaries which cause strip or arch QA errors
        # during do_package for cross-compiled platforms
--

1.7.5.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#5 lore raw
In reply to Khem Raj
Quoted 10 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

There just doesn't seem to be a good way to do what we need to do here. modules_prepare will build scripts, which we don't want, but clean kills all the generated files.

This sounds like a good Linux kernel bug for us to to take a look at fixing upstream:

make modules_prepare_cross

or something simlar, so we can get what we need with proper make targets and avoid this constant cherry picking of files.

Quoted 11 lines
---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644

meta/classes/kernel.bbclass kernel_do_install() { · line 201

Quoted 5 lines
meta/classes/kernel.bbclass +2 -0
@@ -197,6 +197,8 @@ kernel_do_install() {
 	if [ -f include/generated/bounds.h ]; then
 		cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
 	fi
+	mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+	cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/

Do you need all the generated files in arch/$ARCH/include/generated? Are there any binaries in there?

Quoted 4 lines
meta/classes/kernel.bbclass +0 -0
 	# Remove the following binaries which cause strip or arch QA errors
 	# during do_package for cross-compiled platforms
 
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#2 lore raw
In reply to Bruce Ashfield
Quoted 17 lines · Bruce Ashfield
Quoted 16 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 14 lines

meta/classes/kernel.bbclass kernel_do_install() { · line 201

Quoted 10 lines
meta/classes/kernel.bbclass +2 -0
index b19ed4c..4ac3d48 100644
@@ -197,6 +197,8 @@ kernel_do_install() {
        if [ -f include/generated/bounds.h ]; then
                cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
        fi
+       mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+       cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/

If we take the blanket protection, we should be able to drop the bounds.h specific
case a the same time .. right ?

No, different dirs (one is ARCH)

Quoted 4 lines

I'm ok with this, but I can run a test with 'make modules_prepare' being run if you
already haven't.

We really can't, this builds scripts, which we don't want as this results in native binaries being installed on the target :(

We need some cross-build-system-friendly make targets for this.

Quoted 19 lines

Cheers,

Bruce

Quoted 11 lines
meta/classes/kernel.bbclass +0 -1
        # Remove the following binaries which cause strip or arch QA errors
        # during do_package for cross-compiled platforms
--

1.7.5.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#3 lore raw
Quoted 35 lines · Darren Hart
Quoted 17 lines · Bruce Ashfield
Quoted 16 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 14 lines

meta/classes/kernel.bbclass kernel_do_install() { · line 201

Quoted 10 lines
meta/classes/kernel.bbclass +2 -0
index b19ed4c..4ac3d48 100644
@@ -197,6 +197,8 @@ kernel_do_install() {
        if [ -f include/generated/bounds.h ]; then
                cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
        fi
+       mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+       cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/

If we take the blanket protection, we should be able to drop the bounds.h specific
case a the same time .. right ?

Quoted 1 line

No, different dirs (one is ARCH)

Aha. I missed that, but can we back up a directory and take everything from generated/* ? .. assuming your question about binaries being in those directory is "no".

Cheers,

Bruce

Quoted 35 lines
Quoted 5 lines

I'm ok with this, but I can run a test with 'make modules_prepare' being run if you
already haven't.

We really can't, this builds scripts, which we don't want as this results in native binaries being installed on the target :(

We need some cross-build-system-friendly make targets for this.

Quoted 19 lines

Cheers,

Bruce

Quoted 11 lines
meta/classes/kernel.bbclass +0 -1
        # Remove the following binaries which cause strip or arch QA errors
        # during do_package for cross-compiled platforms
--

1.7.5.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#4 lore raw
Quoted 36 lines · Bruce Ashfield
Quoted 35 lines · Darren Hart
Quoted 31 lines · Bruce Ashfield
Quoted 21 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644

meta/classes/kernel.bbclass kernel_do_install() { · line 201

Quoted 5 lines
meta/classes/kernel.bbclass +2 -0
@@ -197,6 +197,8 @@ kernel_do_install() {
        if [ -f include/generated/bounds.h ]; then
                cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
        fi
+       mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+       cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/

If we take the blanket protection, we should be able to drop the bounds.h specific
case a the same time .. right ?

Quoted 5 lines
Quoted 1 line

No, different dirs (one is ARCH)

Aha. I missed that, but can we back up a directory and take everything from generated/* ? .. assuming your question about binaries being in those directory is "no".

It isn't a "no" for the include/generated dir, just not sure about ARCH.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
author
#6 lore raw
In reply to Khem Raj

ping

Quoted 32 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
 meta/classes/kernel.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +2 -1
index b19ed4c..4ac3d48 100644
@@ -197,6 +197,8 @@ kernel_do_install() {
        if [ -f include/generated/bounds.h ]; then
                cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
        fi
+       mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+       cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 
        # Remove the following binaries which cause strip or arch QA errors
        # during do_package for cross-compiled platforms
--

1.7.5.4

Applied
#7 lore raw
In reply to Khem Raj
Quoted 22 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
  meta/classes/kernel.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644

meta/classes/kernel.bbclass kernel_do_install() { · line 204

Quoted 8 lines
meta/classes/kernel.bbclass +2 -0
@@ -197,6 +197,8 @@ kernel_do_install() {
  	if [ -f include/generated/bounds.h ]; then
  		cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
  	fi
+	mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+	cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 
  	# Remove the following binaries which cause strip or arch QA errors
  	# during do_package for cross-compiled platforms

Merged into OE-Core

Thanks
Sau!

#8 lore raw
Quoted 30 lines · Saul Wold
Quoted 29 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
  meta/classes/kernel.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644
@@ -197,6 +197,8 @@ kernel_do_install() {
      if [ -f include/generated/bounds.h ]; then
          cp include/generated/bounds.h

$kerneldir/include/generated/bounds.h
fi

meta/classes/kernel.bbclass +2 -0
+    mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+    cp -fR arch/${ARCH}/include/generated/*

$kerneldir/arch/${ARCH}/include/generated/

Quoted 5 lines
Quoted 3 lines

# Remove the following binaries which cause strip or arch QA errors # during do_package for cross-compiled platforms

Merged into OE-Core

Oops not yet! I was scanning the wrong list!

Sorry
Sau!

Quoted 9 lines

Thanks
Sau!

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Applied
#9 lore raw
In reply to Khem Raj
Quoted 22 lines · Khem Raj

asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in
a shape to build modules but it does not.

Probably we should run make modules_prepare after having run make clean.

---
  meta/classes/kernel.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/kernel.bbclass +0 -0
index b19ed4c..4ac3d48 100644

meta/classes/kernel.bbclass kernel_do_install() { · line 204

Quoted 8 lines
meta/classes/kernel.bbclass +2 -0
@@ -197,6 +197,8 @@ kernel_do_install() {
  	if [ -f include/generated/bounds.h ]; then
  		cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
  	fi
+	mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+	cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 
  	# Remove the following binaries which cause strip or arch QA errors
  	# during do_package for cross-compiled platforms

Merged into OE-Core

Thanks
Sau!