Test: Use custom built kernel from Azure Ubuntu

This commit is contained in:
Nils Hanke 2022-12-20 13:31:24 +01:00
parent 758d9dcea7
commit 45df929c8a
3 changed files with 23 additions and 6 deletions

View File

@ -11,7 +11,10 @@ csps := aws qemu gcp azure
certs := $(PKI)/PK.cer $(PKI)/KEK.cer $(PKI)/db.cer
GCP_FIXED_KERNEL_RPMS := kernel-5.19.17-300.fc37.x86_64.rpm kernel-core-5.19.17-300.fc37.x86_64.rpm kernel-modules-5.19.17-300.fc37.x86_64.rpm
PREBUILT_RPMS := $(addprefix prebuilt/rpms/,$(GCP_FIXED_KERNEL_RPMS))
AZURE_DEBUG_KERNEL_RPMS := kernel-5.15.74-1.x86_64.rpm kernel-headers-5.15.74-1.x86_64.rpm
PREBUILT_RPMS_GCP := $(addprefix prebuilt/gcp/rpms/,$(GCP_FIXED_KERNEL_RPMS))
PREBUILT_RPMS_AZURE := $(addprefix prebuilt/azure/rpms/,$(AZURE_DEBUG_KERNEL_RPMS))
.PHONY: all clean inject-bins $(csps)
@ -19,7 +22,12 @@ all: $(csps)
$(csps): %: mkosi.output.%/fedora~37/image.raw
prebuilt/rpms/%.rpm:
prebuilt/azure/rpms/%.rpm:
@echo "Downloading $*"
@mkdir -p $(@D)
@curl -sL -o $@ https://cdn.confidential.cloud/constellation/testing/kernel/$*.rpm
prebuilt/gcp/rpms/%.rpm:
@echo "Downloading $*"
@mkdir -p $(@D)
@curl -sL -o $@ https://kojipkgs.fedoraproject.org/packages/kernel/5.19.17/300.fc37/x86_64/$*.rpm
@ -32,7 +40,7 @@ mkosi.output.%/fedora~37/image.raw: mkosi.files/mkosi.%.conf inject-bins inject-
fi
@echo "Image is ready: $@"
inject-bins: $(PREBUILT_RPMS)
inject-bins: $(PREBUILT_RPMS_GCP) $(PREBUILT_RPMS_AZURE)
mkdir -p $(MKOSI_EXTRA)/usr/bin
mkdir -p $(MKOSI_EXTRA)/usr/sbin
cp $(BOOTSTRAPPER_BINARY) $(MKOSI_EXTRA)/usr/bin/bootstrapper

View File

@ -1,3 +1,12 @@
[Output]
KernelCommandLine=constel.csp=azure
OutputDirectory=mkosi.output.azure
# replace kernel
[Content]
BasePackages=conditional
Packages=systemd
util-linux
dracut
prebuilt/azure/rpms/kernel-5.15.74-1.x86_64.rpm
prebuilt/azure/rpms/kernel-headers-5.15.74-1.x86_64.rpm

View File

@ -8,6 +8,6 @@ BasePackages=conditional
Packages=systemd
util-linux
dracut
prebuilt/rpms/kernel-5.19.17-300.fc37.x86_64.rpm
prebuilt/rpms/kernel-core-5.19.17-300.fc37.x86_64.rpm
prebuilt/rpms/kernel-modules-5.19.17-300.fc37.x86_64.rpm
prebuilt/gcp/rpms/kernel-5.19.17-300.fc37.x86_64.rpm
prebuilt/gcp/rpms/kernel-core-5.19.17-300.fc37.x86_64.rpm
prebuilt/gcp/rpms/kernel-modules-5.19.17-300.fc37.x86_64.rpm