Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ tools/unit-tests/unit-policy-create
tools/unit-tests/unit-sign-encrypted-output
tools/unit-tests/unit-update-flash-delta
tools/unit-tests/unit-update-flash-self-update
tools/unit-tests/unit-update-flash-self-update-monolithic
tools/unit-tests/unit-update-flash-hook
tools/unit-tests/unit-loader-tpm-init
tools/unit-tests/unit-update-ram-nofixed
Expand Down
1 change: 1 addition & 0 deletions docs/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ make CERT_CHAIN_VERIFY=1 \

- `USER_CERT_CHAIN` requires both `USER_PRIVATE_KEY` and `USER_PUBLIC_KEY`
- The private and public keys must correspond to the leaf certificate identity in the chain
- If the chain uses X.509 name constraints and you are building as a wolfHSM server (`WOLFHSM_SERVER=1`), set `CERT_CHAIN_NAME_CONSTRAINTS=1`.

When `CERT_CHAIN_VERIFY=1` is set without `USER_CERT_CHAIN`, the build auto-generates a dummy 3-tier certificate hierarchy in `test-dummy-ca/` for testing. This also applies to wolfHSM NVM image generation when applicable.

Expand Down
9 changes: 9 additions & 0 deletions docs/firmware_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ bytes and the nested application image. Later calls to
`fw_size` bytes starting at `ARCH_FLASH_OFFSET`, spanning into the BOOT
partition.

The persisted header also sets the version a new payload must exceed. A
staged payload is installed only if its version is greater than both the
running bootloader's `WOLFBOOT_VERSION` and the version in the
self-header. The bootloader inside each payload can therefore keep the
same `WOLFBOOT_VERSION` across releases. Without the self-header only
`WOLFBOOT_VERSION` is checked, so the bootloader in each payload must be
built with `WOLFBOOT_VERSION` equal to the payload's signed version,
otherwise the update is rejected.

##### Restrictions

- **Not power-fail safe.** Like all self-updates, a monolithic update
Expand Down
1 change: 1 addition & 0 deletions docs/wolfHSM.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ This section describes the exposed configuration options available for wolfHSM i
- `WOLFHSM_CFG_COMM_DATA_LEN` (default 5000): Size in bytes of the wolfHSM message data payload. The default fits a whole DER certificate chain or the largest ML-DSA keys/signatures in a single message. Targets with a smaller transport slot must lower it in their `.config`. In server mode the value is currently only applied to `SIGN=ML_DSA` builds; other server builds use the wolfHSM library default.
- `WOLFHSM_CFG_CERT_MAX_VERIFY_ROOTS` (default 8): Maximum number of trusted root CA NVM IDs accepted for certificate chain verification; bounds the length of the HAL `hsmNvmIdCertRootCAList` and of `WOLFHSM_NVM_ROOT_CA_LIST`. Part of the client-server wire format (see note below).
- `WOLFHSM_NVM_ROOT_CA_LIST`: Overrides the NVM IDs of the trusted root CA certificates used for certificate chain verification. Takes a comma-separated initializer with no quotes and no spaces, e.g. `WOLFHSM_NVM_ROOT_CA_LIST=1,2,3`. Client mode takes the client's cert IDs (e.g. `1`); server mode takes full NVM IDs (e.g. `0x6101`). The list length must not exceed `WOLFHSM_CFG_CERT_MAX_VERIFY_ROOTS`. Only used when `CERT_CHAIN_VERIFY=1`.
- `CERT_CHAIN_NAME_CONSTRAINTS` (default 0): Set to 1 to enforce X.509 name constraints during certificate chain verification. When 0, name constraint support is compiled out of wolfSSL (`IGNORE_NAME_CONSTRAINTS`), so a chain containing a certificate with a critical name constraints extension will be rejected whereas a non-critical one will be ignored. Only applies when wolfBoot is configured as a wolfHSM server.
- `WOLFHSM_NVM_IMAGE` (default 1): Set to 0 to skip wolfHSM NVM image generation. Used by targets that do not provision keys from a pre-built NVM image, e.g. because the HAL loads the verification key into the server's key cache at boot (PIC32CZ).
- `USER_NVM_INIT`: Path to a user-provided whnvmtool `.nvminit` file used to generate the wolfHSM NVM image in place of the default auto-generated one. Also re-enables NVM image generation when user-provided keys (`USER_PRIVATE_KEY`, `USER_PUBLIC_KEY`, `USER_CERT_CHAIN`) would otherwise skip it.

