From: Jan Kiszka <jan.kiszka@siemens.com>
To: Claudius Heine <ch@denx.de>, Harald Seiler <hws@denx.de>,
Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH] image: Run copy_boot_files after rootfs postprocessing
Date: Mon, 29 Jun 2020 11:13:57 +0200 [thread overview]
Message-ID: <d89fa474-ed6d-c342-56fd-c13736b4680b@siemens.com> (raw)
In-Reply-To: <98c4dd24-b450-b9c3-ca6d-79996e3ab8ae@denx.de>
On 29.06.20 11:04, Claudius Heine wrote:
> Hi Jan,
>
> On 26/06/2020 11.12, Jan Kiszka wrote:
>>>>>> Maybe you can point out an issue in isar itself, or explain how you
>>>>>> got
>>>>>> into this situation? We can then see if your change is generic enough
>>>>>> for upstream. You could also provide the error-case from your layer as
>>>>>> an upstream feature, if that is generic enough.
>>>>
>>>> I think this patch addresses an issue in isar itself. There is no
>>>> reason
>>>> for copy_boot_files() to run before the postprocessing does. I've
>>>> checked
>>>> through the git history and the reason this relationship was introduced
>>>> was a bigger refactor of the task dependency chain. It does not seem to
>>>> be intentionally this way from what I can tell.
>>>>
>>>> The other way around makes more sense, in my opinion. As stated in the
>>>> commit message, postprocessing might do an update to the initramfs (as
>>>> seen above) and this change needs to be reflected in the deployed
>>>> initramfs as well, instead of silently only living in the version
>>>> that is
>>>> part of the rootfs.
>>>>
>>>> I also checked all existing postprocessing commands and did not see any
>>>> that assume to be run after the boot files have been deployed.
>>>
>>> Its been a while when I implemented this, but I also thought of the
>>> scenario where someone would like to 'minimize' a image via the root fs
>>> postprocessing by deleting everything that is not needed, and that could
>>> possible include the kernel + initramfs, if those are stored somewhere
>>> else outside the root file system. So the idea was, IIRC, to move the
>>> kernel and initrd to the deploy dir, out of harms way, before
>>> postprocessing does its rootfs manipulation.
>>>
>>> So by ordering the copy_boot_files behind the root fs post processing,
>>> you might break other layers that rely on this ordering and have such
>>> 'minimization' procedures, that remove the kernel package and specific
>>> files.
>>>
>>> We don't have such 'minimization' stuff in upstream isar, since it
>>> pretty much breaks apt and dpkg, but if you do image based update, you
>>> might not care.
>>
>> I think the problem with this pattern is elsewhere: We should not
>> install stuff on the rootfs in the first place that shall not end up in
>> the rootfs.
>
> Not sure if I understand you correctly. Do you mean that minimization in
> the rootfs postprocess should not be done and instead the things that
> get removed there should just not be installed?
>
> To be concrete, one thing that might be removed is 'apt' and 'dpkg'
> itself. The only way how you can setup a root file system without it is
> if you would install it using a package management from outside the root
> file system.
>
> While this would be the cleanest approach, and might even be supported
> (See RootDir in apt.conf(5)), that would mean pretty massive changes to
> Isar.
If you can avoid installing, you do not need to remove things again for
shrinking. That's what I meant here. Obviously, you can't avoid apt or
dpkg in the first place, so that shrinking pattern would remain different.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2020-06-29 9:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 15:33 Harald Seiler
2020-06-25 16:48 ` Henning Schild
2020-06-25 17:02 ` Jan Kiszka
2020-06-25 17:24 ` Harald Seiler
2020-06-25 18:43 ` Henning Schild
2020-06-25 19:23 ` Henning Schild
2020-06-25 19:27 ` Henning Schild
2020-06-26 8:13 ` Harald Seiler
2020-06-26 8:19 ` Jan Kiszka
2020-06-26 8:26 ` Henning Schild
2020-06-26 8:44 ` Jan Kiszka
2020-06-26 9:15 ` Henning Schild
2020-06-26 7:17 ` Claudius Heine
2020-06-26 8:02 ` Harald Seiler
2020-06-26 9:12 ` Jan Kiszka
2020-06-29 9:04 ` Claudius Heine
2020-06-29 9:13 ` Jan Kiszka [this message]
2020-06-29 12:22 ` Harald Seiler
2020-06-29 12:41 ` Jan Kiszka
2020-06-29 12:55 ` Henning Schild
2020-06-29 13:25 ` Jan Kiszka
2020-07-01 8:29 ` Claudius Heine
2020-10-13 10:19 ` Jan Kiszka
2020-10-13 10:26 ` Harald Seiler
2020-10-13 10:35 ` Jan Kiszka
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=d89fa474-ed6d-c342-56fd-c13736b4680b@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=ch@denx.de \
--cc=henning.schild@siemens.com \
--cc=hws@denx.de \
--cc=isar-users@googlegroups.com \
/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