Commit Graph

321 Commits (master)

Author SHA1 Message Date
Thomas Cook e7eb152a83 Address copilot and fenrir issues 2026-11-04 20:24:54 +01:00
Thomas Cook 13d11a85bc Misc cleanup 2026-11-04 20:24:54 +01:00
Thomas Cook fcbde929d8 TI AM64x port, based on the TI MCU Plus SDK 11.02, running on one of the cortex-r5f's. 2026-11-04 20:24:54 +01:00
Dirk Van Haerenborgh ae5223589b feat: allow to provide a linker script instead of using the included one
We're doing some oddities in our linker script that differ from what is
done by default. To that end, we'd like to provide our own linker script
so we don't have to carry patches forward
2026-11-04 15:18:32 +01:00
David Garske 767ef3de3c Add compressed firmware updates installed into an execute-in-place slot 2026-11-04 14:35:53 +01:00
Mattia Moffa 24776f3b7a
Merge pull request #949 from dgarske/psoc_e8
Add wolfBoot target for Infineon PSOC Edge E8
2026-10-28 23:02:17 +01:00
David Garske 3681ea8996 Add wolfBoot target for Infineon PSOC Edge E8 2026-10-28 14:24:42 -07:00
Daniele Lacamera 76a8b2b3ea Refuse partitions too small for the trailer, add STM32F4 custom trailer (#937) 2026-10-28 14:35:31 +01:00
David Garske da26b3fa5a PolarFire SoC: read-only sNVM page survey behind MPFS_SNVM_DUMP 2026-10-27 16:06:05 -07:00
David Garske b4e2436040 PolarFire SoC: boot mode 2 User Boot Loader stub verifying the eNVM wolfBoot 2026-10-27 16:06:05 -07:00
David Garske e10b343500 PolarFire SoC: SBI vendor extension for the OS: PUF keys, System Controller services and flash access 2026-10-27 16:06:05 -07:00
David Garske a91c824e45 PolarFire SoC: sNVM/PUF key storage and disk image encryption 2026-10-27 16:06:04 -07:00
David Garske 0e2e7e7e31 PolarFire SoC: M-mode scratchpad, DDR training, SBI and CI fixes 2026-10-27 16:06:04 -07:00
Brett Nicholas 41fbe4b326 Improve support for ECC flash parts:
- Add NVM ECC mode, which introduces a new erase check HAL API to use
   flash controller HW to blank check sectors instead of reading them
   and comparing to an erased byte (which typically triggers an ECC
   fault)
 - Add NVM Journal mode as an alternative to NVM_FLASH_WRITE_ONCE that
   does not require a sector-size RAM buffer and dramatically reduces
   the number of erases and programs required to set individual flags,
   while also being much more robust to power-cuts.
2026-10-27 16:46:40 +01:00
David Garske b555895193
Merge pull request #948 from aidangarske/mcxn-secure-app
Add an MCXN947 secure application handoff config
2026-10-26 16:07:49 -07:00
David Garske d490e36d2e fdt: boot a FIT with no kernel load/entry and no device tree 2026-10-23 11:49:49 -07:00
Aidan Garske 1d47fa7b62 Add an MCXN947 secure application handoff config with m33mu tests 2026-10-23 18:27:33 +01:00
David Garske 608610dc16 imx95_a55: add the Cortex-A55 target and a stage 1 replacing U-Boot SPL 2026-10-15 15:27:28 -07:00
David Garske e415826eb7 Add STM32H7S target with partitions on external Octo-SPI NOR 2026-10-11 21:45:53 -07:00
David Garske 3a0cca7a91 build: libgcc-free RISC-V FDT byte swaps, prebuilt keytools, LDFLAGS_EXTRA 2026-10-06 18:33:10 +02:00
David Garske 97e895613d tpm: add a TIS-over-I2C transport and a generic I2C driver interface 2026-10-06 18:14:10 +02:00
David Garske a16e2e8f11
Merge pull request #912 from bigbrett/tc3-toolchain-support
Expand TC3xx toolchain support
2026-10-02 08:02:29 -07:00
Brett Nicholas dd7a5d7822 Expand TC3xx toolchain support:
- HighTec GCC on both tricore and HSM
 - HighTec LLVM on both tricore and HSM
 - Open source GCC for both tricore and HSM
2026-09-28 15:02:05 -06:00
David Garske 23989067ec zynqmp: add non-cacheable DMA window and hal_dma_set_noncached() 2026-09-24 13:27:04 +02:00
Aidan Garske 3942afad6b Build the i.MX RT700 TrustZone image without a contiguous factory image 2026-09-24 13:12:36 +02:00
Sameeh Jubran 21ea4dc20a sbom: align comments with wolfcrypt PURL-only matching
Makefile no longer says a scan matches wolfssl:wolfcrypt. Re-vendor
wolfGlass at 48796ea so the generator contract exempts nested wolfcrypt.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 13:10:18 +02:00
Sameeh Jubran ec05d5a7d5 sbom: drop nested wolfcrypt CPE
Re-vendor wolfGlass at 3b708da. wolfcrypt stays a nested component
(name, version, PURL). Matching uses the wolfssl CPE only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 13:10:18 +02:00
Aidan Garske 6aecce0463 Enable the secure application handoff on STM32H5 2026-09-22 15:35:42 +02:00
Alex Lanzano 386147ed94 Rename board.h to wolfHAL_board.h 2026-09-22 15:29:32 +02:00
David Garske 4093fa0e17 Add NXP i.MX 8QuadMax MEK port including BL33 support 2026-09-21 18:07:44 +02:00
Daniele Lacamera f0b2665596 Fix nrf5340 test-app link error: add nrf5340_uart.o to APP_OBJS
The test-app Makefile was not linking nrf5340_uart.o (which defines
nrf5340_uart_crlf) for nrf5340% targets with DEBUG_UART=1, causing
'undefined reference to nrf5340_uart_crlf' when linking image.elf.

Also guard the main Makefile's nrf5340_uart.o with DEBUG_UART=1 for
consistency.
2026-09-18 17:24:08 +02:00
Daniele Lacamera a2f7d8b651 Fix nrf5340 link error + cypsoc6 partition-overlap false positive
nrf5340: the target references nrf5340_uart_crlf (src/update_flash.c)
but the Makefile does not compile hal/nrf5340_uart.c, so the linker
fails. Add the object to OBJS (Makefile) and APP_OBJS (test-app).

cypsoc6: the new boot/update/swap vs bootloader-region #error guards
in include/target.h.in fire on the cypsoc6 layout, where the boot
partition intentionally overlaps the bootloader region (the bootloader
and the boot image share the same flash region). Introduce
WOLFBOOT_ALLOW_PART_OVERLAP (defined in cypsoc6.config, gated in
target.h.in, added to CONFIG_VARS in tools/config.mk) to suppress the
guards for targets that legitimately overlap.

Verified: nrf5340 builds (make distclean + cp config + make, exit 0,
wolfboot.bin created). cypsoc6 cannot be built locally (the CI checks
out lib/psoc6pdl from Infineon, which is not available locally), but
the WOLFBOOT_ALLOW_PART_OVERLAP guard is verified to suppress the
#error for the cypsoc6 layout.
2026-09-18 15:07:34 +02:00
David Garske 8eafe1ef76
Merge pull request #890 from bigbrett/tc4-wolfboot
AURIX TC4xx support
2026-09-14 14:22:21 -07:00
David Garske b0fe251747 Add Nuvoton NuMaker M2354 Cortex-M23 target with TrustZone 2026-09-14 18:08:40 +02:00
Brett Nicholas 6d652d444f Support for AURIX TC4xx host and CSRM cores 2026-09-12 09:21:38 -06:00
David Garske 871ab86dc5
Merge pull request #886 from bigbrett/aurix-makefile-reorg
AURIX makefile housekeeping
2026-09-10 16:13:56 -07:00
Brett Nicholas 678781db39 AURIX tc3 ARCH/TARGET refactor anticipating TC4xx 2026-09-10 10:19:08 -06:00
David Garske 99725d278c
Merge pull request #878 from bigbrett/tc3-tweaks
tc3 quickfixes
2026-09-02 14:08:40 -07:00
David Garske 664b09a075 update_disk: load signed image from a file when a filesystem is present 2026-09-02 10:47:33 +02:00
Brett Nicholas 626db410be static library docs 2026-09-01 09:19:36 -06:00
Marco Oliverio 9fc5f75234 ci: add pic32cz stub build 2026-08-28 13:11:26 +02:00
David Garske 25cdd5a0d7 c2000: add wolfBoot TI C28x (TMS320F28P550SJ) secure-boot XIP port 2026-08-25 00:01:33 +02:00
David Garske 4fedc93ed8 imx95_m7: fix console/status overlap, cache handoff, timebase and build wiring 2026-08-24 18:46:41 +02:00
David Garske eb7ad83ca0 cm4: add Raspberry Pi Compute Module 4 (BCM2711 Cortex-A72) target with authenticated boot 2026-08-24 12:47:34 +02:00
Sameeh Jubran 0b6bcd1221 sbom: re-vendor wolfGlass at b44ae8d
Picks up per-configuration serialNumber and documentNamespace, so two
configurations of one wolfBoot version no longer share an identifier
inside a scanner. Also brings CPE/PURL build-metadata stripping,
--dep-* value validation, wolfcrypt version inheritance, and the
sbom.am host-cc macro capture.

The Makefile comment that recorded this as an open wolfGlass gap is
no longer true, so it goes.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran da1d2cfc27 sbom: generate the keystore before checking the source list
src/keystore.c holds the public keys that authorise a firmware update.  The
build generates it from the signing key, so a fresh checkout does not hold it,
and the missing-source guard read that absence as an absent submodule.  Every
Make-path SBOM job failed on it.

Depend on it, so it exists before the guard runs, and name it in the source
list unconditionally: sbom.mk expands SBOM_SRCS through $(call) while reading
the makefile, so a file that appears later can never reach the document.
Without that second half the guard passed while the document was still one
source short, which is the silent under-report the guard exists to prevent.

Build the list with $(shell) rather than $(wildcard).  GNU make 3.81 caches
directory contents, so it never sees a source generated during the same run.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran 433c6ae85c sbom: name each document after the configuration it describes
Both output files were wolfboot-<version>.{cdx,spdx}.json, so every
configuration at a given version wrote to the same two paths. wolfBoot has
on the order of 100 target configurations and each is a different image
with a different source set, so building a second one overwrote the first
with no warning.

Put TARGET, SIGN and HASH in the name, on the Make and the CMake route
alike, so the two routes stay in step.

This does not fix the identity of the documents themselves. gen-sbom
derives both the CycloneDX serialNumber and the SPDX documentNamespace
from name and version only, so sim and stm32h7 at 2.9.0 still share
urn:uuid:6dc51759-ade2-5967-b392-2f23ed0eb4df, which a tool that keys on
serialNumber treats as one project. That is a wolfGlass change, and it
is not worked around here.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran 1a067c23fb sbom: fail when an object maps to no source, instead of shrinking the SBOM
SBOM_SRCS runs the object list through $(wildcard), so a source that is
not on disk disappears before the driver sees it. The driver's own
--skip-missing warning then has nothing left to report, which is why it
never fires on the Make path that every embedded user takes.

The result is a document that under-reports the image with no diagnostic
anywhere. A sim-tpm build without lib/wolfTPM checked out silently loses
all eight tpm2*.c sources, and validate_sbom.py accepts the result even
though the captured configuration still records WOLFBOOT_TPM=1.

Compare the two lists instead. An object that maps to neither a .c nor a
.S on disk means a submodule or a vendor SDK is absent, so stop and name
the objects on stderr. SBOM_ALLOW_MISSING=1 accepts the partial document
for the cases where the SDK genuinely cannot be present, and still lists
what is missing; imx_rt is one, because it compiles three MCUXpresso
drivers from outside the source tree.

Every other example config either passes or names only submodule paths
that CI checks out, so no job needs the escape hatch.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran a4ef6c4618 sbom: describe the wolfSSL the image really holds
The bootloader is built WOLFCRYPT_ONLY: include/user_settings.h defines
it for every configuration except a wolfHSM server with certificate-chain
verification, so the image carries the crypto subset of wolfSSL and no
TLS.  The SBOM said nothing about that, leaving an integrator to triage
TLS advisories against a bootloader that cannot run TLS.  The re-vendored
generator reads the macro out of the captured configuration and records
the subset; the wolfssl component stays, because it is the identifier NVD
maps wolfSSL advisories to and the wolfcrypt one has no CVEs mapped to it
at all.  wolfcrypt is now nested inside wolfssl rather than beside it,
which is where it ships from.

wolfBoot also stopped emitting a CPE.  NVD has no wolfssl:wolfboot entry,
and an unlisted CPE is indistinguishable to a scanner from a listed one
with no advisories; the submitted identifier is recorded as
wolfssl:sbom:cpe-requested until the dictionary request is published.

The CMake route passed its -D set with no settings header, so it recorded
none of the configuration user_settings.h derives from that set -- a
different document than `make sbom` produced from the same tree, and one
that could not see WOLFCRYPT_ONLY.  It now passes the same SETTINGS_H and
INCLUDE_DIRS the Makefile does.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran f87bc0f465 sbom: record the real build configuration
Re-vendor wolfGlass a54cde1 and declare what the capture needs.
wolfBoot's wolfCrypt configuration is derived rather than literal:
include/user_settings.h turns WOLFBOOT_SIGN_ECC256 into HAVE_ECC,
HAVE_ECC256, ECC_TIMING_RESISTANT and the rest. Capturing CFLAGS alone
recorded the -D set and none of what it selects, so the SBOM described a
signing bootloader with no signature algorithm. Point SBOM_SETTINGS_H at
the wolfCrypt settings header, give it SBOM_INCLUDE_DIRS, and make
include/target.h a prerequisite since user_settings.h includes it and it
carries the flash layout.

For an stm32u5 ECC256 build the configuration record now holds 151
defines, including WOLFBOOT_SIGN_ECC256, HAVE_ECC, HAVE_ECC256,
WOLFBOOT_HASH_SHA256 and IMAGE_HEADER_SIZE=256, none of which appeared
before. BOOTLOADER_PARTITION_SIZE is 65536 rather than the literal `)`
that Make's double expansion had left in its place.

Declare wolfSSL as a dependency component by default, pinned to the
submodule's version. wolfCrypt is compiled into the image rather than
linked, so its sources are listed as wolfBoot's own; recording the
dependency as well is what lets a scanner match wolfSSL advisories
against this firmware.

Record the product as firmware rather than a library, in CycloneDX
component.type and SPDX primaryPackagePurpose alike. Override the
licence to GPL-3.0-or-later: LICENSE is the verbatim GPLv3 and says
nothing about how wolfBoot licenses under it, while all 252
GPL-headered sources say "either version 3 ... or (at your option) any
later version". The per-HAL SBOM inherits the override so the two
documents cannot contradict each other.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00