diff --git a/image/Makefile b/image/Makefile index 4de6ba2f9..3910dfbbc 100644 --- a/image/Makefile +++ b/image/Makefile @@ -12,7 +12,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) @@ -20,7 +23,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 @@ -33,7 +41,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 diff --git a/image/mkosi.files/mkosi.azure.conf b/image/mkosi.files/mkosi.azure.conf index b9af2db26..369f4dc0c 100644 --- a/image/mkosi.files/mkosi.azure.conf +++ b/image/mkosi.files/mkosi.azure.conf @@ -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 diff --git a/image/mkosi.files/mkosi.gcp.conf b/image/mkosi.files/mkosi.gcp.conf index b00e6228b..c78387277 100644 --- a/image/mkosi.files/mkosi.gcp.conf +++ b/image/mkosi.files/mkosi.gcp.conf @@ -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