Expand Down
52 changes: 12 additions & 40 deletions hal/aurix_tc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@
/* wolfHSM client context and configuration */
#if defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT)

static int _connectCb(void* context, whCommConnected connect);
/* wolfHSM TC3xx port client, which selects the comm buffer and the bridge
* flags. wolfBoot and then the application on CPU0 both use client 0. */
#define HSM_CLIENT 0

/* Client configuration/contexts */
static whTransportMemClientContext tmcCtx[1] = {0};
Expand Down Expand Up @@ -172,8 +174,8 @@ void wolfBoot_panic(void) TC3_LONGCALL;
* to force the HSM core to execute from RAM while the host-driven flash
* command completes.
* The server app must be running first to process a park request */
#define HSM_PARK() (void)tchsmHhHost_HsmPark()
#define HSM_RELEASE() (void)tchsmHhHost_HsmRelease()
#define HSM_PARK() (void)tchsmHhHost_HsmPark(HSM_CLIENT)
#define HSM_RELEASE() (void)tchsmHhHost_HsmRelease(HSM_CLIENT)
#else
#define HSM_PARK()
#define HSM_RELEASE()
Expand Down Expand Up @@ -587,63 +589,33 @@ RAMFUNCTION void ext_flash_unlock(void)

#ifdef WOLFBOOT_ENABLE_WOLFHSM_CLIENT

static int _connectCb(void* context, whCommConnected connect)
{
int ret;

switch (connect) {
case WH_COMM_CONNECTED:
ret = tchsmHhHost2Hsm_Notify(TCHSM_HOST2HSM_NOTIFY_CONNECT);
break;
case WH_COMM_DISCONNECTED:
ret = tchsmHhHost2Hsm_Notify(TCHSM_HOST2HSM_NOTIFY_DISCONNECT);
break;
default:
ret = WH_ERROR_BADARGS;
break;
}

return ret;
}

