Am Tue, 5 Mar 2019 07:50:19 +0100
schrieb "[ext] Jan Kiszka" <
jan.k...@siemens.com>:
> On 05.03.19 07:32, Maxim Yu. Osipov wrote:
> > Hi,
> >
> > 1) For reference ISAR armhf target - Terasic DE0-Nano-SoC - the
> > current default isar-image-base rootfs gives
> >
> >
> > isar/build/tmp/work/debian-stretch-armhf/isar-image-base/rootfs$
> > sudo du -sh . 163M .
If you have a closer look with i.e "ncdu" you will find that kernel and
modules might require a lot. One way to safe space is using a custom
kernel and not use too many modules, also not use an initrd.
Other consumers are locales/zoneinfo/docs. These things can be cleaned
up i.e. with a postrm script in a transient package. Or a few "rm"s in
a do_rootfs_append or a custom task.
I just manually removed some files and got down to 65MB (kernel and
modules not included).
> > The rootfs is already trimmed from /var/cache/apt entries.
>
> It may be further trimmed (by making it a "non-Debian" image, e.g.
> removing any package management) to something like 120M or maybe even
> 100M. We are planning to provide mechanisms that allow such manual
> tunings during image generation. But then you usually start
> installing your actual application, and its dependencies can blow up
> the image again. We do not know your scenario, so this is hard to
> tell.
Yes you can even remove apt and other "essential" packages, that would
probably be a last resort and give you another 5-7MB.
Note that manual removal of files and removing the package manager
might significantly decrease the value of the rootfs. Depends on
whether you care about updates and how you plan to ship/install them.
> In general, you have to be in a very high volume market so that the
> additional engineering and maintenance costs (when using a
> non-commodity distro) pay off via saved hardware budget.
True! But in this case we are probably talking about an old device that
should receive new firmware.
Henning
> Jan
>