* [Buildroot] [pull request] Pull request for branch for-2011.11/toolchain-copy-opt
@ 2011-08-31 21:36 Thomas Petazzoni
2011-08-31 21:36 ` [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2011-08-31 21:36 UTC (permalink / raw)
To: buildroot
The following changes since commit d1dd9588ae76d8c9b79a39af182a45e54ac356dd:
news.html: fix 2011.08 release date (2011-08-31 14:23:26 +0200)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.11/toolchain-copy-opt
Thomas Petazzoni (1):
external toolchain: slightly optimize the copy of the toolchain sysroot
toolchain/helpers.mk | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Thanks,
--
Thomas Petazzoni
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot
2011-08-31 21:36 [Buildroot] [pull request] Pull request for branch for-2011.11/toolchain-copy-opt Thomas Petazzoni
@ 2011-08-31 21:36 ` Thomas Petazzoni
2011-09-17 11:30 ` Peter Korsgaard
2011-09-19 3:46 ` Milton Soares Filho
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2011-08-31 21:36 UTC (permalink / raw)
To: buildroot
The sysroot of an ARM CodeSourcery toolchain takes about 1.4 GB of
space, but 1.1+ GB of this space consists in locale-related
information which Buildroot doesn't use. By skipping the copy of those
unused files, we save quite a bit of time while importing the
toolchain sysroot.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/helpers.mk | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 4d90d15..7f3efaa 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -79,6 +79,9 @@ copy_toolchain_lib_root = \
# non-default architecture variant is used. Without this, the
# compiler fails to find libraries and headers.
#
+# Note that the 'locale' directories are not copied. They are huge
+# (400+MB) in CodeSourcery toolchains, and they are not really useful.
+#
# $1: main sysroot directory of the toolchain
# $2: arch specific sysroot directory of the toolchain
# $3: arch specific subdirectory in the sysroot
@@ -89,7 +92,7 @@ copy_toolchain_sysroot = \
ARCH_SUBDIR="$(strip $3)"; \
for i in etc lib sbin usr ; do \
if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
- cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+ rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
fi ; \
done ; \
if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot
2011-08-31 21:36 ` [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot Thomas Petazzoni
@ 2011-09-17 11:30 ` Peter Korsgaard
2011-09-19 3:46 ` Milton Soares Filho
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2011-09-17 11:30 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> The sysroot of an ARM CodeSourcery toolchain takes about 1.4 GB of
Thomas> space, but 1.1+ GB of this space consists in locale-related
Thomas> information which Buildroot doesn't use. By skipping the copy of those
Thomas> unused files, we save quite a bit of time while importing the
Thomas> toolchain sysroot.
Looks good, except:
Thomas> - cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
Thomas> + rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
We don't currently check for rsync in dependencies.sh - Please add that
as well (same for the local package stuff).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot
2011-08-31 21:36 ` [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot Thomas Petazzoni
2011-09-17 11:30 ` Peter Korsgaard
@ 2011-09-19 3:46 ` Milton Soares Filho
2011-09-19 6:44 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Milton Soares Filho @ 2011-09-19 3:46 UTC (permalink / raw)
To: buildroot
On 31 August 2011 17:36, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> The sysroot of an ARM CodeSourcery toolchain takes about 1.4 GB of
> space, but 1.1+ GB of this space consists in locale-related
> information which Buildroot doesn't use. By skipping the copy of those
> unused files, we save quite a bit of time while importing the
> toolchain sysroot.
> @@ -89,7 +92,7 @@ copy_toolchain_sysroot = \
> ? ? ? ?ARCH_SUBDIR="$(strip $3)"; \
> ? ? ? ?for i in etc lib sbin usr ; do \
> ? ? ? ? ? ? ? ?if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
> - ? ? ? ? ? ? ? ? ? ? ? cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
> + ? ? ? ? ? ? ? ? ? ? ? rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
> ? ? ? ? ? ? ? ?fi ; \
> ? ? ? ?done ; \
I've been doing a similar thing to avoid copying unneeded stuff from a
"non-pure" toolchain (STLinux toolchain), but by using a blacklist
file and rsync's --exclude-from option.
Would it be interesting to anyone else (besides me) to have this
generic approach? It'd be a simple addition to this patch.
[]s, milton
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot
2011-09-19 3:46 ` Milton Soares Filho
@ 2011-09-19 6:44 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 6:44 UTC (permalink / raw)
To: buildroot
Le Sun, 18 Sep 2011 23:46:05 -0400,
Milton Soares Filho <milton.soares.filho@gmail.com> a ?crit :
> I've been doing a similar thing to avoid copying unneeded stuff from a
> "non-pure" toolchain (STLinux toolchain), but by using a blacklist
> file and rsync's --exclude-from option.
>
> Would it be interesting to anyone else (besides me) to have this
> generic approach? It'd be a simple addition to this patch.
I am at least interested in seeing what you have done, to see what
could be integrated in Buildroot.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-19 6:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-31 21:36 [Buildroot] [pull request] Pull request for branch for-2011.11/toolchain-copy-opt Thomas Petazzoni
2011-08-31 21:36 ` [Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot Thomas Petazzoni
2011-09-17 11:30 ` Peter Korsgaard
2011-09-19 3:46 ` Milton Soares Filho
2011-09-19 6:44 ` Thomas Petazzoni
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.