int hal_hsm_init_connect(void)
{
int rc = 0;
size_t i;

/* init shared memory buffers */
uint32_t* req = (uint32_t*)hsmShmCore0CommBuf;
uint32_t* resp =
(uint32_t*)hsmShmCore0CommBuf + HSM_SHM_CORE0_COMM_BUF_WORDS / 2;
whTransportMemConfig tmcCfg[1] = {{
.req = req,
.req_size = HSM_SHM_CORE0_COMM_BUF_SIZE / 2,
.resp = resp,
.resp_size = HSM_SHM_CORE0_COMM_BUF_SIZE / 2,
}};
int rc = 0;

whTransportMemConfig tmcCfg[1] = {{0}};

/* Client configuration/contexts */
whCommClientConfig cc_conf[1] = {{
.transport_cb = tmcCb,
.transport_context = (void*)tmcCtx,
.transport_config = (void*)tmcCfg,
.client_id = WOLFBOOT_WOLFHSM_CLIENT_ID,
.connect_cb = _connectCb,
.connect_cb = hsm_ipc_get_connect_cb(HSM_CLIENT),
}};

whClientConfig c_conf[1] = {{
.comm = cc_conf,
}};

rc = hsm_ipc_init();
rc = hsm_ipc_init(HSM_CLIENT);
if (rc != WH_ERROR_OK) {
return rc;
}

/* init shared memory buffers */
for (i = 0; i < HSM_SHM_CORE0_COMM_BUF_WORDS; i++) {
hsmShmCore0CommBuf[i] = 0;
rc = hsm_ipc_transport_config(HSM_CLIENT, tmcCfg);
if (rc != WH_ERROR_OK) {
return rc;
}

rc = wh_Client_Init(&hsmClientCtx, c_conf);
Expand Down
19 changes: 13 additions & 6 deletions include/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ extern int tolower(int c);
# define WOLFSSL_SP_SMALL
# endif
# define WOLFSSL_HAVE_SP_ECC
# define WOLFSSL_KEY_GEN
# if !defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT) && \
!defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
# define WOLFSSL_KEY_GEN
# endif
# define HAVE_ECC_KEY_EXPORT
# define HAVE_ECC_KEY_IMPORT
# endif
Expand Down Expand Up @@ -423,8 +426,7 @@ extern int tolower(int c);
* guard keeps it from satisfying the inner condition there. */
# ifndef WC_NO_RNG
# if defined(WOLFCRYPT_SECURE_MODE) || defined(WOLFBOOT_TPM_PARMENC) || \
defined(WOLFCRYPT_TEST) || defined(WOLFCRYPT_BENCHMARK) || \
defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
defined(WOLFCRYPT_TEST) || defined(WOLFCRYPT_BENCHMARK)
# define WC_RSA_BLINDING
# endif
# endif
Expand All @@ -438,8 +440,7 @@ extern int tolower(int c);
# endif
# if !defined(WOLFBOOT_TPM) && !defined(WOLFCRYPT_SECURE_MODE) && \
!defined(WOLFCRYPT_TEST) && !defined(WOLFCRYPT_BENCHMARK) && \
!defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT) && \
!defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
!defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT)
# define WOLFSSL_RSA_VERIFY_INLINE
# define WOLFSSL_RSA_VERIFY_ONLY
# define WOLFSSL_RSA_PUBLIC_ONLY
Expand Down Expand Up @@ -1029,7 +1030,10 @@ extern int tolower(int c);
# define WOLF_CRYPTO_CB
# undef HAVE_ANONYMOUS_INLINE_AGGREGATES
# define HAVE_ANONYMOUS_INLINE_AGGREGATES 1
# define WOLFSSL_KEY_GEN
/* wolfBoot's own client and server never generate keys */
# ifdef WOLFCRYPT_TZ_WOLFHSM
# define WOLFSSL_KEY_GEN
# endif
#endif

