During the previous port, we only wrote the first 4096 bytes. Write the
remainder of the file to the destination.
Signed-off-by: Sean Cross <sean@xobs.io>
This experimental tool can be used to create all-in-one images based
on precomputed file lists. It generates "test images" using just the
bare minimum number of processes.
This program includes all the keys, kernel, and initial images required
to support a simple program.
Signed-off-by: Sean Cross <sean@xobs.io>
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>
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>
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>
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.