image: set attestation variant on kernel cmdline (#1323)

This commit is contained in:
Malte Poll 2023-03-02 12:20:10 +01:00 committed by GitHub
parent ab0b881cbf
commit 96b4b74a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,3 @@
[Output] [Output]
KernelCommandLine=constel.csp=aws KernelCommandLine=constel.csp=aws constel.attestation-variant=aws-nitro-tpm
OutputDirectory=mkosi.output.aws OutputDirectory=mkosi.output.aws

View File

@ -1,5 +1,5 @@
[Output] [Output]
KernelCommandLine=constel.csp=azure KernelCommandLine=constel.csp=azure constel.attestation-variant=azure-sev-snp
OutputDirectory=mkosi.output.azure OutputDirectory=mkosi.output.azure
# replace kernel # replace kernel

View File

@ -1,5 +1,5 @@
[Output] [Output]
KernelCommandLine=constel.csp=gcp KernelCommandLine=constel.csp=gcp constel.attestation-variant=gcp-sev-es
OutputDirectory=mkosi.output.gcp OutputDirectory=mkosi.output.gcp
# replace kernel # replace kernel

View File

@ -1,5 +1,5 @@
[Output] [Output]
KernelCommandLine=constel.csp=openstack mem_encrypt=on kvm_amd.sev=1 module_blacklist=qemu_fw_cfg console=tty0 console=ttyS0 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
OutputDirectory=mkosi.output.openstack OutputDirectory=mkosi.output.openstack
[Content] [Content]

View File

@ -1,5 +1,5 @@
[Output] [Output]
KernelCommandLine=constel.csp=qemu KernelCommandLine=constel.csp=qemu constel.attestation-variant=qemu-vtpm
OutputDirectory=mkosi.output.qemu OutputDirectory=mkosi.output.qemu
[Content] [Content]

View File

@ -4,6 +4,7 @@ Description=Configures constellation cloud service provider environment variable
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c "CSP=$(< /proc/cmdline tr ' ' '\n' | grep constel.csp | sed 's/constel.csp=//'); echo CONSTEL_CSP=$CSP >> /run/constellation.env" ExecStart=/bin/bash -c "CSP=$(< /proc/cmdline tr ' ' '\n' | grep constel.csp | sed 's/constel.csp=//'); echo CONSTEL_CSP=$CSP >> /run/constellation.env"
ExecStart=/bin/bash -c "ATTESTATION=$(< /proc/cmdline tr ' ' '\n' | grep constel.attestation-variant | sed 's/constel.attestation-variant=//'); echo CONSTEL_ATTESTATION_VARIANT=$ATTESTATION >> /run/constellation.env"
RemainAfterExit=yes RemainAfterExit=yes
[Install] [Install]