/* Secure-side sizing common to any wolfHSM server build (TZ engine and
Expand Down Expand Up @@ -1104,6 +1108,9 @@ extern int tolower(int c);
# define WOLFSSL_USER_IO
# define WOLFSSL_SP_MUL_D
# define WOLFSSL_ALLOW_NO_SUITES
# ifndef WOLFBOOT_CERT_CHAIN_NAME_CONSTRAINTS
# define IGNORE_NAME_CONSTRAINTS
# endif
#endif

#ifdef WOLFSSL_STM32_PKA
Expand Down
2 changes: 1 addition & 1 deletion lib/wolfHSM
Submodule wolfHSM updated 75 files
+4 −0 .github/workflows/build-and-bench.yml
+12 −0 .github/workflows/build-and-test-refactor.yml
+12 −0 .github/workflows/build-and-test.yml
+8 −0 benchmark/Makefile
+4 −0 benchmark/README.md
+50 −33 benchmark/bench_modules/wh_bench_mod_aes.c
+7 −6 benchmark/bench_modules/wh_bench_mod_cmac.c
+7 −7 benchmark/bench_modules/wh_bench_mod_hmac.c
+5 −5 benchmark/bench_modules/wh_bench_mod_lms.c
+13 −13 benchmark/bench_modules/wh_bench_mod_mldsa.c
+2 −2 benchmark/bench_modules/wh_bench_mod_mlkem.c
+9 −9 benchmark/bench_modules/wh_bench_mod_sha2.c
+5 −5 benchmark/bench_modules/wh_bench_mod_sha3.c
+5 −5 benchmark/bench_modules/wh_bench_mod_xmss.c
+2 −1 benchmark/wh_bench_data.c
+12 −2 benchmark/wh_bench_data.h
+9 −0 benchmark/wh_bench_utils.h
+27 −6 docs/src/5-Features.md
+2 −0 docs/src/6-Utilities.md
+2 −2 docs/src/8-Integration.md
+5 −2 docs/src/9-Configuration.md
+71 −2 port/posix/posix_transport_shm.c
+10 −0 port/posix/posix_transport_shm.h
+14 −0 src/wh_client.c
+56 −14 src/wh_client_crypto.c
+34 −6 src/wh_client_cryptocb.c
+65 −0 src/wh_client_dma.c
+3 −0 src/wh_crypto.c
+8 −6 src/wh_server_crypto.c
+91 −20 src/wh_server_img_mgr.c
+42 −34 src/wh_server_keystore.c
+48 −15 src/wh_utils.c
+3 −3 test-refactor/README.md
+6 −3 test-refactor/client-server/wh_test_crypto_aes.c
+55 −0 test-refactor/client-server/wh_test_crypto_cmac.c
+1 −1 test-refactor/client-server/wh_test_crypto_ecc.c
+1 −1 test-refactor/client-server/wh_test_crypto_ed25519.c
+12 −7 test-refactor/client-server/wh_test_crypto_keystore.c
+92 −11 test-refactor/client-server/wh_test_crypto_lms.c
+11 −9 test-refactor/client-server/wh_test_crypto_mldsa.c
+4 −4 test-refactor/client-server/wh_test_crypto_rng.c
+143 −0 test-refactor/client-server/wh_test_crypto_rsa.c
+94 −11 test-refactor/client-server/wh_test_crypto_xmss.c
+1 −1 test-refactor/client-server/wh_test_nvm_ops.c
+10 −0 test-refactor/config/wolfhsm_cfg.h
+144 −0 test-refactor/misc/wh_test_cache.c
+3 −3 test-refactor/misc/wh_test_crypto_affinity.c
+182 −0 test-refactor/misc/wh_test_dma_noncoherent.c
+5 −5 test-refactor/misc/wh_test_multiclient.c
+32 −0 test-refactor/posix/Makefile
+15 −0 test-refactor/posix/wh_test_posix_main.c
+225 −0 test-refactor/posix/wh_test_posix_shm_dma.c
+208 −10 test-refactor/server/wh_test_server_img_mgr.c
+18 −14 test-refactor/wh_test_list.c
+31 −0 test/Makefile
+3 −0 test/config/user_settings.h
+2,298 −1,862 test/gen/wh_test_wolfboot_img_data.h
+69 −2 test/scripts/gen_wolfboot_test_data.sh
+2 −2 test/wh_test_cert.c
+6 −4 test/wh_test_clientserver.c
+4 −1 test/wh_test_common.h
+511 −63 test/wh_test_crypto.c
+16 −2 test/wh_test_dma.c
+5 −5 test/wh_test_multiclient.c
+28 −25 test/wh_test_nvmflags.c
+11 −13 test/wh_test_posix_threadsafe_stress.c
+365 −12 test/wh_test_server_img_mgr.c
+10 −5 wolfhsm/wh_client.h
+6 −3 wolfhsm/wh_client_crypto.h
+3 −1 wolfhsm/wh_client_cryptocb.h
+2 −0 wolfhsm/wh_crypto.h
+2 −0 wolfhsm/wh_server_crypto.h
+50 −4 wolfhsm/wh_server_img_mgr.h
+84 −0 wolfhsm/wh_settings.h
+3 −3 wolfhsm/wh_utils.h
5 changes: 5 additions & 0 deletions options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1992,6 +1992,11 @@ ifneq ($(CERT_CHAIN_VERIFY),)
CFLAGS += '-DWOLFBOOT_WOLFHSM_NVM_ROOT_CA_LIST=$(WOLFHSM_NVM_ROOT_CA_LIST)'
endif

# Optional: enforce X.509 name constraints. Off by default for code size.
ifeq ($(CERT_CHAIN_NAME_CONSTRAINTS),1)
CFLAGS += -DWOLFBOOT_CERT_CHAIN_NAME_CONSTRAINTS
endif

# User-provided cert chain takes precedence. Declare the chain's
# algorithms via AUX_PK_ALGOS/AUX_HASH_ALGOS so the verifier has them.
ifneq ($(USER_CERT_CHAIN),)
Expand Down
12 changes: 11 additions & 1 deletion src/update_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,17 @@ void RAMFUNCTION wolfBoot_check_self_update(void)
(wolfBoot_open_image(&update, PART_UPDATE) == 0) &&
wolfBoot_get_image_type(PART_UPDATE) == (HDR_IMG_TYPE_WOLFBOOT | HDR_IMG_TYPE_AUTH)) {
uint32_t update_version = wolfBoot_update_firmware_version();
if (update_version <= wolfboot_version) {
uint32_t current_version = wolfboot_version;
#if defined(WOLFBOOT_SELF_UPDATE_MONOLITHIC) && defined(WOLFBOOT_SELF_HEADER)
/* The self-header has the installed payload's version, which may be
* newer than the WOLFBOOT_VERSION this bootloader was built with */
uint32_t self_version = wolfBoot_get_self_version();

