Mailinglist Archive: opensuse-buildservice (95 mails)

< Previous Next >
Re: [opensuse-buildservice] size of core tools: busybox vs. GNU coreutils
On 2020-01-02 14:12, David Sugar wrote:
[...] busybox provides core tools. This leads to very small boot images [...]

Re. the size of core tools, i.e., busybox vs. GNU coreutils:

You can decrease the size of a GNU coreutils installation by:

- removing documentation (questionable):
276K /usr/share/doc/packages/coreutils
224K /usr/share/info/coreutils.info.gz
424K /usr/share/man/man1/*

- building without NLS support (via 'configure --disable-nls'):

$ du -shx cu-regular/inst*
45M cu-regular/inst
36M cu-regular/inst-no-nls

- by building as a single 'coreutils' binary (like busybox) with the
'configure' option "--enable-single-binary=shebangs|symlinks":

$ ./configure --help
...
--enable-single-binary=shebangs|symlinks
Compile all the tools in a single binary, reducing
the overall size. When compiled this way, shebangs
(default when enabled) or symlinks are installed for
each tool that points to the single binary.

That option reduces the size of a GNU coreutils installation (including
all documentation, no RPM package info) from 45M to 18M:

# Regular GNU coreutils installation:
du -hs cu-regular/inst
45M cu-regular/inst

# GNU coreutils installation built with '--enable-single-binary=shebangs':
du -hs cu-shebang/inst
18M cu-shebang/inst

# GNU coreutils installation built with '--enable-single-binary=symlinks':
du -hs cu-symlink/inst
18M cu-symlink/inst

Combined with the above --disable-nls, this makes tiny ~8M (still including
the man pages and the info page!):

$ du -hs cu-symlink/inst-no-nls cu-shebang/inst-no-nls
7.9M cu-symlink/inst-no-nls
8.3M cu-shebang/inst-no-nls

The single-binary 'coreutils' executable takes 6.5M of that.
Of course, this still includes the full GNU coreutils functionality we're used
to. ;-)

Have a nice day,
Berny
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups