Commit graph

31 commits

Author SHA1 Message Date
bunnie
e8275d4009 update tools to work with a debug-less SoC
it will automatically determine which reset/halt approach
should be used based on the available registers.
2023-03-10 00:02:53 +08:00
bunnie
df9d7b4eb0 try once again to lean up the dependency tree for usb_update.py 2023-01-06 00:45:05 +08:00
bunnie
8ff492914b remove bip_utils dependency from usb_update.py 2023-01-05 23:47:53 +08:00
bunnie
ad79ebf8ba chore: more typos. no really, i can stop at any time. 2022-12-13 23:02:09 +08:00
bunnie
f5c687a524 clarify user prompt 2022-12-10 17:45:30 +08:00
bunnie
e42c4c7b33 add warnings & support for fused devices
burning a generic image to a fused device will surely lead to
a brick, so, try to keep a user from shooting themselves in the foot.
2022-12-10 16:39:14 +08:00
bunnie
3e79e3e430 add ability to read out data based on a list of virtual sectors
This adds the `--dump` command, which requires a file that is
a copy/paste of a generated virtual to physical table. An example
of this log would look like this:

```
INFO:shellchat::cmds::net_cmd: V|P 6000d000 40799000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 6000e000 4079a000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 6000f000 4079b000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60010000 4079c000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60011000 4079d000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60012000 4079e000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60013000 4079f000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60014000 407a0000 (services\shellchat\src\cmds\net_cmd.rs:770)
INFO:shellchat::cmds::net_cmd: V|P 60015000 407a1000 (services\shellchat\src\cmds\net_cmd.rs:770)
```

and so forth. The script can parse this raw log to create the necessary
page table mappings to read a large region of virtual memory and save
it as a contiguous chunk in a file.
2022-09-16 01:39:49 +08:00
bunnie
ca3cc711a4 Re-add usb_update.py, but with modified help to guide users
It's a bit confusing to run the wrong tool but hopefully there
are ample help messages sprinkled in this to guide the average
user to the right location.
2022-08-16 13:57:36 +08:00
bunnie
b4a784391d clean up the tools directory 2022-07-23 16:07:33 +08:00
bunnie
02daea2f0e add a note for STAGING area as well 2022-04-22 02:48:52 +08:00
bunnie
5bdd3a9f51 modifications to prepare for enhanced USB security
The next release will feature an access control on USB so that
root keys and the encrypted gateware cannot be read back and
transitively the writes would be guttered (but this is not a problem
because the write target address is not set by the memory location
of the write, it's actually set by the location specified in
the program command to the FLASH).

This means that the updating program has to be modified accordingly;
now, for writes, a single location is targeted (and as alluded above,
this is funneled to a write FIFO buffer, and then the actual address is
set with the page program command); and for readback, attempts to read
back the SoC area are flagged and noted as impossible due to security
precautions.
2022-04-22 02:48:43 +08:00
bunnie
b39f4c38eb fix update scripts so updates don't wipe root keys :-O 2022-04-20 17:15:46 +08:00
bunnie
526a7374b0 re-introduce PDDB structure nuking on SoC reset 2022-03-20 15:25:14 +08:00
bunnie
b52b73ddfa add functionality to override the CSR data in case it is corrupted 2022-03-19 16:56:03 +08:00
bunnie
1856a83e3e fix ordering of updates to prevent mid-update resets 2022-03-19 16:22:09 +08:00
bunnie
f7d42f6c1b correct usb_update.py force message to the correct version offsets 2022-03-18 17:39:45 +08:00
bunnie
11c88b170e implement a basis for anti-rollback upgrades
the actual transition to a new version isn't here. But,
at the very least, the root keys are now derived by hashing
them MAX_ROLLBACK_LIMIT times, which allows us to create a
key chain based on a global version number that can be incremented
while allowing derviation of older keys without compromising newer
keys.
2022-02-04 01:33:04 +08:00
bunnie
9a34de0065 rework flash memory locs; add command for re-creating a factory new device 2022-01-09 22:33:36 +08:00
bunnie
d87920a772 add argument to erase the entire PDDB region. 2022-01-04 11:12:30 +08:00
bunnie
2e40546a88 add a force overwrite option to the updater for the soc mode 2021-10-04 16:30:41 +08:00
bunnie
a2bcf0fc2b match wdt ping to refactor + fix paths for default images to xous 2021-08-23 05:11:14 +08:00
bunnie
ccc577f8d7 clean up the update flow 2021-08-16 02:46:54 +08:00
bunnie
353311b987 fix USB update flow 2021-08-15 16:03:18 +08:00
bunnie
f334199ee6 commit host mode debugging 2021-08-12 23:01:34 +08:00
bunnie
a4f8346c34 reflect the latest fixes to the secure boot process
also patch up some issues with sha512 reset and loose
ends on docs and updates
2021-07-13 00:46:31 +08:00
bunnie
22906ce366 make the defaults for usb_update.py map to something immediately usable in-situ 2021-07-02 04:27:26 +08:00
bunnie
7ff4824eb6 add routines to copy audio test files to the device 2021-06-23 19:07:59 +08:00
bunnie
b9f3182bb9 mods for hosted mode to work again 2021-06-02 03:45:15 +08:00
bunnie
8145473167 remove what i think is no longer a necessary comment 2021-05-25 05:31:21 +08:00
bunnie
40b4f26dcb fix alignment bug on erase blocks for usb_update.py 2021-05-25 03:54:37 +08:00
bunnie
e1d0dc2178 add USB updater scripts to xous-core 2021-05-23 14:55:43 +08:00