if (self_version > current_version) {
current_version = self_version;
}
#endif
if (update_version <= current_version) {
wolfBoot_erase_partition(PART_UPDATE);
return;
}
Expand Down
3 changes: 2 additions & 1 deletion test-app/app_aurix_tc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ static void hsmUpdate(void)
if (wolfBoot_current_firmware_version() > BASE_FW_VERSION) {
return;
}
rc = tchsmHhHost_HsmUpdateTrigger();
/* Client 0 is the wolfHSM client of this core */
rc = tchsmHhHost_HsmUpdateTrigger(0);
if (rc == 0) {
wolfBoot_printf("HSM update triggered\n");
}
Expand Down
1 change: 1 addition & 0 deletions tools/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,5 @@ CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXSDK MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO
AUX_HASH_ALGOS \
CERT_CHAIN_GEN_CA_ALGO \
CERT_CHAIN_GEN_CA_HASH \
CERT_CHAIN_NAME_CONSTRAINTS \
ENCRYPT_CACHE
6 changes: 6 additions & 0 deletions tools/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ test-sim-self-update-monolithic: wolfboot.bin test-app/image_v1_signed.bin FORCE
# Same as test-sim-self-update-monolithic, but also verifies that the
# self-header was persisted at WOLFBOOT_PARTITION_SELF_HEADER_ADDRESS and
# matches the signing tool's --header-only output byte-for-byte.
# A second boot checks that the payload is not installed again.
#
test-sim-self-update-monolithic-self-header: wolfboot.bin test-app/image_v1_signed.bin FORCE
@echo "=== Simulator Monolithic Self-Update + Self-Header Test ==="
Expand Down Expand Up @@ -341,6 +342,11 @@ test-sim-self-update-monolithic-self-header: wolfboot.bin test-app/image_v1_sign
$(Q)dd if=internal_flash.dd bs=1 skip=$$(($(WOLFBOOT_PARTITION_SELF_HEADER_ADDRESS) - $(ARCH_FLASH_OFFSET))) count=$$(($(WOLFBOOT_SECTOR_SIZE))) of=persisted_hdr.dd 2>/dev/null
$(Q)cmp -n $$(($(IMAGE_HEADER_SIZE))) persisted_hdr.dd monolithic_payload_v2_header.bin
@echo " Self-header persisted correctly: PASSED"
@# Boot again. The self-header shows the payload is already installed, so
@# wolfBoot should erase it from the update partition, not install it again.
$(Q)./wolfboot.elf get_version || true
$(Q)dd if=internal_flash.dd bs=1 skip=$$(($(WOLFBOOT_PARTITION_UPDATE_ADDRESS) - $(ARCH_FLASH_OFFSET))) count=4 2>/dev/null | od -An -tx1 | grep -q "ff ff ff ff"
@echo " Installed payload erased from UPDATE on next boot: PASSED"
@echo "=== Monolithic Self-Update + Self-Header Test PASSED ==="

