Commit Graph

252 Commits (740383a3f53b932dca2ed1ae3e97274805bd0573)

Author SHA1 Message Date
David Garske 14f6e4a298 Add wolfBoot FIT support for loading bitstream 2026-06-09 15:30:27 +02:00
David Garske 9786f5608b Add wolfBoot port for STM32N6 (NUCLEO-N657X0-Q)
Co-authored-by: Aidan Garske <aidan@wolfssl.com>
2026-05-28 16:49:57 +02:00
David Garske b94954eab4 Add Xilinx Zynq-7000 (ZC702) wolfBoot port 2026-05-12 12:06:05 +02:00
David Garske c643215c5e fit: gzip-compressed kernel + ramdisk (initramfs) support
Wires the new wolfBoot_gunzip inflater into the FIT image-loading path
and adds initramfs (ramdisk) extraction with DTB /chosen fixup so a
single signed FIT can carry kernel, DTB, and rootfs.

GZIP path
---------
* fit_load_image_ex(out_max) added; fit_load_image kept as a wrapper.
* When a subimage carries compression="gzip", inflate straight to the
  FIT-declared load address, then verify the FIT hash-1 subnode
  (sha256 / sha384 if available) for defense in depth on top of the
  outer wolfBoot signature. The compression property is now read
  unconditionally so a build without WOLFBOOT_GZIP can warn and fail
  closed instead of silently memcpy-ing compressed bytes as if they
  were raw.
* fit_verify_hash propagates wc_InitSha256 / wc_Sha256Update /
  wc_Sha256Final return codes (and the SHA-384 equivalents) - any
  non-zero return is treated as a verification failure so a misbehaving
  backend cannot silently degrade to a no-op.
* GZIP=1 is the new default in the FIT-using example configs (zynqmp,
  zynqmp_sdcard, polarfire_mpfs250, polarfire_mpfs250_qspi,
  versal_vmk180, versal_vmk180_sdcard); set GZIP=0 to opt out.

Ramdisk path
------------
* fit_find_images() gains a ramdisk out-arg and fdt_fixup_initrd()
  writes /chosen/linux,initrd-{start,end} as 64-bit big-endian cells.
* update_disk.c and update_ram.c load the FIT ramdisk node (under
  WOLFBOOT_FIT_RAMDISK) and patch the loaded DTB. Compressed (gzip)
  ramdisks reuse the same fit_load_image_ex() decompress path.
* RAMDISK=1 build switch defines WOLFBOOT_FIT_RAMDISK;
  WOLFBOOT_LOAD_RAMDISK_ADDRESS is plumbed through tools/config.mk ->
  Makefile sed -> include/target.h.in. Defaults to 0; when 0 the
  ramdisk stays at whatever fit_load_image returned.
* hal/zynq.c and hal/versal.c bump fdt_totalsize headroom from 512 to
  768 bytes to fit the new linux,initrd-{start,end} entries.
* config/examples/zynqmp_sdcard.config gains a commented-out opt-in
  block (RAMDISK=1, WOLFBOOT_LOAD_RAMDISK_ADDRESS=0x40000000, alt
  LINUX_BOOTARGS) so a single config file covers both rootfs-on-disk
  and FIT-bundled-initramfs flows.

