[OE-core] Want to strip rootfs

Mark Hatle mark.hatle at windriver.com
Fri Feb 3 15:20:22 UTC 2017


On 2/3/17 6:25 AM, ANDANI PRASHANT wrote:
> Hi,
> 
> I build rootfs which size is 100MB+
> As i look in to filesystem, there are 14mb libc-2.23.so <http://libc-2.23.so>,
> 12mb libstdc++.so.6.0.22,..etc.
> Is there any flag or option during build to strip all library and binary to
> optimise size of rootfs.

The default is that everything is stripped (actually split into stripped
executable and debug addition).  The stripped pieces are installed into your
rootfs, and the debug pieces are not.  (Unless you've added dbg-pkgs to your
configuration.)

The default optimization flag should be more then enough to get a consistent
well optimized system.

Where you will run into issues is if you, or one of the layers you are using
disables the splitting or enables global debug optimizations (lower optimization
levels.)

This is what you want to check for:

# Uncomment this to change the optimization to make debugging easer, at the
# possible cost of performance.
# DEBUG_BUILD = "1"
#
# Uncomment this to disable the stripping of the installed binaries
# INHIBIT_PACKAGE_STRIP = "1"
#
# Uncomment this to disable the split of the debug information into -dbg files
# INHIBIT_PACKAGE_DEBUG_SPLIT = "1"

You can use bitbake -e to investigate the values for the system as a whole, or
specify a recipe to look at a specific item.

--Mark

> Regards,
> Prashant
> 
> 




More information about the Openembedded-core mailing list