From d0d67889435dbfd621ba9b96e9b31359351367dc Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Fri, 14 Jul 2023 19:17:46 +0100 Subject: [PATCH 1/2] On arm64, attempt to decompress vmlinuz automatically. --- bin/ubuntu-core-initramfs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/ubuntu-core-initramfs b/bin/ubuntu-core-initramfs index 0d2535ed..3e90542d 100755 --- a/bin/ubuntu-core-initramfs +++ b/bin/ubuntu-core-initramfs @@ -381,6 +381,17 @@ def create_efi(parser, args): args.initrd = "-".join([args.initrd, args.kernelver]) args.output = "-".join([args.output, args.kernelver]) + if platform.machine() == "aarch64": + import gzip + raw_kernel=tempfile.NamedTemporaryFile(mode='wb') + try: + with gzip.open(args.kernel, 'rb') as comp_kernel: + shutil.copyfileobj(comp_kernel, raw_kernel) + raw_kernel.flush() + args.kernel = raw_kernel.name + except gzip.BadGzipFile: + pass + # kernel.efi sections will be aligned to the page size by llvm-objcopy # (which is the default value for SectionAlignment in the PE header). # --set-section-flags are such so added COFF sections have flags: From dacc6a6241402a7e28ba4c8c9c7078cc7b89d4e6 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Thu, 14 Sep 2023 15:40:17 +0100 Subject: [PATCH 2/2] gpt-auto-generator is gone in mantic Signed-off-by: Dimitri John Ledkov --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 9065e1b2..31ab2647 100755 --- a/debian/rules +++ b/debian/rules @@ -79,7 +79,7 @@ override_dh_auto_install: -D $(CURDIR)/debian/tmp --ldd $$f; \ done # But we don't won't to automount the rootfs - rm debian/tmp/usr/lib/systemd/system-generators/systemd-gpt-auto-generator + rm -f --verbose debian/tmp/usr/lib/systemd/system-generators/systemd-gpt-auto-generator # or this (binfmt_misc module is not in the initramfs) rm debian/tmp/usr/lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount # Remove all pcrphase related bits for the moment (services and binary)