Commit graph

25 commits

Author SHA1 Message Date
bunnie
53c92df8a5 add uf2-spim feature to bootloader
All the changes here (except one print statement change) are
intended to be feature-gated behind `uf2-spim` in the bootloader.
So, in theory, this should have no boot1 regressions.

The uf2-spim feature is intended for alt-boot and alternate
compiled boot1's and extend the serial-only upload path with
the following features:

1. ability to write SPIM (spi flash memory) using the same
.uf2 files as the USB path
2. requirement of CRC's on blocks
3. a quick test to determine if CRC has been enabled or not
via the `has-crc` command (returns `true` if required, an
error/unknown command message if not).

The CRC makes long/large file uploads reliable, allowing
full device provisioning to happen via serial only, in
cases where USB for whatever reason is not present or available.
2026-06-24 15:08:12 +08:00
bunnie
3e19e7bfd0 add test routine for debugging QE mode 2026-05-08 22:20:32 +08:00
bunnie
a2330e8911
add optionality to turn on clock skipping manually
this is off by default, because it doesn't seem to be entirely
stable. For now, the default configuration when it is turned on,
only activates it for the PKE block. When the CPU block clock
skipping is enabled, instability is occasionally observed.
2026-02-10 22:56:14 +08:00
bunnie
7588d8bf43
add auto-audit capability; add boot hashes
the "audit" command is moved to its own file, as it has
turned into A Thing.

auto-audit now happens on the first few boots to help
verify chip probe infrastructure.

hashes of the boot regions are also printed as a diagnostic
in the audit code.
2026-02-10 03:29:41 +08:00
bunnie
3f869ca389 bump utralib version for publication 2026-01-29 19:12:00 +08:00
bunnie
026ba8654a remember debug-countermeasures option as a comment 2026-01-25 18:33:14 +08:00
bunnie
b6e85f551d add oem-baosec-lite to boot1 2026-01-24 23:48:35 +08:00
bunnie
fba011db3a commit version bump so that we may publish our packages 2026-01-08 03:04:19 +08:00
bunnie
544a0368fc setup the security dependency to pull in sigcheck in crates that use it 2025-12-22 16:18:21 +08:00
bunnie
d874c3e5c2 commit for version bump 2025-12-16 02:02:37 +08:00
bunnie
b12ce104ec fix altboot issues
- don't slot-check in altboot (altboot actually runs in a security
environment that doesn't have boot privileges)
- force bootwait ON by default if altboot is entered - otherwise
we enter a boot-loop
- update release description as towards beta-0
2025-11-25 00:15:36 +08:00
bunnie
d9cc765419 add a feature to force board type
this is useful in the limited case that the board type is incorrect
in alt-boot mode. saves a step having to type in a command to fix
it.
2025-10-29 00:50:24 +08:00
bunnie
09309eb3ae
better altboot support
for updating boot1 on dabao
2025-10-28 21:37:55 +08:00
bunnie
28f7a8d6b2 remove default feature used for testing 2025-10-28 18:54:37 +08:00
bunnie
28e5484c57
expand audit and add boot0 key indelibility test
audit is now expanded to track one way counters and
summarizes security state

boot0 key indelibility test added as a feature, to be
used in the future for CI
2025-10-28 03:37:28 +08:00
bunnie
0d369f8a9f add feature for printing the ifr in boot 2025-10-24 21:15:12 +08:00
bunnie
e1c07cbf0b cleanup some debug output & fix ref link 2025-10-21 04:16:45 +08:00
bunnie
4affb7e979
add the code for initializing keys & setting up ACLs
this code audits the status of the data/key slots,
initializes them according to the platform, and sets
the permissions on them to prevent read-out later on.

A TRNG routine is built into boot1 now, I think it's
reasonably conservatively coded but more testing/inspection
is always good.
2025-10-20 23:39:04 +08:00
bunnie
972450e306
propagate flag changes to crates that can configure it 2025-10-19 01:20:53 +08:00
bunnie
e80a3dadfb cleanup some testing code that should have been eliminated from boot 1
also remove an unused dependency
2025-10-08 02:56:26 +08:00
bunnie
dbb0a75118 bump versions
have to absorb a version change due to xous-semver change

might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
2025-10-06 13:23:18 +08:00
bunnie
e95550cb52 add oled ui for baosec board targets on boot1 2025-10-01 14:27:51 +08:00
bunnie
d9ff07a32f redo the fat emulation layer
present a 128MiB FAT32 disk based on a dumped image that was
clean-initialized on a windows machine (windows is the most
picky so it is used as the template maker).

add hooks for emulating sparse reads of file system structures
that are well outside our available memory range.

add hooks for writing uf2 files when valid sectors are encountered.

this basically works, you can whack a uf2 file into the disk
and the update happens.

the problem now is that something breaks in the repl loop
when USB disk traffic happens, this commit gives us a checkpoint
to work against.
2025-09-30 17:29:06 +08:00
bunnie
01cf1df330 u2f serial upload now working
works over both physical serial port and USB serial port.
2025-09-29 21:58:01 +08:00
bunnie
7b5c4e1cd8 add a draft boot1
boot1 contains all the ideas up to and including the console.

however, the actual file transfer bits are yet to be implemented.

onward!
2025-09-29 13:52:38 +08:00