-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding GitHub Action for testing TPM features.
- Loading branch information
Showing
32 changed files
with
754 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Wolfboot Reusable Build Workflow for TPM with Simulator | ||
|
||
on: | ||
|
||
workflow_call: | ||
inputs: | ||
arch: | ||
required: true | ||
type: string | ||
config-file: | ||
required: true | ||
type: string | ||
make-args: | ||
required: false | ||
type: string | ||
rot-args: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
# setup ibmswtpm2 | ||
- uses: actions/checkout@master | ||
with: | ||
repository: kgoldman/ibmswtpm2 | ||
path: ibmswtpm2 | ||
- name: ibmswtpm2 make | ||
working-directory: ./ibmswtpm2/src | ||
run: | | ||
make | ||
./tpm_server & | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: make distclean | ||
run: | | ||
make distclean | ||
- name: Select config | ||
run: | | ||
cp ${{inputs.config-file}} .config | ||
- name: Build tools | ||
run: | | ||
make keytools | ||
- name: Build wolfboot | ||
run: | | ||
make ${{inputs.make-args}} | ||
- name: Build TPM tools | ||
run: | | ||
make tpmtools | ||
- name: Write TPM ROT to TPM | ||
run: | | ||
./tools/tpm/rot -write ${{inputs.rot-args}} | ||
- name: Run wolfBoot | ||
run: | | ||
./wolfboot.elf get_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Test TPM Configs | ||
|
||
on: | ||
push: | ||
branches: [ 'master', 'main', 'release/**' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
jobs: | ||
|
||
sim_tpm_debug: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm.config | ||
make-args: DEBUG=1 | ||
|
||
sim_tpm_ecc256: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm.config | ||
make-args: SIGN=ECC256 HASH=SHA256 | ||
|
||
sim_tpm_ecc384: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm.config | ||
make-args: SIGN=ECC384 HASH=SHA384 | ||
|
||
sim_tpm_rsa2048: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm.config | ||
make-args: SIGN=RSA2048 HASH=SHA256 | ||
|
||
sim_tpm_measured_ecc256: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-measured.config | ||
make-args: SIGN=ECC256 HASH=SHA256 | ||
|
||
sim_tpm_measured_ecc384: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-measured.config | ||
make-args: SIGN=ECC384 HASH=SHA384 | ||
|
||
sim_tpm_measured_rsa2048: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-measured.config | ||
make-args: SIGN=RSA2048 HASH=SHA256 | ||
|
||
|
||
sim_tpm_keystore_ecc256: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-keystore.config | ||
make-args: SIGN=ECC256 HASH=SHA256 | ||
|
||
sim_tpm_keystore_ecc384: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-keystore.config | ||
make-args: SIGN=ECC384 HASH=SHA384 | ||
rot-args: -sha384 | ||
|
||
sim_tpm_keystore_rsa2048: | ||
uses: ./.github/workflows/test-build-sim-tpm.yml | ||
with: | ||
arch: host | ||
config-file: ./config/examples/sim-tpm-keystore.config | ||
make-args: SIGN=RSA2048 HASH=SHA256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
ARCH=sim | ||
TARGET=sim | ||
SIGN?=ED25519 | ||
SIGN?=ECC256 | ||
HASH?=SHA256 | ||
WOLFBOOT_SMALL_STACK=1 | ||
SPI_FLASH=0 | ||
DEBUG=1 | ||
|
||
# Measured boot at test PCR index 16 | ||
MEASURED_BOOT?=1 | ||
MEASURED_PCR_A?=16 | ||
DEBUG=0 | ||
WOLFTPM=1 | ||
|
||
# sizes should be multiple of system page size | ||
WOLFBOOT_PARTITION_SIZE=0x40000 | ||
WOLFBOOT_SECTOR_SIZE=0x1000 | ||
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20000 | ||
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x80000 | ||
# if on external flash, it should be multiple of system page size | ||
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x60000 | ||
WOLFBOOT_PARTITION_SWAP_ADDRESS=0xA0000 | ||
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x100000 | ||
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x180000 | ||
|
||
# required for keytools | ||
WOLFBOOT_FIXED_PARTITIONS=1 | ||
|
||
# Measured boot at test PCR index 16 | ||
MEASURED_BOOT?=1 | ||
MEASURED_PCR_A?=16 | ||
|
||
# TPM Logging | ||
#CFLAGS_EXTRA+=-DDEBUG_WOLFTPM | ||
#CFLAGS_EXTRA+=-DWOLFTPM_DEBUG_VERBOSE |
Oops, something went wrong.