this add some routines and test stubs that are helpful for debugging
C FFI integrations. In particular it provides some harnessing that adapts
a minimal selection of libc functions by copypasta of various bsd/mit
licensed libc implementations. It also provides a cheesy malloc using
a Rust Vec...only suitable for simple, single-threaded work, but enough
to unlock a reasonable range of middleware.
This works around the issue of a dependendent crate e.g. pulling in a version
of sha2 that is an incompatible API with the one provided by the hardware
accelerator. Cargo needs to know for which sha2 crate to build, and
the current "sha2" specifier is too ambiguous.
This is done by specifying it as "sha2:0.9.8", but, this now breaks
the image creation because the actual artifact built is still a filename
of `sha2`, not `sha2:0.9.8`. This patch both adds the fully specified
version to the sha2 crate and also strips out the trailing version
number without breaking e.g. Windows builds which have a ':' built
into every path (so you can't just do a stupid split(':') to strip
off the version number).
- bypass causes warnings to be emitted in compilation
- stark visual change on boot screen ("jail bars" instead of gray on bottom half)
- root keys are locked out permanently from readout
- devboot canary set
This commit adds the current's app name to the security bar at the top
of the screen, just beneath the status bar.
I had to add a new generated function to map app index back to its name,
along with an enum to signal whether or not the id is valid.
Signed-off-by: Gianguido Sorà <me@gsora.xyz>
specifying "no-timestamp" causes the build to be reproducible
on the same machine. of course, introducing the timestamp makes
the build no longer reproducible but it's very helpful for debugging.
The first "app" is just going to be a whole-framebuffer
demo that gets raw keys and does some stuff on the screen.
It's the starting point if you wanted to eg. write a simple
video game or something for the device, but you didn't care
about much of the other UX sugar.
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.
This improves IDE support, and should shrink disk storage requirements.
Signed-off-by: Sean Cross <sean@xobs.io>
This moves the kernel into the main monorepo, allowing it to share
packages with the rest of the system. This change will allow us to
reduce the number of rebuilds that take place, as well as reducing disk
usage.
Note that the loader is still an indepenent project, and the integration
of that into the monorepo is pending.
Signed-off-by: Sean Cross <sean@xobs.io>
- code is merged into shellchat so there's less alignment overhead
and some library reuse
- server is not spawned until it's needed, so the RAM load is less
Saves a bit on resources and the RTC crate doesn't need
to be stand-alone now that the modals crate is a thing;
we are able to split the UX routine to manage the RTC out
of the code that actually manages the hardware.
The hardware code ended up in LLIO, and the UX ended up in the status
routine.
- hosted mode uses an awful, horrific hack to simulate FLASH:
it makes a global singleton that is freely mutable. Oh but wait!
that's actually how the hardware behaves. It's up to the code
around the hardware to create those primitives. So, maybe it makes
sense that the simulation model for the hardware is terribly
unsafe and unprotected.
- the format routine at least doesn't crash and creates some
semblance of a result that looks right-ish. Need to write a
utility that helps to explore the "disk image" so we can
understand what's going on.