# Test that an oversized monolithic self-update is rejected. The payload is
Expand Down
17 changes: 17 additions & 0 deletions tools/unit-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ TESTS:=unit-parser unit-parser-large-header unit-fdt unit-extflash unit-string \
unit-update-flash-hook \
unit-update-flash-self-update \
unit-update-flash-self-update-ecc \
unit-update-flash-self-update-monolithic \
unit-nsc-update \
unit-update-flash-enc unit-update-flash-enc-full unit-update-flash-enc-intswap unit-update-ram unit-update-ram-fit unit-update-ram-uboot unit-update-ram-enc unit-update-ram-enc-nopart unit-update-ram-nofixed unit-update-ram-nofixed-noramboot unit-update-ram-noramboot unit-update-ram-custom-trailer unit-custom-trailer-nopart unit-update-flash-hwswap unit-pkcs11_store unit-psa_store unit-wolfhsm_flash_hal unit-disk \
unit-update-disk unit-update-disk-confirm unit-update-disk-golden unit-update-disk-fsp unit-update-disk-oob unit-update-disk-fit unit-update-disk-fit-ramdisk unit-multiboot unit-boot-x86-fsp unit-loader-tpm-init unit-qspi-flash unit-fwtpm-stub unit-tpm-rsa-exp \
Expand Down Expand Up @@ -408,6 +409,17 @@ unit-update-flash-self-update-ecc:CFLAGS+=-DMOCK_PARTITIONS -DWOLFBOOT_NO_SIGN -
-DNVM_FLASH_JOURNAL -DNVM_FLASH_ECC -DWOLFBOOT_FLASH_WRITE_UNIT=32 \
-DWOLFBOOT_SECTOR_SIZE=0x1000 -DWOLFBOOT_SELF_HEADER \
-DWOLFBOOT_PARTITION_SELF_HEADER_ADDRESS=0xCD004000
# Same as unit-update-flash-self-update, plus monolithic mode and a self-header
# (in the unused SWAP sector), to check that an update is only installed if it
# is newer than the version in the self-header. Some addresses are plain
# numbers because image.c is built separately and cannot see MOCK_ADDRESS_*.
unit-update-flash-self-update-monolithic:CFLAGS+=-DMOCK_PARTITIONS -DWOLFBOOT_NO_SIGN -DUNIT_TEST_AUTH \
-DWOLFBOOT_HASH_SHA256 -DPRINTF_ENABLED -DEXT_FLASH -DPART_UPDATE_EXT -DPART_SWAP_EXT \
-DRAM_CODE -DARCH_SIM -DUNIT_TEST_SELF_UPDATE_ONLY -DWOLFBOOT_SELF_UPDATE_MONOLITHIC \
-DWOLFBOOT_SELF_HEADER -DWOLFBOOT_SELF_HEADER_EXT \
-DWOLFBOOT_PARTITION_SELF_HEADER_ADDRESS=0xCE000000 \
-DARCH_FLASH_OFFSET=0xCD000000 -DWOLFBOOT_VERSION=7 \
-DWOLFBOOT_ORIGIN=MOCK_ADDRESS_BOOT -DBOOTLOADER_PARTITION_SIZE=WOLFBOOT_PARTITION_SIZE
unit-update-ram-fit:CFLAGS+=-DMOCK_PARTITIONS -DWOLFBOOT_NO_SIGN -DUNIT_TEST_AUTH \
-DWOLFBOOT_HASH_SHA256 -DPRINTF_ENABLED -DEXT_FLASH -DPART_UPDATE_EXT \
-DPART_SWAP_EXT -DPART_BOOT_EXT -DWOLFBOOT_DUALBOOT -DNO_XIP \
Expand Down Expand Up @@ -872,6 +884,11 @@ unit-update-flash-self-update-ecc: ../../include/target.h unit-update-flash.c
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sha256.c \
$(CFLAGS) $(LDFLAGS)

unit-update-flash-self-update-monolithic: ../../include/target.h unit-update-flash.c
gcc -o $@ unit-update-flash.c ../../src/image.c \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sha256.c \
$(CFLAGS) $(LDFLAGS)

unit-sdhci-response-bits: ../../include/target.h unit-sdhci-response-bits.c
gcc -o $@ $^ $(CFLAGS) -ffunction-sections -fdata-sections $(LDFLAGS) \
-Wl,--gc-sections
Expand Down
Loading
Loading