Builds against the existing master configs are byte-identical when
GZIP=0 and RAMDISK is unset.
2026-05-05 10:16:16 +02:00
David Garske 8b7ce4e4dd
Merge pull request #756 from danielinux/fTPM-TZ
Added support for fwTPM in TrustZone + STM32H5 test app
2026-04-22 14:10:19 -07:00
David Garske 5d71feb4ef PolarFire SoC M-Mode: Fix L2 scratchpad init, QSPI programmer, and add WDT support 2026-04-22 19:08:00 +02:00
David Garske bc454d9f4b Peer review fixes 2026-04-22 14:10:55 +02:00
David Garske 00313b3e43 Rename LPC54S018M to LPC54S0XX 2026-04-22 14:10:55 +02:00
David Garske 91145d53bb Add wolfBoot support for NXP LPC54S018M-EVK 2026-04-22 14:10:55 +02:00
Daniele Lacamera b22c85ed27 Added support for fTPM in TrustZone + STM32H5 test app 2026-04-21 20:53:48 +02:00
Brett Nicholas 2a385eb384 review: fix Makefile conditional 2026-04-17 08:27:05 +02:00
Brett Nicholas c45268ed7f monolithic self-updates: force DISABLE_BACKUP=1, eliminate swap, eliminate update code 2026-04-17 08:27:05 +02:00
David Garske 58c2e044a6
Merge pull request #730 from danielinux/clang-linker
Fix embedded images built with the clang compiler
2026-04-13 10:55:19 -07:00
Daniele Lacamera 201c2c5c7e Adjust BIGINT limits for new wolfSSL ECC+SMALLSTACK 2026-04-07 14:14:44 +02:00
Mattia Moffa 8572e207f2 Use LLVM LDD with clang 2026-04-03 18:09:16 +02:00
Mattia Moffa 82e814881f Undo redundant workarounds 2026-04-03 18:09:16 +02:00
Daniele Lacamera bcd4d8b9e6 Fixed Clang sections in TZEN images 2026-04-03 18:09:16 +02:00
Daniele Lacamera 8583a87c96 Concentrate flags for clang in arch.mk 2026-04-03 18:09:16 +02:00
Daniele Lacamera f6ec4765c6 Discard volatile sections during app objcopy when compiling with clang 2026-04-03 18:09:16 +02:00
Daniele Lacamera de831c524f Changed efi target type to be more portable 2026-03-24 13:52:51 +01:00
Daniele Lacamera 4ffa24c05f Update CI + fix new findings with cppcheck 2.20 2026-03-24 12:19:44 +01:00
David Garske a56c70e90a Support for NXP T1040 RDB 2026-03-20 14:51:15 +01:00
David Garske 6ca5cb9b94 Feedback from customer with actual hardware 2026-03-20 14:43:42 +01:00
Mattia Moffa b5fab30310 Enable NSC veneers when TZEN=1, even without WOLFCRYPT_TZ 2026-03-18 22:26:32 +01:00
Daniele Lacamera 180e53b186 Fix regression in WOLFBOOT_RAMBOOT_MAX_SIZE 2026-03-12 09:28:51 +01:00
Daniele Lacamera 4eca085b54 Added USE_CLANG option to Makefile 2026-03-10 15:49:45 +01:00
Daniele Lacamera 19d562dbde Fixed build errors with cross-clang compiler 2026-03-10 15:49:39 +01:00
David Garske d23943a5af PolarFire SoC M-Mode, QSPI and L2-LIM support
Adds support for running wolfBoot in **Machine Mode (M-mode)** on the PolarFire SoC MPFS250T, booting from eNVM and loading a signed application from **SC QSPI flash** into on-chip LIM (Loosely Integrated Memory). No HSS (Hart Software Services) or DDR is required. It also extends the existing PolarFire HAL with multi-hart support, L2 cache configuration, per-hart UART, and refactors shared code (SDHCI, SCB mailbox, linker/test-app) for both S-mode and M-mode builds.
2026-03-09 07:29:27 +01:00
David Garske 2277dfa2bf Peer review fix 2026-03-03 12:29:09 +01:00
David Garske cbaa132588 Fix for tools/scripts/va416x0/build_test.sh portability (MacOS)
Added option to support wolfCrypt test/benchmark in test-app
Add some checking if partition size is too large
2026-03-03 12:29:09 +01:00
Daniele Lacamera 00bf88b69d Added upper limit for NO_PARTITIONS builds 2026-03-02 14:18:23 +01:00
Brett Nicholas 4d31ef5502 Add self-header feature with support for sim and AURIX TC3xx 2026-02-27 11:39:51 +01:00
Daniele Lacamera c352808ba1 Minor build fixes
- exclude attestation symbols for non-PSA builds
- fix dependency of signed test-application on keytools
2026-02-11 19:31:26 +01:00
Daniele Lacamera a20101d6df Add support for DICE attestation + PSA attestation 2026-02-06 18:36:47 +01:00
David Garske 4e3e55d53a Add NXP S32K1xx support with full update functionality
- HAL: Flash (FTFC), UART (LPUART1), Clock (FIRC 48MHz), Watchdog
- Requires NVM_FLASH_WRITEONCE=1 and RAM_CODE=1 for proper operation
- Test app with interactive console: status, trigger, success, reboot
- LED indicators: Green (v1), Blue (v2+)
- Flash automation script: tools/scripts/nxp-s32k142-flash.sh
- Tested on S32K142EVB with sector swap update

