Commit graph

260 commits

Author SHA1 Message Date
Sean Cross
2382d57dd6 tools: add sign_image.rs
Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-26 22:22:18 +08:00
Sean Cross
46cd5e7098 tools: elf: allow loading files from &[u8]
Instead of assuming everything is a file or a path, allow
loading ELF files from u8 slices. This will enable us to create
images with `include_bytes!()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-26 22:21:24 +08:00
Sean Cross
c50314d4a8 tools: sign-image: break image signing into a library
Move the code used to sign images into its own library file. This will
enable us to use the image signing functions from other code.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-26 22:20:33 +08:00
bunnie
0ee9ec1d80 bump version numbers for crate publication 2022-10-25 22:38:58 +08:00
Jean-Pierre De Jesus DIAZ
f5176ea380
Remove xous-rs unused features
The rationale is that xous-rs should have only architecture
specific code, e.g.: riscv, arm, x86, etc. To make other
crates that depend on it not specify the features.

This could be useful when using xous-rs with `libstd`
for example.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-25 13:29:15 +02:00
bunnie
30ea893c74
Merge branch 'main' into xous-rs-os-selection 2022-10-25 17:28:33 +08:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
bunnie
e04d135e83 add vault app to sources 2022-10-24 00:36:51 +08:00
bunnie
f05a879d93 add a generic performance log analysis tool 2022-10-23 23:16:56 +08:00
bunnie
9489342d4b cleanup error messages from perflib 2022-10-23 23:15:18 +08:00
bunnie
805a7d528c flip back to using remote references 2022-10-20 16:30:06 +08:00
bunnie
86d2437f03 improve formatting so section alignments are easier to debug 2022-10-20 16:14:56 +08:00
Sean Cross
ff3f307a14 tools: read-tags: call output xous_presign.img
The use of the name `args.bin` is now deprecated.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-20 14:11:48 +08:00
bunnie
0a361cac20 bump version to 0.0.8 to asborb factory reset change 2022-10-19 04:47:55 +08:00
bunnie
76ed23010d erase staged gateware as part of --factory-reset 2022-10-19 04:44:04 +08:00
bunnie
8e05925cfa somehow the transition to local paths got missed in the merge 2022-10-18 00:39:01 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
bunnie
ff30131f43 absorb more fixes into the kernel 2022-10-13 04:08:56 +08:00
bunnie
3503965f98 bump versions to absorb xous-rs changes 2022-10-13 03:41:16 +08:00
bunnie
02b80425f5 bump xous-rs to absorb change in language specification 2022-10-10 03:07:44 +08:00
bunnie
9732ecdc18 add v0.9.10 to restore URL list 2022-10-09 23:37:48 +08:00
bunnie
01b68cbdc9 fix development roll-out process for picking a restore kernel 2022-10-09 14:18:57 +08:00
bunnie
99c6e005ad fix hosted mode 2022-10-09 02:46:24 +08:00
bunnie
6230c922ac fix backup/restore scripts 2022-10-09 02:36:48 +08:00
bunnie
8ac80f8c42 update tools to work with checksums (partial update) 2022-10-09 01:12:03 +08:00
bunnie
c33dee152d fix backup opcode setting 2022-10-08 22:20:50 +08:00
bunnie
c471ca0fbb fix overly restrictive version match on backup version 2022-10-08 15:29:37 +08:00
bunnie
a0791ff092 back out patch of the opcode change -- the backup script did that in error 2022-10-08 02:40:55 +08:00
bunnie
89d050891b fix incorrect opcode setting on backup 2022-10-08 02:40:07 +08:00
bunnie
44d3c19733 fix hash check computation and op offset 2022-10-08 02:26:00 +08:00
bunnie
42052fdcc5 fix padding on hash check in backup tools 2022-10-08 01:53:28 +08:00
bunnie
a416069002 add hash protection on the metadata header
stage is set for hash protection on the PDDB data itself.
that comes next.
2022-10-08 01:22:14 +08:00
bunnie
0f9195f305 add some sanity checks on the backup header
this tries to catch the cases that:
  - user tried to run the backup without first running "prepare backup..."
  - the USB connection is a little flakey and returning bum data

We can only inspect the plaintext portions of the header, which contains
things like protocol version numbers, time stamps, and language codes.

We use the timestamp validation heavily because it's the only field that
isn't almost always going to be a 0 or 1 when correct, which are highly
likely to be reported anyways if there's a problem with the USB link.

This does assume the user sets the time correctly on the device
doing the backup, and on the Precursor itself.
2022-10-06 00:53:52 +08:00
bunnie
3bca9de2a0 bump version numbers for xous-kernel patch
this fixes tests in CI
2022-10-05 23:51:35 +08:00
bunnie
969f93b001 cross-repo update versions from xous-rs bump 2022-10-05 18:32:44 +08:00
bunnie
776a47f4bc missed a file 2022-10-02 02:21:06 +08:00
bunnie
15bcb6328f fixup other refs 2022-09-27 03:09:41 +08:00
bunnie
3579dfdd17 update xous-ipc and xous versions 2022-09-26 16:07:35 +08:00
bunnie
796256cfb0 make usb_update.py appear only once in the tree 2022-09-19 12:44:55 +08:00
bunnie
5461a70be1 add some generated data for later review 2022-09-16 01:52:06 +08:00
bunnie
46a2d8609f add perflib modules
this library can be re-used across multiple scenarios that require
performance profiling
2022-09-16 01:48:59 +08:00
bunnie
3a893213ff update the generated images to the latest data 2022-09-16 01:47:30 +08:00
bunnie
e12f651ac4 update analysis framework to use the binary files output by the latest changes 2022-09-16 01:47:02 +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
57291a47f2 add some sample outputs from the analysis scripts 2022-09-11 21:16:45 +08:00
bunnie
088648409e add constant time analysis script 2022-09-11 19:13:38 +08:00
bunnie
2ee0d4dfce remind myself how to update the precursorupdater
the latest docs don't work for us, so, document our method here.
Just can't figure out the .toml method of describing the project...
2022-09-09 15:39:52 +08:00
bunnie
4b72492c3e fix bug #216 2022-09-09 15:07:31 +08:00