qemu*tpm2*: Manufacture TPM2

Invoke swtpm_setup --create-config-files skip-if-exist to create local
CA files under the current user account, so user does not need
read/write access to /var/lib/swtpm-localca.

Pass --tpm2 to manufacture a TPM2 instead of TPM1.2.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
Jonathon Hall 2023-02-22 10:42:32 -05:00
parent 7ea606524b
commit ff8ec2fd5b
No known key found for this signature in database
GPG Key ID: 1E9C3CA91AE25114
4 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,8 @@ endif
TPMDIR=$(build)/$(BOARD)/vtpm
$(TPMDIR)/.manufacture:
mkdir -p "$(TPMDIR)"
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram
swtpm_setup --create-config-files skip-if-exist
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram --tpm2
touch "$(TPMDIR)/.manufacture"
ROOT_DISK_IMG=$(build)/$(BOARD)/root.qcow2
# Default to 20G disk

View File

@ -78,7 +78,8 @@ endif
TPMDIR=$(build)/$(BOARD)/vtpm
$(TPMDIR)/.manufacture:
mkdir -p "$(TPMDIR)"
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram
swtpm_setup --create-config-files skip-if-exist
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram --tpm2
touch "$(TPMDIR)/.manufacture"
ROOT_DISK_IMG=$(build)/$(BOARD)/root.qcow2
# Default to 20G disk

View File

@ -79,7 +79,8 @@ endif
TPMDIR=$(build)/$(BOARD)/vtpm
$(TPMDIR)/.manufacture:
mkdir -p "$(TPMDIR)"
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram
swtpm_setup --create-config-files skip-if-exist
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram --tpm2
touch "$(TPMDIR)/.manufacture"
ROOT_DISK_IMG=$(build)/$(BOARD)/root.qcow2
# Default to 20G disk

View File

@ -78,7 +78,8 @@ endif
TPMDIR=$(build)/$(BOARD)/vtpm
$(TPMDIR)/.manufacture:
mkdir -p "$(TPMDIR)"
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram
swtpm_setup --create-config-files skip-if-exist
swtpm_setup --tpm-state "$(TPMDIR)" --create-platform-cert --lock-nvram --tpm2
touch "$(TPMDIR)/.manufacture"
ROOT_DISK_IMG=$(build)/$(BOARD)/root.qcow2
# Default to 20G disk