From: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
To: "jan.kiszka@siemens.com" <jan.kiszka@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: RE: [PATCH v2] sdk: make SDK an image
Date: Thu, 16 Dec 2021 15:30:04 +0000 [thread overview]
Message-ID: <AS4PR10MB531888C315B129D9C149C23FED779@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <b9397a24-31ae-5083-eb4e-54bf26c07377@siemens.com>
Kiszka, Jan, 16. Dezember 2021 15:31:
> On 16.12.21 10:12, Schmidt, Adriaan (T RDA IOT SES-DE) wrote:
> > Kiszka, Jan, 15. Dezember 2021 12:55:
> >> On 15.12.21 11:55, Adriaan Schmidt wrote:
> >>> This derives the SDK from image.bbclass (currently it only
> >>> inherits rootfs), removing the custom packaging, and instead
> >>> relying on existing features of image.bbclass.
> >>> Note that because there is not tarxz-img IMAGE_TYPE, we switch
> >>> the SDK type to targz-img. This is only temporary, until we have
> >>> the OE-inspired imagetypes.
> >>
> >> Then the ordering is also wrong: First make sure we can keep the
> >> previous output format, then refactor.
> >>
> >> Meanwhile, we can think about how to hook the SDK image build into a
> >> task of another image build, so that we move in the right direction /wrt
> >> configuration.
> >
> > I had a look at OE. There the SDK is something generated by the target
> > image, but it's something quite complex, with lots of Python code and
> > stuff in libraries. But except for the Isar SDK being simpler, it's
> > following the same idea.
> >
> > I now think:
> > - The SDK should be generated by the target image recipe, but maybe
> > more integrated than it currently is. (Put the logic currently in
> > the sdkchroot recipe into the image-sdk-extension class, so we can
> > easily use settings made in the target image recipe)
> > - The SDK should only be generated as tar[xz|gz], but not as container
> > - If someone wants an SDK image (container, development VM, ...),
> > that would be a separate recipe further processing the SDK, and the
> > user would need to create that recipe explicitly. I can imagine that
> > for the default case, this SDK image recipe would only have two lines:
> > include the target image recipe (to get all the SDK_* settings and the
> > do_populate_sdk task) and include some new class that makes the
> > adjustments to generate an "image containing the SDK" instead
> > of the original target image.
>
> But how do get from the tarball to the container image? You are
> suggesting to drop an existing and actually used interface
> (https://github.com/siemens/meta-iot2050/blob/master/conf/distro/iot2050-
> debian.conf#L48),
> but you do not provide an equally simple alternative yet. That can't be
> "someone downstream has to write a special class".
The CONTAINER_FORMATS of the current implementation introduce a partial
duplicate of IMAGE_FSTYPES (only supporting tarballs and containers), when
I think it should be using the existing imaging mechanisms. (Soon someone
will request their SDK in the form of a VM image with KDE and Eclipse
installed...)
My current draft requires a 2-line recipe for the SDK image, e.g. isar-image-sdk.bb:
---
SDK_TARGET_IMAGE = "isar-image-base"
inherit sdkimage
---
This depends on ${SDK_TARGET_IMAGE}:do_populate_sdk, so all SDK_[PRE]INSTALL
and other settings defining the SDK are in the target image recipe.
(It's still not ideal, because im my current implementation you can
ONLY customize the SDK image in the target image recipe and not in the
SDK image one...)
`bitbake isar-image-sdk` then generates SDK images as requested by SDK_FORMATS,
with the same semantics as IMAGE_FSTYPES, so in the example you linked you'd have to
request container-img and set CONTAINER_FORMATS to define which containers
you want (actually, my imagetypes-draft would later make all the container
image types first-class citizens, so that would bring you back to the current
way of defining things).
For a generic solution I see no way around having a separate image.
The current SDK-container generation calls parts of the imaging code
as a function. This sort of works (although Henning already stumbled
across some of the details when he worked on improving container imaging),
but it's not something we can do in general.
> And it's also unclear to me how to ensure that container images are
> generated corresponding to the specific target images.
I hope it's become a little clearer...
Adriaan
next prev parent reply other threads:[~2021-12-16 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 10:55 Adriaan Schmidt
2021-12-15 11:54 ` Jan Kiszka
2021-12-16 9:12 ` Schmidt, Adriaan
2021-12-16 14:30 ` Jan Kiszka
2021-12-16 15:30 ` Schmidt, Adriaan [this message]
2021-12-17 6:23 ` Schmidt, Adriaan
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=AS4PR10MB531888C315B129D9C149C23FED779@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM \
--to=adriaan.schmidt@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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