All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH test-artifacts v2 14/12] scripts: build initrd cpio
Date: Mon, 7 Apr 2025 19:15:31 +0200	[thread overview]
Message-ID: <Z_QIM8TBRXLeqACa@mail-itl> (raw)
In-Reply-To: <16f91d01-ea1c-43ec-a5d8-a55bb84fe94b@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 2387 bytes --]

On Mon, Apr 07, 2025 at 06:11:29PM +0100, Andrew Cooper wrote:
> On 07/04/2025 1:31 pm, Marek Marczykowski-Górecki wrote:
> > Build initrd format directly digestable by the kernel. Additionally,
> > include it itself inside as boot/initrd-domU file, for domU booting in
> > tests.
> > This should avoid the need to repack tar -> cpio as part of the test
> > job.
> >
> > Keep generating initrd.tar.gz as that's still used by older branches.
> >
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > ---
> >  scripts/x86_64-rootfs-alpine.sh | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/scripts/x86_64-rootfs-alpine.sh b/scripts/x86_64-rootfs-alpine.sh
> > index b70b3a5..13e85fa 100755
> > --- a/scripts/x86_64-rootfs-alpine.sh
> > +++ b/scripts/x86_64-rootfs-alpine.sh
> > @@ -58,3 +58,8 @@ passwd -d "root" root
> >  cd /
> >  tar cvzf "${WORKDIR}/binaries/initrd.tar.gz" \
> >      bin dev etc home init lib mnt opt root sbin usr var
> > +mkdir boot
> > +find bin dev etc home init lib mnt opt root sbin usr var |\
> > +    cpio -o -H newc | gzip > boot/initrd-domU
> > +find bin boot dev etc home init lib mnt opt root sbin usr var |\
> > +    cpio -o -H newc | gzip > "${WORKDIR}/binaries/initrd.cpio.gz" \
> 
> So, after looking at this a bit more, a few notes.
> 
> Trailing \ needs dropping.
> 
> initrd-domU probably ought to be named initrd-domU-base.cpio.gz so it's
> clear what it is.  These are easy to fix up.

Technically, it's useful as is already if you just want to check if domU
starts.

> Looking through the current initrd.tar.gz, we've got:
> 
> $ ls -lah ./var/cache/apk/
> total 1.9M
> drwxr-xr-x 2 andrew andrew 4.0K Nov  8 15:12 .
> drwxr-xr-x 4 andrew andrew 4.0K Sep  6  2024 ..
> -rw-r--r-- 1 andrew andrew 425K Nov  8 15:12 APKINDEX.73fc500b.tar.gz
> -rw-r--r-- 1 andrew andrew 1.4M Nov  8 15:12 APKINDEX.eb46142e.tar.gz
> 
> which (alone) is 5% of the size of the initrd.  I'll submit a patch
> separately to drop this.

Makes sense.

> But doesn't this result in initrd.tar.gz being included in initrd-domU,
> and then (doubly) in initrd.cpio.gz ?

No, find (same as tar earlier) has explicit list of dirs to look at,
which don't include initrd.* nor "binaries".

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2025-04-07 17:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 12:31 [PATCH v2 00/12] Several CI cleanups and improvements, plus yet another new runner Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 01/12] CI: prevent grub unpacking initramfs Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 02/12] CI: switch qubes runners to use console.exp Marek Marczykowski-Górecki
2025-04-07 18:07   ` Andrew Cooper
2025-04-07 12:31 ` [PATCH v2 03/12] CI: enable XHCI console in Xen debug build on Alpine Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 04/12] CI: include domU kernel messages in the console output log Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 05/12] CI: increase verbosity of starting a domain Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 06/12] CI: consistently use DOCKER_CMD in makefiles Marek Marczykowski-Górecki
2025-04-07 17:45   ` Andrew Cooper
2025-04-07 12:31 ` [PATCH v2 07/12] CI: wait for the network interface in PCI passthrough tests Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 09/12] CI: adjust resolving network interface into PCI device Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 10/12] CI: add AMD Zen 4 HW runner Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 11/12] CI: avoid repacking initrd as part of the test job Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH v2 12/12] CI: save toolstack artifact as cpio.gz Marek Marczykowski-Górecki
2025-04-07 12:31 ` [PATCH test-artifacts v2 13/12] scripts: add rc_verbose=yes to /etc/rc.conf Marek Marczykowski-Górecki
2025-04-07 16:15   ` Andrew Cooper
2025-04-07 12:31 ` [PATCH test-artifacts v2 14/12] scripts: build initrd cpio Marek Marczykowski-Górecki
2025-04-07 16:17   ` Andrew Cooper
2025-04-07 16:22     ` Andrew Cooper
2025-04-07 16:31       ` Marek Marczykowski-Górecki
2025-04-08 12:06         ` Anthony PERARD
2025-04-08 12:28           ` Marek Marczykowski-Górecki
2025-04-07 17:11   ` Andrew Cooper
2025-04-07 17:14     ` Andrew Cooper
2025-04-07 17:15     ` Marek Marczykowski-Górecki [this message]
     [not found] ` <eda734d64c0b73e5de6ca0d70fe3de02d40cf00d.1744028549.git-series.marmarek@invisiblethingslab.com>
2025-04-07 17:56   ` [PATCH v2 08/12] CI: switch test kernel from 6.1.19 to 6.12.21 Andrew Cooper

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=Z_QIM8TBRXLeqACa@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.