[Buildroot] [PATCH 1/1] external toolchain: slightly optimize the copy of the toolchain sysroot
Milton Soares Filho
milton.soares.filho at gmail.com
Mon Sep 19 03:46:05 UTC 2011
On 31 August 2011 17:36, Thomas Petazzoni
<thomas.petazzoni at 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
More information about the buildroot
mailing list