Supported variants: S32K142 (256KB), S32K144 (512KB), S32K146 (1MB), S32K148 (2MB)
2026-01-19 19:13:01 +01:00
Daniele Lacamera 09a6292f7e Added 'emu-test-apps' + test.sh script for m33mu 2026-01-15 13:54:10 +01:00
Daniele Lacamera af670811fe zephyr integration as TEE.
- Integrates wolfPSA as psa_crypto/psa_store engine in TrustZone
- Provides interface to access APIs from non-secure mode
- Patches to enable wolfboot as TEE module in zephyr
- Patches to enable stm32h563-nucleo/ns as target in zephyr
- psa_crypto zephyr example using wolfboot/wolfPSA as secure engine
2026-01-07 08:27:58 +01:00
David Garske 0292da582b Refactor disk.c for generic use. Wired up uSD read for MBR/GPT 2025-12-24 18:31:55 +01:00
David Garske e055585942 Support for Microchip PolarFire SoC (MPFS250) 2025-12-24 18:31:55 +01:00
Brett Nicholas 6607b66049 Allow user to pass their own NVM init file 2025-12-10 07:43:32 +01:00
Brett Nicholas 57b874be2d Simplify use of user-supplied keys and certificates with test app via
new `USER_ variables`
2025-12-10 07:43:32 +01:00
David Garske 2546ebcaf9 Fixes for unused variables. Also repaired STM32WB55 build with PKA 2025-11-20 18:26:58 +01:00
Mattia Moffa d5b2b4728d Various STM32 TrustZone improvements
- New config flags for flash geometry
- New script to automatically set option bytes
- End of stack address fix for the STM32U5 test app
- STM32U5 support for NUCLEO-U575ZI-Q (previously only supported
  discovery board)
2025-11-20 18:00:55 +01:00
David Garske 4e1c9f0e1f Revert changes to cppcheck and unused arguments 2025-11-19 16:29:28 +01:00
David Garske 8cb3d33339 Added STM32H5 SPI Driver and support for TPM
Cleanup STM32H5 HAL port.
Refactor `__ARM_FEATURE_CMSE` to `TZ_SECURE()`
Refactor attribute cmse_nonsecure_entry to use new macro `CSME_NSE_API`
Added TPM Non Secure Callable API's
Added TPM support to STM32H5 test application
2025-11-19 16:29:28 +01:00
Juliusz Sosinowicz 2345138a1b Implement filesystem-based partition state access and CLI tools
- Add filesystem access implementation in HAL (`hal/filesystem.c`)
- Introduce new library_fs target and build rules for filesystem-backed partition management
- Provide example configuration for library_fs
- Add CLI application (`hal/library_fs.c`) to query and manage partitions
- Update documentation with usage instructions and build steps for the new CLI tool
- Update .gitignore
2025-10-30 16:31:27 +01:00
David Garske 2df3768cce Fixes to support latest wolfSSL (disable KDF/PRF) 2025-10-16 23:02:09 +02:00
David Garske b1ff1e36eb Minor improvements. STM32H5 non-secure flash watermark. Fixing layout of linker script. Still getting fault on calls to smse functions like `wcs_get_random`. 2025-10-10 19:42:20 +02:00
Brett Nicholas 42cf7e9b70 TC3xx: Replace IDE/AURIX project with new HAL module 2025-10-08 11:03:44 -06:00
Brett Nicholas 2e06a5fafe Refactor Makefiles to allow overriding library dependency paths 2025-10-02 15:16:27 +02:00