Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: Don't include source files for "other" architectures in the sysroot
@ 2013-04-29 14:02 Phil Blundell
  2013-05-01 19:08 ` Darren Hart
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Blundell @ 2013-04-29 14:02 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

Since the sysroot is per-machine, we can be fairly confident that any
out-of-tree modules which look at our sources will be building for the
same architecture that we are.  This being the case there's no need to
ship the sources for any other architectures, which saves disk space and
time (about 30 seconds in do_package, in a somewhat unscientific test
with ARCH=mips).

Of course, an even better fix would be to not install these files in the
first place, but deleting them is easier.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/kernel.bbclass |    1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 00e27ef..ffb0b11 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -167,6 +167,7 @@ kernel_do_install() {
 	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 '{}' \;
+	rm -rf $(find $kerneldir/arch -maxdepth 1 -not -path $kerneldir/arch/$ARCH -not -path $kerneldir/arch/Kconfig -not -path $kerneldir/arch/. -not -path $kerneldir/arch)
 	find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
 
 	# As of Linux kernel version 3.0.1, the clean target removes
-- 
1.7.10.4






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

end of thread, other threads:[~2013-05-01 21:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 14:02 [PATCH] kernel.bbclass: Don't include source files for "other" architectures in the sysroot Phil Blundell
2013-05-01 19:08 ` Darren Hart
2013-05-01 21:05   ` Phil Blundell
2013-05-01 21:10     ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox