Commit Graph

487 Commits (bigbrett-patch-1)

Author SHA1 Message Date
David Garske 48c7c356d5
Merge pull request #490 from danielinux/universal_keystore_padding
Keygen to allow multiple keystore types
2024-08-20 17:13:57 -07:00
Daniele Lacamera 837b8bf315 Keygen to allow multiple keystore types
when WOLFBOOT_UNIVERSAL_KEYSTORE=1, the keystore.der file should align
all the keys to the maximum slot size (576).
2024-08-20 14:58:50 +02:00
David Garske 9e17315d49 Fixes for building wolfBoot with XMSS/LMS. 2024-08-14 18:06:12 +02:00
David Garske be169145e2 Fixes for Zynqmp QSPI sizes on ZCU102. Fix for XMSS/LMS on Windows mingw with fopen binary mode. 2024-08-14 18:06:12 +02:00
David Garske b5a5b28f19 Fix unit test and new `WOLFBOOT_USE_PCI`. 2024-08-14 18:06:12 +02:00
David Garske 8a7f5e5baa Refactor to eliminate PLATFORM_ -> TARGET_. Fix CI errors. 2024-08-14 18:06:12 +02:00
Daniele Lacamera d2811b2538
Unit test for update_ram.c (#488)
* Initial draft with two test cases

* Added more unit tests. Found OOB access.

* Fix potential OOB access with too-large update img

* NO_FORK disabled by default

* Cover more corner cases

* Added unit tests for update_ram.c

Fixed fallback in partition election
2024-08-13 09:36:33 -07:00
Daniele Lacamera 3ff7059dc5
Unit tests for update_flash.c (#487)
* Initial draft with two test cases

* Added more unit tests. Found OOB access.

* Fix potential OOB access with too-large update img

* NO_FORK disabled by default

* Cover more corner cases
2024-08-13 06:25:49 -07:00
Daniele Lacamera 2588aa7611 Unit test: make flash mocking generic
Avoid duplicated test code for mocking the flash
2024-08-12 11:00:13 +02:00
Daniele Lacamera c61d516e81 Added copyright notices to unit test files 2024-08-07 17:18:30 +02:00
Daniele Lacamera 58a2e089a8 Added unit tests for delta.c 2024-08-07 16:45:17 +02:00
Brett Nicholas 2d6308ec2c - Infineon TC3xx support
- fix (existing) unused variable compiler warnings
- documentation updates
- add multi-sector erase option
2024-07-31 09:22:31 +02:00
Daniele Lacamera 04a6ec66a6 Fix ferror(NULL) in xmss_common.h 2024-07-22 16:29:12 +02:00
Daniele Lacamera c748f4c809 Updated footprint test limits
- Optimized test (don't rebuild keytools / regenerate keys if testing
  the same algo)
- Updated two overshot limits
- Reduced limits due to compiler change
- Added footprint test for LMS and XMSS
2024-07-22 16:29:12 +02:00
Daniele Lacamera aaf40aa018 Removed ferror(NULL) from lms_common 2024-07-18 10:55:25 +02:00
Daniele Lacamera d390873096 Fix padding in test 2024-07-18 10:15:50 +02:00
Daniele Lacamera 8b73250324 Set trailer on BOOT partition when storing the enc key 2024-07-17 17:00:11 +02:00
Daniele Lacamera e586087422 Added unit test NVM + ENCRYPTION, fix offset 2024-07-17 13:42:28 +02:00
Daniele Lacamera 04111a67b4 Added unit tests for FLAGS_HOME + fix NVM election
Taking into account the additional offset for PART_UPDATE_FLAGS at the
end of each flags sector when comparing two redundant flag sectors in
NVM_FLASH_WRITEONCE + FLAGS_HOME
2024-07-17 11:28:40 +02:00
Daniele Lacamera 2ec2bcdf79 Fixed flag comparison selecting most recent flags 2024-07-17 08:55:14 +02:00
David Garske 3444c47fdb * Added support for RX65N and RX72N with native Makefile and RX ELF GCC compiler.
* Added initialization of the clocks and UART driver.
   - wolfBoot uses on chip high speed oscillator (HOCO) at (120MHz RX65N and 240Mhz for RX72N).
* Added RX RSPI and QSPI driver support with external SPI flash
* Improve documentation and fix spelling errors.
* Added .srec (s-record) format support
* Added RX TSIP support for ECDSA (requires https://github.com/wolfSSL/wolfssl/pull/7685).
* Allow custom implementation of `get_trailer_at`, `set_trailer_at` and `set_partition_magic` using `CUSTOM_PARTITION_TRAILER`
2024-07-17 06:08:31 +02:00
Daniele Lacamera 8f0c090b69 Unit tests for memory blob parsers 2024-07-16 17:37:01 +02:00
Daniele Lacamera 80fa66fe44 Added more tests 2024-07-16 17:13:05 +02:00
Daniele Lacamera dd4bd8e91a Added new unit tests for NVM_FLASH_WRITEONCE 2024-07-16 16:06:54 +02:00
John Bland 6c3940fafc refactor final step of powerfail safe update and add
emergency fallback test
2024-07-10 16:58:23 -04:00
David Garske 1854383462 Do not enable OTP write protect unless `ENABLE_OTP_WP=1` is passed during make. 2024-07-09 16:18:08 -07:00
David Garske fbc6f02dea More documentation updates. Cleanups in the otp-keystore-gen. 2024-07-09 13:26:12 -07:00
David Garske 750c8f6ace Define a generic max OTP size to appease otp_keystore.h 2024-07-09 10:49:28 -07:00
David Garske ace95cc2dc Added instructions for STM32H5 demo to `docs/flash-OTP.md`. 2024-07-09 10:27:52 -07:00
Daniele Lacamera 4f5e168350 Moved keystore.c overwrite check 2024-07-09 18:03:51 +02:00
Daniele Lacamera 46f0d87946 test: revert keystore.c overwrite check 2024-07-09 17:42:58 +02:00
Daniele Lacamera 8f41132ca3 Added more verbosity to key import failure error 2024-07-09 16:31:18 +02:00
Daniele Lacamera 2082bd003c Avoid to silently overwrite keystore.c 2024-07-09 09:28:40 +02:00
Daniele Lacamera 213315507c Add command line tool to generate otp.bin 2024-07-09 08:42:33 +02:00
Daniele Lacamera 32d6592e50 Fixed regression on powerfail resume 2024-07-04 18:19:02 +02:00
Daniele Lacamera 597ca3a406 Added test to reproduce "wrong delta base version" bug 2024-07-04 17:14:36 +02:00
David Garske 918fdc57fd Added keygen `--der` option to allow ECC private key as ASN.1/DER. Added sign tool ECC key load support for ASN.1/DER private key (default is raw pub x/y, priv d). Refactored sign tool RSA/ECC logic to consolidate code and allow proper "auto" detection for different RSA key sizes. 2024-06-26 20:11:04 +02:00
David Garske 971cbe0ecc
Merge pull request #449 from danielinux/stm32h7_otp
Support for OTP Flash as trust anchor for keystore
2024-05-24 16:34:29 -07:00
Daniele Lacamera 9b378d005b Reviewer requests: fix portability of "packed"
+ separate object for hal in otp-keystore-primer
2024-05-24 16:42:07 +02:00
Daniele Lacamera 75cd725c9d Fix linker warnings when building with otp 2024-05-24 16:37:25 +02:00
Marco Oliverio bf55ac1ab5 x86_efi: fixes
- do not use a custom section for the keystore as it will not be loaded in the
UEFI env
- remove and disable WOLFBOOT_LOAD_ADDRESS
- copy .rodata from .elf to .efi as the new version of gnu-efi ld scripts do
not merge .rodata into .data anymore
- fix typo in compile_efi_linux.sh
2024-05-20 17:03:16 +02:00
Daniele Lacamera 307e3b426c otp_keystore_primer: fixed provisioning + readonly 2024-05-20 10:58:43 +02:00
Daniele Lacamera fd80688a8e Added documentation on FLASH_OTP_KEYSTORE 2024-05-15 10:55:47 +02:00
Daniele Lacamera 9dd8b7cf97 Renamed FLASH_OTP_ROT to FLASH_OTP_KEYSTORE 2024-05-15 10:55:47 +02:00
Daniele Lacamera 02bfe8a6a1 Added OTP support for STM32H5 2024-05-15 10:55:47 +02:00
Daniele Lacamera 572e1157bc Added "otp-keystore-primer" tool 2024-05-15 10:55:46 +02:00
Daniele Lacamera d1eabc2e31 Keystore module for OTP in FLASH 2024-05-15 10:55:46 +02:00
Daniele Lacamera 62a5b9f8fa Export hal functions for OTP read/write access 2024-05-15 10:55:46 +02:00
David Garske 0ddde6f074
Merge pull request #444 from miyazakh/renesas_rz_rsip
Add  RSIP use to Renesas RZ support
2024-05-10 11:52:12 -07:00
David Garske 027c6847e5
Merge pull request #443 from wolfSSL/x86_fsp_backport
x86 fsp backport
2024-05-09 07:46:56 -07:00