Bug 4924 - Redundant directories and files in toolchain tarball
Summary: Redundant directories and files in toolchain tarball
Status: RESOLVED NOTABUG
Alias: None
Product: ADT
Classification: Yocto Project Subprojects
Component: adt (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.5
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-26 08:23 UTC by Yi Zhao
Modified: 2013-07-26 19:19 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2013-07-26 08:23:06 UTC
Toolchain location: http://autobuilder.yoctoproject.org/pub/nightly/20130724-2/toolchain

Git rev: master/67864ca79da08df752487a3a4e1a975546da123d

After using "bitbake core-image-sato -c populate_sdk" instead of "bitbake meta-toolchain-gmae", I found the size of toochain tarball increased more than 100MB.

Here is the 20130724-2 build (using populate_sdk):
##################
poky-eglibc-x86_64-arm-toolchain-1.4+snapshot.sh         269M
poky-eglibc-x86_64-i586-toolchain-1.4+snapshot.sh        384M
poky-eglibc-x86_64-mips-toolchain-1.4+snapshot.sh        327M
poky-eglibc-x86_64-powerpc-toolchain-1.4+snapshot.sh     339M
poky-eglibc-x86_64-x86_64-toolchain-1.4+snapshot.sh      365M
#################

Here is the 20130717-2 build (using meta-toolchain-gmae):
#################
poky-eglibc-x86_64-arm-toolchain-gmae-1.4+snapshot-20130717.sh       155M
poky-eglibc-x86_64-i586-toolchain-gmae-1.4+snapshot-20130717.sh      212M
poky-eglibc-x86_64-mips-toolchain-gmae-1.4+snapshot-20130717.sh      155M
poky-eglibc-x86_64-powerpc-toolchain-gmae-1.4+snapshot-20130717.sh   161M
poky-eglibc-x86_64-x86_64-toolchain-gmae-1.4+snapshot-20130717.sh    164M
#################

The "bitbake core-image-sato -c populate_sdk" command copies the whole target rootfs to the toolchian directory:
###############
$ ls /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/
bin  boot  dev  etc  home  lib  media  mnt  proc  run  sbin  sys  tmp  usr  var
###############

Most of these files are useless in host. Can we remove these redundant directories to reduce the size ?
Comment 1 Jessica 2013-07-26 19:19:49 UTC
Hi Yi,

This is meant to be this way.  If you choose to use the populate_sdk option to go with build toolchain, that means you want to have target image library files to go into your toolchain sysroot directory.  Otherwise, you can just build the toolchain and extract target image rootfs as your sysroot.  toolchain + sysroot is fundamental for cross development.  The gmae is legacy for including certain target libraries but it doesn't match your target image rootfs at all.