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 loader is a little funky, and requires some maintainer hand-holding
due to the split of the page ownership between the root-keys
crate and the graphics-server crate.
Improved docs so I don't forget this detail in the future.
this allows for a quick readout of the version of each of these
artifacts, inside a signed region, by just inspecting the last
few words of the binary object.
The `xmas-elf` crate doesn't deal with `raw_data()` of sections that are
`NO_COPY`. These sections may point to data that is outside of the file.
In order to avoid hitting this assert, don't call `raw_data()` on
sections that are marked `NO_COPY`.
Signed-off-by: Sean Cross <sean@xobs.io>
Add a Rust implementation of `sign-image`. This enables us to sign the
binary on any platform that can compile Rust.
Signed-off-by: Sean Cross <sean@xobs.io>
The `PNam` tag stores information in the kernel about process names.
This can be used at runtime to discover what process maps to what
program name.
Signed-off-by: Sean Cross <sean@xobs.io>
This issue was spotted when the kernel address was wrong. This fixed
the test, but was indicative of something else being wrong.
Signed-off-by: Sean Cross <sean@xobs.io>