Patchwork kernel.bbclass: Preserve generated headers only if they exist

login
register
mail settings
Submitter Martin Jansa
Date Aug. 20, 2012, 11:19 a.m.
Message ID <1345461584-24086-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/34937/
State Accepted
Commit 9a83afe0794e96590aee374555efea91b3085b91
Headers show

Comments

Martin Jansa - Aug. 20, 2012, 11:19 a.m.
* I have 2.6.37 kernel without this directory and do_install now fails
  after 813256bf7bb6e26d542d5f769e2802564116ebe5

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Saul Wold - Aug. 20, 2012, 5:28 p.m.
On 08/20/2012 04:19 AM, Martin Jansa wrote:
> * I have 2.6.37 kernel without this directory and do_install now fails
>    after 813256bf7bb6e26d542d5f769e2802564116ebe5
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>   meta/classes/kernel.bbclass |    6 ++++--
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index b24ab1a..f34e632 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -191,8 +191,10 @@ 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 [ -d arch/${ARCH}/include/generated ]; then
> +		mkdir -p $kerneldir/arch/${ARCH}/include/generated/
> +		cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
> +	fi
>
>   	# Remove the following binaries which cause strip or arch QA errors
>   	# during do_package for cross-compiled platforms
>

Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b24ab1a..f34e632 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -191,8 +191,10 @@  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 [ -d arch/${ARCH}/include/generated ]; then
+		mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+		cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
+	fi
 
 	# Remove the following binaries which cause strip or arch QA errors
 	# during do_package for cross-compiled platforms