Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main: On arm64, attempt to decompress vmlinuz automatically. #199

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bin/ubuntu-core-initramfs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading