Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] kernel.bbclass: Make tree available for cross building external modules
Date: Thu, 19 Jul 2012 09:51:00 +0200	[thread overview]
Message-ID: <20120719075100.GD3331@jama.jama.net> (raw)
In-Reply-To: <1341940070-27715-2-git-send-email-raj.khem@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3137 bytes --]

On Tue, Jul 10, 2012 at 10:07:50AM -0700, Khem Raj wrote:
> We shave too much from kernel sources for making it work
> for on device external kernel module development that cross
> development of external modules wont work from same tree
> anymore. This patch makes a copy of tree which will eventually
> be staged for building external modules

Does this solve also this issue?
http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-July/040584.html

Cheers,

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/kernel.bbclass |   15 +++++++++++++--
>  1 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 81c334b..b2b6fcd 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -80,6 +80,7 @@ KERNEL_ALT_IMAGETYPE ??= ""
>  # Define where the kernel headers are installed on the target as well as where
>  # they are staged.
>  KERNEL_SRC_PATH = "/usr/src/kernel"
> +UNPRUNED_KERNEL_SRC_PATH = "/usr/src/kernel-unpruned"
>  
>  KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
>  
> @@ -135,7 +136,9 @@ kernel_do_install() {
>  	# kernel source tree.
>  	#
>  	kerneldir=${D}${KERNEL_SRC_PATH}
> +	unrprunedkerneldir=${D}${UNPRUNED_KERNEL_SRC_PATH}
>  	install -d $kerneldir
> +	install -d $unrprunedkerneldir
>  
>  	#
>  	# Store the kernel version in sysroots for module-base.bbclass
> @@ -176,7 +179,6 @@ kernel_do_install() {
>  	# and include files.
>  	#
>  	oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
> -	make -C $kerneldir _mrproper_scripts
>  	find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
>  	find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
>  
> @@ -186,6 +188,9 @@ kernel_do_install() {
>  	if [ ${ARCH} = "powerpc" ]; then
>  		cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
>  	fi
> +	# make a copy of unpruned kernel tree
> +	cp -fR $kerneldir/* $unrprunedkerneldir
> +	make -C $kerneldir _mrproper_scripts
>  
>  	# Remove the following binaries which cause strip or arch QA errors
>  	# during do_package for cross-compiled platforms
> @@ -197,8 +202,14 @@ kernel_do_install() {
>  	done
>  }
>  
> +PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
> +
> +kernel_package_preprocess () {
> +	rm -rf ${PKGD}/${UNPRUNED_KERNEL_SRC_PATH}
> +}
> +
>  sysroot_stage_all_append() {
> -	sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
> +	sysroot_stage_dir ${D}${UNPRUNED_KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
>  }
>  
>  kernel_do_configure() {
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  parent reply	other threads:[~2012-07-19  8:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 17:07 [PATCH 1/2] runqemu: Fix running qemu when build without gl Khem Raj
2012-07-10 17:07 ` [PATCH 2/2] kernel.bbclass: Make tree available for cross building external modules Khem Raj
2012-07-10 17:13   ` Phil Blundell
2012-07-10 17:21     ` Bruce Ashfield
2012-07-11 10:30   ` Richard Purdie
2012-07-11 14:25     ` Khem Raj
2012-07-11 14:48       ` Richard Purdie
2012-07-20  7:30         ` Darren Hart
2012-07-20 23:05           ` Khem Raj
2012-07-19  7:51   ` Martin Jansa [this message]
2012-07-17 16:03 ` [PATCH 1/2] runqemu: Fix running qemu when build without gl Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120719075100.GD3331@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox