David Garske
8a7f5e5baa
Refactor to eliminate PLATFORM_ -> TARGET_. Fix CI errors.
2024-08-14 18:06:12 +02:00
David Garske
cf936dffa2
Fixes for Xilinx zynqmp.
2024-08-14 18:06:12 +02:00
David Garske
3687851f75
Xilinx zynqmp documentation cleanups. Fixes for building with Eclipse wildcard .c include pains.
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
David Garske
44e4ce9874
Merge pull request #486 from danielinux/unit-test-mock-flash-generic
...
Unit test: make flash mocking generic
2024-08-12 11:12:37 -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
30a1f67e43
Added 32bit simulator via TARGET=sim FORCE_32BIT=1 ( #485 )
...
* Added 32bit simulator via TARGET=sim FORCE_32BIT=1
Tests can now run on 32bit simulator (e.g. to match XMALLOC fixed
sizes with sp_math and WOLFBOOT_SMALL_STACK).
* Added draft for new workflow: test simulator with different memory config
* Fix 64bit, SMALL_STACK xmalloc sizes
* Test defaults to SPMATH
* Fixed test: defaults to spmath. Added RSA tests (failing)
* Fixed RSA allocation sizes for 64bit build
* Added 64bit fastmath test (failing)
* Fixed ecc_point size for 64bit builds (FASTMATH)
* simulator config: use SPMATH by default
* Attempt to fix i386 libc dep in workflow
* Added HUGE_STACK to silence warning in FASTMATH+RSA4096 tests
2024-08-09 06:46:15 -07:00
David Garske
8273575e55
Merge pull request #483 from danielinux/delta-unit-tests
...
Added unit tests for delta.c
2024-08-07 09:51:17 -07: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
David Garske
4d18fe837d
Merge pull request #482 from bigbrett/aurix-hotfixes
...
Fix AURIX build error
2024-07-31 12:33:43 -07:00
Brett Nicholas
161f06e046
fix variable name typo
2024-07-31 12:32:13 -06:00
Brett Nicholas
214964642b
review comments re: style and variable init
2024-07-31 09:22:31 +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
David Garske
98e8a987c2
Merge pull request #480 from MulattoKid/imx_rt_hab_fix
...
Add HAB support irrespective of MCUSDK setting for imx_rt target
2024-07-30 09:26:54 -07:00
Daniel Fedai Larsen
ca09a1ab99
Add HAB support irrespective of MCUSDK setting for imx_rt target
2024-07-29 07:53:22 +02:00
David Garske
53530c466b
Added hal_led_on/hal_led_off API's enabled with `ENABLE_LED` for testing.
2024-07-25 06:17:38 +02:00
David Garske
6078d58ace
Fix Renesas RX for internal flash write when != 128 bytes. Improved internal flash test case.
2024-07-25 06:17:38 +02:00
David Garske
3f3a3ec47a
Fix for Renesas RX hal_flash_write where length is < 128.
2024-07-25 06:17:38 +02:00
David Garske
b6e4e226e2
Updated Renesas RX TSIP Benchmarks to include RX65N.
2024-07-25 06:17:38 +02:00
David Garske
d747afb780
Move interrupt disable to do_boot.
2024-07-23 18:37:06 +02:00
David Garske
f7fed89f27
Fix to make sure wolfBoot leaves IRQ's disabled. The TSIP driver will leave IRQ's on which could cause customer issues. Added new `spi_flash_chip_erase` API for the SPI flash driver.
2024-07-23 18:37:06 +02:00
David Garske
8b1babb7d8
Merge pull request #474 from danielinux/update-submodules-5.7.2
...
Prepare release 2.2.0
2024-07-22 07:53:51 -07:00
Daniele Lacamera
51fe05cf9c
v 2.2.0: Added to ChangeLog in README.md
2024-07-22 16:29:12 +02:00
Daniele Lacamera
421bd83913
Update wolfBoot version to 2.2.0
2024-07-22 16:29:12 +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
eb57d0a100
Update compiler used for footprint tests
2024-07-22 16:29:12 +02:00
Daniele Lacamera
5295050071
Updated submodules (wolfSSL 5.7.2)
2024-07-22 16:29:12 +02:00
David Garske
8a5c039042
Merge pull request #475 from danielinux/imx-rt-hab
...
Add support for building for HAB for i.MX RT targets
2024-07-22 07:11:19 -07:00
Daniele Lacamera
e081d74623
Moving target-specific options to arch.mk
2024-07-22 08:33:52 +02:00
Daniel Fedai Larsen
e0126ff4e8
Add support for building for HAB for i.MX RT targets
2024-07-22 08:14:33 +02:00
David Garske
f4935268fa
Merge pull request #460 from danielinux/stm32u5_spi
...
[QSPI] Fixed registers and pin config on STM32U5
2024-07-19 07:33:01 -07:00
Daniele Lacamera
d11acccbf7
Merge pull request #473 from dgarske/swap_tail_type
...
Fix for error dereferencing type-punned pointer in update_flash.c `wolfBoot_swap_and_final_erase`
2024-07-19 12:52:08 +02:00
Daniele Lacamera
64f3a395fb
Merge branch 'master' into swap_tail_type
2024-07-19 12:37:47 +02:00
David Garske
b3f3b5356c
Fix for image_open wolfBoot_get_blob_version print. Added NULL protection on `wolfBoot_get_blob_version`.
2024-07-19 09:08:48 +02:00
David Garske
094dc227de
Change default wolfBoot_printf logging to use stderr.
2024-07-19 09:08:48 +02:00
David Garske
a49f4405a5
Add logging for wolfBoot_update() and partition version information. Enabled with `DEBUG_UART` or other PRINTF_ENABLED logging.
...
Example Log:
```
wolfBoot HAL Init
SPI Probe: Manuf 0xC2, Product 0x20
Boot at 0xFFE00000 (size 115856, version 0x2)
Update at 0x200000 (size 115856, version 0x0)
Staring Update (fallback allowed 0)
Update at 0x200000 (size 115856, version 0x0)
Boot at 0xFFE00000 (size 115856, version 0x2)
Versions: Current 0x2, Update 0x3
Copy sector 0 (part 1->2)
Copy sector 0 (part 0->1)
Copy sector 0 (part 2->0)
Boot at 0xFFE00000 (size 115856, version 0x3)
Update at 0x200000 (size 115856, version 0x0)
Copy sector 1 (part 1->2)
Copy sector 1 (part 0->1)
Copy sector 1 (part 2->0)
Copy sector 2 (part 1->2)
Copy sector 2 (part 0->1)
Copy sector 2 (part 2->0)
Copy sector 3 (part 1->2)
Copy sector 3 (part 0->1)
Copy sector 3 (part 2->0)
Boot at 0xFFE00000 (size 115856, version 0x3)
Update at 0x200000 (size 115856, version 0x0)
Copy sector 58 (part 0->2)
Boot at 0xFFE00000 (size 115856, version 0x3)
Booting version: 0x3
```
2024-07-19 09:08:48 +02:00
David Garske
82094c92e1
Cleanup "tail" to "trailer"
2024-07-18 14:18:51 -07:00
David Garske
8b954d4a6c
Fix for update_flash.c `error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]`. Cleanup the swap logic for `EXT_ENCRYPTED`. Switch to using a `uint32_t` directly for checking tail magic.
2024-07-18 13:55:04 -07:00
David Garske
f0c4252bce
Merge pull request #470 from danielinux/nvm-writeonce-flags-compare
...
Fixed flag comparison selecting most recent flags
2024-07-18 06:07:22 -07:00
Daniele Lacamera
aaf40aa018
Removed ferror(NULL) from lms_common
2024-07-18 10:55:25 +02:00
Daniele Lacamera
428a943c83
Fixed STM32F7 linker script error with new gcc
2024-07-18 10:40:20 +02:00
Daniele Lacamera
682873ea6d
Test CI update on 'build' workflow
2024-07-18 10:32:29 +02:00
Daniele Lacamera
d390873096
Fix padding in test
2024-07-18 10:15:50 +02:00
Daniele Lacamera
55396ed969
Restore erase in update_trigger.
...
Caveat: in case of powerfail during wolfBoot_update_trigger, the key
previously set may be lost. This is OK assuming that the update process
can resume from the previous step in the application (setting the key
before triggering the update).
2024-07-18 09:33:58 +02:00
Daniele Lacamera
d31380675e
Fix key persistence with FLAGS_HOME + EXT_ENCTYPT
2024-07-18 08:42:39 +02:00
Daniele Lacamera
d3795c81cd
Implicitly add trailer when setting enc key
2024-07-17 18:33:37 +02:00
Daniele Lacamera
8b73250324
Set trailer on BOOT partition when storing the enc key
2024-07-17 17:00:11 +02:00