HI,
800MB sounds fairly much for just the base system - maybe there is some
potential for you to slim it down.
If your project requires all these packages, I' afraid there isn't an
easy magical switch to reduce the size.
What you could do is take the image manifest
(https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-IMAGE_MANIFEST)
and browse manually though it, if there
is any obvious package that shouldn't be installed, which could be
removed - but to be honest 3.9GB for all that stuff required according
to your list sounds like a reasonable size for the rootfs.
If you already know what the real "big ones" are in your image you could
try to configure them to include only things really needed - if not you
could also take the
image manifest feed the information into "oe-pkgdata-util package-info
<pkgname>" to get the size of the package.
I guess from here on you can take it.
In the end 3.9GB for a fully fledged development environment doesn't
sounds too much - just remember a vanilla ubuntu for example takes at
least 15GB.
BR
Konrad
On 28.03.20 19:36, Ajam Ali wrote:
Hi Konrad,
Actually my current image size is 3.9GB because of heavy size packages
required by my project and without project required packages my image
size in Yocto is 800MB.
I want to reduce the image size as maximum as possible.
Thanks a lot in advance,
Ajam Ali
------------------------------------------------------------------------
*From:* Konrad Weihmann <[email protected]>
*Sent:* Saturday, March 28, 2020 7:38 PM
*To:* Ajam Ali <[email protected]>
*Cc:* [email protected] <[email protected]>
*Subject:* Re: [yocto] Fw: Reducing rootfs size in yocto
**[CAUTION: This Email is from outside the Organization. Do not click
links or open attachments unless you trust the sender.]
Pretty general questions, but I try to answer your question.
I don't know what the purpose of your image is, but installing
development tools like boost-dev or gcc (I guess that is what you mean
with cpp) makes your image automatically a lot bigger, I would suggest
to put devtools into a SDK, which could be shipped separately.
Next thing you can do is to analyze the what is actually so big in
your image, e.g. by creating a tar.gz of the image, unpacking it and
browsing by 'du -sh *'.
You can get the package/recipe to a file by using 'oe-pkgdata-util
find-path <path>'.
In the identified recipe you can look for PACKAGECONFIG or
OE_EXTRACONF switches that you don't need and disable them.
As said, I don't know what the purpose/environment of your image will
be like, but you could also consider to use a different fs-format like
squash.
In general if you want small images preferring musl over glibc and
systemV over systemd is something that you could consider as well.
TL;DR
1) move to SDK
2) check PACKAGECONFIG switches
3) same as 2 or consider something "smaller" like lxc
4) same as 2
5) same as 2
6) same as 2
7) move to SDK
8) same as 2
On 28.03.20 14:25, Ajam Ali wrote:
------------------------------------------------------------------------
Hi All,
I am trying to reduce the image size.
how can i reduce the size of following packages so that i could get
a small image size after integrating these packages in yocto?
1) boost-dev 2) docker 3) containerd-opencontainers 4) nodejs 5)
nodejs-npm 6) python3-numpy 7) cpp 8) postgresql
Thanks in advance,
Ajam Ali
::DISCLAIMER::
------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential
and intended for the named recipient(s) only. E-mail transmission is
not guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete,
or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any
liability on the originator or HCL or its affiliates. Views or
opinions, if any, presented in this email are solely those of the
author and may not necessarily reflect the views or opinions of HCL
or its affiliates. Any form of reproduction, dissemination, copying,
disclosure, modification, distribution and / or publication of this
message without the prior written consent of authorized
representative of HCL is strictly prohibited. If you have received
this email in error please delete it and notify the sender
immediately. Before opening any email and/or attachments, please
check them for viruses and other defects.
------------------------------------------------------------------------
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#48967): https://lists.yoctoproject.org/g/yocto/message/48967
Mute This Topic: https://lists.yoctoproject.org/mt/72609037/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-