From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>,
"Yann E. MORIN" <yann.morin.1998@free.fr>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/mono: allow to select which folders to install to target
Date: Tue, 1 Nov 2022 03:19:15 +0100 [thread overview]
Message-ID: <29ee559b-0663-da71-97f2-a1955c293382@benettiengineering.com> (raw)
In-Reply-To: <20221031132519.4e5ebc69@windsurf>
Hello Thomas,
On 31/10/22 13:25, Thomas Petazzoni wrote:
> Hello Giulio,
>
> On Wed, 19 Oct 2022 01:46:17 +0200
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
>
>> At the moment all APIs folders are copied to target increasing the size of
>> rootfs of ~190MB. Allow to select which API folders we want to copy to
>> target to shrink rootfs down.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>
> Thanks for proposing this.
>
> Practically speaking, could you describe which folders are needed in a
> typical scenario you've had?
One scenario I'm facing right now is:
drwxr-xr-x 4 giuliobenetti giuliobenetti 16384 ott 26 01:26 4.5
drwxr-xr-x 145 giuliobenetti giuliobenetti 12288 ott 26 01:20 gac
drwxr-xr-x 2 giuliobenetti giuliobenetti 4096 ott 26 01:22 lldb
And the total is 95MB big.
gac/ is ~56MB and that's mandatory in my case.
4.5/ is ~36MB
lldb/ is only 5K
While copying all directories is ~195MB so I was wrong, we don't save
~190MB, but anyway we save almost 100MB that for size costraint systems
and most of all for production programming save time. The latter is why
I need it most of all.
> Here, I have these ones:
>
> drwxr-xr-x 2 thomas thomas 4096 oct. 25 22:58 2.0-api
> drwxr-xr-x 2 thomas thomas 4096 oct. 25 22:58 3.5-api
> drwxr-xr-x 2 thomas thomas 4096 oct. 25 22:56 4.0
> drwxr-xr-x 2 thomas thomas 12288 oct. 25 22:58 4.0-api
> drwxr-xr-x 4 thomas thomas 16384 oct. 25 22:58 4.5
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.5.1-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.5.2-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.5-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.6.1-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.6.2-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.6-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.7.1-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.7.2-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.7-api
> drwxr-xr-x 3 thomas thomas 12288 oct. 25 22:58 4.8-api
> drwxr-xr-x 145 thomas thomas 12288 oct. 25 22:56 gac
> drwxr-xr-x 2 thomas thomas 4096 oct. 25 22:56 lldb
> drwxr-xr-x 3 thomas thomas 4096 oct. 25 22:56 mono-configuration-crypto
> drwxr-xr-x 2 thomas thomas 4096 oct. 25 22:56 monodoc
> drwxr-xr-x 3 thomas thomas 4096 oct. 25 22:56 msbuild
> drwxr-xr-x 6 thomas thomas 4096 oct. 25 22:56 xbuild
> drwxr-xr-x 4 thomas thomas 4096 oct. 25 22:56 xbuild-frameworks
>
>> +config BR2_PACKAGE_MONO_SPECIFY_FOLDERS_TO_INSTALL
>> + bool "Specify folders to install to target"
>> + help
>> + Allow to specify which Mono folder to install to target
>
> I don't really have a very good suggestion, but I don't like the name
> of the option. We rarely have option names that are "sentences", i.e
> "specify folders to install" is a sentence.
>
> Should we instead have a single string option
> BR2_PACKAGE_MONO_INSTALL_LIB_DIRS, which is empty by default. When
> empty, it means all folders are installed. Otherwise, only the
> specified folders are installed.
Yes, I can do like that.
> The other obvious question is whether this shouldn't simply be left as
> something to do in a post-build script. Even though I admit that
> reducing 190 MB down to something reasonable can be seen as something
> that is almost mandatory.
~100MB after recalculating. Anyway it's a bit odd to create ad hoc
script to remove 29 folders an keep only 3. Usually I expect a mono user
to write an application using only 1 API version.
> Or alternatively, do we have a better way, where we could automate this
> selection of which folders are needed?
In the beginning I thought that mono provided such possibility in its
build system but it's not like that, check:
https://github.com/mono/reference-assemblies/blob/680013abda911528f6befca67eed5669d80c85d5/Makefile
That is why I've ended up with this solution. Honestly I wanted to avoid
to even install these dll files to host/ but it's not possible.
Otherwise I have to patch the Makefile and in the end having 100M on
host I don't think is a problem.
--
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-11-01 2:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 23:46 [Buildroot] [PATCH] package/mono: allow to select which folders to install to target Giulio Benetti
2022-10-19 16:16 ` Angelo Compagnucci
2022-10-31 12:25 ` Thomas Petazzoni via buildroot
2022-10-31 12:54 ` Yann E. MORIN
2022-11-01 2:27 ` Giulio Benetti
2022-11-01 8:32 ` Yann E. MORIN
2022-11-01 9:19 ` Angelo Compagnucci
2022-11-01 17:42 ` Yann E. MORIN
2022-11-01 20:30 ` Angelo Compagnucci
2022-11-01 18:17 ` Giulio Benetti
2022-11-01 16:44 ` Giulio Benetti
2022-11-01 2:19 ` Giulio Benetti [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29ee559b-0663-da71-97f2-a1955c293382@benettiengineering.com \
--to=giulio.benetti@benettiengineering.com \
--cc=angelo.compagnucci@gmail.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox