Pull request for branch for-2011.11/toolchain-copy-opt
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,
Signature · 1 line
Thomas Petazzoni
PATCH 1/1 external toolchain: slightly optimize the copy of the toolchain sysroot
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.
--- toolchain/helpers.mk | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
toolchain/helpers.mk +4 -1
@@ -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 \
Signature · 1 line
1.7.4.1
PATCH 1/1 external toolchain: slightly optimize the copy of the toolchain sysroot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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).
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 external toolchain: slightly optimize the copy of the toolchain sysroot
In reply to Thomas PetazzoniReview copy_toolchain_sysroot = \ · line 97
Quoted 13 lines · Thomas Petazzoni
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.
(quoted diff) +1
-1@@ -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
PATCH 1/1 external toolchain: slightly optimize the copy of the toolchain sysroot
Le Sun, 18 Sep 2011 23:46:05 -0400,
Milton Soares Filho <[email protected]> a ?crit :
Quoted 6 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com