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 <marma...@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" \
-- 
2.48.1


Reply via email to