From: Harald Seiler <hws@denx.de>
To: "florian.bezdeka@siemens.com" <florian.bezdeka@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH v3 1/3] classes: Add initramfs class
Date: Mon, 18 Jan 2021 11:00:39 +0100 [thread overview]
Message-ID: <401e120add10ab6b66497dae680c46d559a32434.camel@denx.de> (raw)
In-Reply-To: <0948f3a316449c2e82e3635202883f8acd625e58.camel@siemens.com>
Hi Florian,
On Mon, 2021-01-18 at 09:11 +0000, florian.bezdeka@siemens.com wrote:
> On Thu, 2021-01-14 at 11:11 +0100, Harald Seiler wrote:
> > Add a new "image" class for generating a custom initramfs. It works
> > like this: A new minimal debian rootfs is bootstrapped and all
> > dependency packages for the new initramfs are installed. Then, an
> > initramfs is generated from this rootfs and deployed like usual.
> >
> > This new initramfs.bbclass "image" class should be pulled in by an
> > "initramfs image" recipe. Said recipe then specifies all dependencies
> > of the initramfs via INITRAMFS_INSTALL and INITRAMFS_PREINSTALL (which
> > are analogous to the respective IMAGE_* variables).
> >
> > initramfs.bbclass intentionally does _not_ expose a mechanism to change
> > /etc/initramfs-tools/initramfs.conf and /etc/initramfs-tools/modules.
> > Changes to their settings are better done via packages that deploy
> > conf-hooks to /usr/share/initramfs-tools/conf-hooks.d/ and module
> > fragment files to /usr/share/initramfs-tools/modules.d/.
> >
> > Signed-off-by: Harald Seiler <hws@denx.de>
> > ---
> >
[...]
> > +
> > +do_generate_initramfs() {
> > + rootfs_do_mounts
> > + rootfs_do_qemu
> > +
> > + sudo -E chroot "${INITRAMFS_ROOTFS}" \
> > + update-initramfs -u -v
> > +
> > + if [ ! -e "${INITRAMFS_ROOTFS}/initrd.img" ]; then
> > + die "No initramfs was found after generation!"
> > + fi
> > +
> > + rm -rf "${INITRAMFS_IMAGE_FILE}"
> > + cp "${INITRAMFS_ROOTFS}/initrd.img" "${INITRAMFS_IMAGE_FILE}"
>
> ${INITRAMFS_IMAGE_FILE} references ${DEPLOY_DIR_IMAGE}, which may not
> exist yet. So I guess we should add something like
>
> do_generate_initramfs[dirs] = "${DEPLOY_DIR_IMAGE}"
>
> otherwise you have fix the dependency with some kind of "intermediate
> task" in the recipe using this class.
Yeah, I actually did this exact change in a downstream version of the
recipe but somehow forgot to add it here ... Will fix!
Harald
> > +}
> > +addtask generate_initramfs after do_rootfs before do_build
> > --
> > 2.29.2
> >
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62 Fax: +49-8142-66989-80 Email: hws@denx.de
prev parent reply other threads:[~2021-01-18 10:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 10:42 [RFC PATCH] " Harald Seiler
2020-09-21 19:25 ` Jan Kiszka
2020-09-22 10:34 ` Harald Seiler
2020-09-22 11:04 ` Jan Kiszka
2020-09-22 12:10 ` Gylstorff Quirin
2020-09-22 12:18 ` Harald Seiler
2020-09-23 16:20 ` [PATCH v2 1/3] " Harald Seiler
2020-09-25 13:16 ` Henning Schild
2020-10-06 12:24 ` Harald Seiler
2020-09-23 16:20 ` [PATCH v2 2/3] Add example initramfs module recipe Harald Seiler
2020-09-23 16:20 ` [PATCH v2 3/3] Add custom isar-initramfs example Harald Seiler
2020-09-25 9:13 ` Jan Kiszka
2020-09-25 11:28 ` Harald Seiler
2020-10-13 15:11 ` Jan Kiszka
2021-01-14 10:11 ` [PATCH v3 1/3] classes: Add initramfs class Harald Seiler
2021-01-14 10:11 ` [PATCH v3 2/3] Add example initramfs module recipe Harald Seiler
2021-01-14 10:11 ` [PATCH v3 3/3] Add custom isar-initramfs example Harald Seiler
2021-01-18 9:11 ` [PATCH v3 1/3] classes: Add initramfs class florian.bezdeka
2021-01-18 10:00 ` Harald Seiler [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=401e120add10ab6b66497dae680c46d559a32434.camel@denx.de \
--to=hws@denx.de \
--cc=florian.bezdeka@siemens.com \
--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