mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-23 13:51:06 -05:00
image: set attestation variant explicitly
This commit is contained in:
parent
9a1ee8697e
commit
2ebc0cf2c8
@ -19,6 +19,7 @@ export INSTALL_DEBUGD ?= $(DEBUG)
|
|||||||
export CONSOLE_MOTD = $(AUTOLOGIN)
|
export CONSOLE_MOTD = $(AUTOLOGIN)
|
||||||
-include $(CURDIR)/config.mk
|
-include $(CURDIR)/config.mk
|
||||||
csps := aws azure gcp openstack qemu
|
csps := aws azure gcp openstack qemu
|
||||||
|
variants := aws_aws-nitro-tpm azure_azure-sev-snp gcp_gcp-sev-es gcp_gcp-sev-snp openstack_qemu-vtpm qemu_qemu-vtpm
|
||||||
certs := $(PKI)/PK.cer $(PKI)/KEK.cer $(PKI)/db.cer
|
certs := $(PKI)/PK.cer $(PKI)/KEK.cer $(PKI)/db.cer
|
||||||
|
|
||||||
SYSTEMD_FIXED_RPMS := systemd-251.11-2.fc37.x86_64.rpm systemd-libs-251.11-2.fc37.x86_64.rpm systemd-networkd-251.11-2.fc37.x86_64.rpm systemd-pam-251.11-2.fc37.x86_64.rpm systemd-resolved-251.11-2.fc37.x86_64.rpm systemd-udev-251.11-2.fc37.x86_64.rpm
|
SYSTEMD_FIXED_RPMS := systemd-251.11-2.fc37.x86_64.rpm systemd-libs-251.11-2.fc37.x86_64.rpm systemd-networkd-251.11-2.fc37.x86_64.rpm systemd-pam-251.11-2.fc37.x86_64.rpm systemd-resolved-251.11-2.fc37.x86_64.rpm systemd-udev-251.11-2.fc37.x86_64.rpm
|
||||||
@ -28,13 +29,19 @@ PREBUILD_RPMS_SYSTEMD := $(addprefix prebuilt/rpms/systemd/,$(SYSTEMD_FIXED_RPMS
|
|||||||
PREBUILT_RPMS_AZURE := $(addprefix prebuilt/rpms/azure/,$(AZURE_FIXED_KERNEL_RPMS))
|
PREBUILT_RPMS_AZURE := $(addprefix prebuilt/rpms/azure/,$(AZURE_FIXED_KERNEL_RPMS))
|
||||||
PREBUILT_RPMS_GCP := $(addprefix prebuilt/rpms/gcp/,$(GCP_FIXED_KERNEL_RPMS))
|
PREBUILT_RPMS_GCP := $(addprefix prebuilt/rpms/gcp/,$(GCP_FIXED_KERNEL_RPMS))
|
||||||
|
|
||||||
.PHONY: all clean inject-bins $(csps)
|
.PHONY: all clean inject-bins $(csps) $(variants)
|
||||||
|
|
||||||
.NOTPARALLEL: mkosi.output.%/fedora~37/image.raw clean-%
|
.NOTPARALLEL: mkosi.output.%/fedora~37/image.raw clean-%
|
||||||
|
|
||||||
all: $(csps)
|
all: $(csps)
|
||||||
|
|
||||||
$(csps): %: mkosi.output.%/fedora~37/image.raw
|
aws: aws_aws-nitro-tpm
|
||||||
|
azure: azure_azure-sev-snp
|
||||||
|
gcp: gcp_gcp-sev-es gcp_gcp-sev-snp
|
||||||
|
openstack: openstack_qemu-vtpm
|
||||||
|
qemu: qemu_qemu-vtpm
|
||||||
|
|
||||||
|
$(variants): %: mkosi.output.%/fedora~37/image.raw
|
||||||
|
|
||||||
prebuilt/rpms/systemd/%.rpm:
|
prebuilt/rpms/systemd/%.rpm:
|
||||||
@echo "Downloading $*"
|
@echo "Downloading $*"
|
||||||
@ -57,13 +64,18 @@ prebuilt/rpms/azure/%.rpm:
|
|||||||
mkosi.output.%/fedora~37/image.raw: inject-bins inject-certs
|
mkosi.output.%/fedora~37/image.raw: inject-bins inject-certs
|
||||||
rm -rf .csp/
|
rm -rf .csp/
|
||||||
mkdir -p .csp/
|
mkdir -p .csp/
|
||||||
touch .csp/$*
|
$(eval csp := $(firstword $(subst _, ,$*)))
|
||||||
|
$(eval attestation_variant := $(lastword $(subst _, ,$*)))
|
||||||
|
touch .csp/$(csp)
|
||||||
mkosi \
|
mkosi \
|
||||||
--image-version=$(IMAGE_VERSION) \
|
--image-version=$(IMAGE_VERSION) \
|
||||||
$(AUTOLOGIN_ARGS) \
|
$(AUTOLOGIN_ARGS) \
|
||||||
--environment=INSTALL_DEBUGD \
|
--environment=INSTALL_DEBUGD \
|
||||||
--environment=CONSOLE_MOTD \
|
--environment=CONSOLE_MOTD \
|
||||||
--kernel-command-line="$(KERNEL_DEBUG_CMDLNE)" \
|
--kernel-command-line="$(KERNEL_DEBUG_CMDLNE)" \
|
||||||
|
--kernel-command-line="constel.attestation-variant=$(attestation_variant)" \
|
||||||
|
--kernel-command-line="constel.csp=$(csp)" \
|
||||||
|
--output-dir=mkosi.output.$* \
|
||||||
$(SEARCH_PATHS_PARAM) \
|
$(SEARCH_PATHS_PARAM) \
|
||||||
build
|
build
|
||||||
secure-boot/signed-shim.sh $@
|
secure-boot/signed-shim.sh $@
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
[Match]
|
[Match]
|
||||||
PathExists=../.csp/aws
|
PathExists=../.csp/aws
|
||||||
|
|
||||||
[Output]
|
|
||||||
KernelCommandLine=constel.csp=aws constel.attestation-variant=aws-nitro-tpm
|
|
||||||
OutputDirectory=mkosi.output.aws
|
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Packages=kernel
|
Packages=kernel
|
||||||
kernel-core
|
kernel-core
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
[Match]
|
[Match]
|
||||||
PathExists=../.csp/azure
|
PathExists=../.csp/azure
|
||||||
|
|
||||||
[Output]
|
|
||||||
KernelCommandLine=constel.csp=azure constel.attestation-variant=azure-sev-snp
|
|
||||||
OutputDirectory=mkosi.output.azure
|
|
||||||
|
|
||||||
# replace kernel
|
# replace kernel
|
||||||
[Content]
|
[Content]
|
||||||
Packages=prebuilt/rpms/azure/kernel-6.1.18-200.fc37.x86_64.rpm
|
Packages=prebuilt/rpms/azure/kernel-6.1.18-200.fc37.x86_64.rpm
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
[Match]
|
[Match]
|
||||||
PathExists=../.csp/gcp
|
PathExists=../.csp/gcp
|
||||||
|
|
||||||
[Output]
|
|
||||||
KernelCommandLine=constel.csp=gcp constel.attestation-variant=gcp-sev-es
|
|
||||||
OutputDirectory=mkosi.output.gcp
|
|
||||||
|
|
||||||
# replace kernel
|
# replace kernel
|
||||||
[Content]
|
[Content]
|
||||||
Packages=prebuilt/rpms/gcp/kernel-6.1.18-200.fc37.x86_64.rpm
|
Packages=prebuilt/rpms/gcp/kernel-6.1.18-200.fc37.x86_64.rpm
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
PathExists=../.csp/openstack
|
PathExists=../.csp/openstack
|
||||||
|
|
||||||
[Output]
|
[Output]
|
||||||
KernelCommandLine=constel.csp=openstack constel.attestation-variant=qemu-vtpm mem_encrypt=on kvm_amd.sev=1 module_blacklist=qemu_fw_cfg console=tty0 console=ttyS0
|
KernelCommandLine=mem_encrypt=on kvm_amd.sev=1 module_blacklist=qemu_fw_cfg console=tty0 console=ttyS0
|
||||||
OutputDirectory=mkosi.output.openstack
|
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Autologin=yes
|
Autologin=yes
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
[Match]
|
[Match]
|
||||||
PathExists=../.csp/qemu
|
PathExists=../.csp/qemu
|
||||||
|
|
||||||
[Output]
|
|
||||||
KernelCommandLine=constel.csp=qemu constel.attestation-variant=qemu-vtpm
|
|
||||||
OutputDirectory=mkosi.output.qemu
|
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Autologin=yes
|
Autologin=yes
|
||||||
Environment=CONSOLE_MOTD=true
|
Environment=CONSOLE_MOTD=true
|
||||||
|
Loading…
Reference in New Issue
Block a user