resurrecting some old hardware as an efuse testing target;
new hardware is too precious at the moment given the ridiculous
shortage of FPGAs on the market.
verification is sort of pointless, because:
The Cargo.toml file is parsed and reformatted by the packaging tool to normalize its contents.
Thus, the Cargo.toml file of the downloaded version never matches the Cargo.toml file that's actually used.
Unfortunately, there doesn't seem to be an easy way to check the equivalence of two Cargo.toml files,
except for recursively and deeply parsing through and comparing all the possibile keys and values of
the abstract key/value tree. This is a much bigger project than I'm prepared to figure out today.
As a hack, we compare to the Cargo.toml.orig file. Which is...kind of OK, but really, this opens us
up to attacks where someone just has to replace a version on a package or even just swap out an
entire package for a malicious one by just using package name re-assignment which is a thing that
the format supports. In other words, all this checking is kind of pointless because it's super-easy
to swap out key crates for whole other crates and have it go undetected.
- strip out gdb-stub. Per xobs, the feature never worked, and it
depends upon a branch of a git repo which is not allowed by crates.io
Since the feature hasn't been developed, and crates.io will not
allow even an optional feature that points to a git repo, the feature
was stripped out.
- rename "kernel" to "xous-kernel", so that we can live in a crates.io
package namespace that is specific to Xous.
still have to figure out the riscv package issue.
this is necessary because we need the full SVD path to generate
the whitelist of physical pages that can be addressed. Since the
SVD path is now domiciled in utralib, a file called "SVD_PATH"
is created in the target/ directory which contains the resolved
path to the SVD file given the abstract target/rev feature pair.
this fix makes it so that
1) you always get a correct build when the SVD spec is toggled
2) you don't always rebuild when nothing has changed
(2) is with the caveat that the no-change flag is only clean
after your second build (i.e. your third run will be fast).
I'm not quite sure why but I think it's because the "changes"
to the config file tracker are computed throughout the first
build and the second build still sees that file as recently
changed, so, it'll trigger a rebuild (could also just be
a race condition because the timestamp of the rebuild is
at the same second that the file was regenerated, so conservatively
you'd rebuild the next time).
- default SVD file is specified now as a constant at the top of xtask
- SVD files are now tracked to commit refs in the betrused-soc tree
this is so that we don't have to guess which crate rev corresponds
to which SVD rev -- we specify it explicitly with a feature flag.
also add a routine to manually switch over the UTRA in this case.
for whatever reason, the system is not picking up the change in
the UTRA when specified as an environment variable change --
maybe there is a hard coded link somewhere, but I can't seem
to find it.
since performnace counting is an edge case use mostly by
frankly just me, I'm not going to worry about ergonomics so
much.
turns out, they're pretty useless. I mean, for debugging actual
running code. it tells us basically what we know already which is
99.99% of the time is spent waiting on inter-thread messaging
in hosted mode.
adding a key of "submenu" will automatically create the corresponding
integer argument of submenu contexts for the app.
NB: you should try to only create 1 and re-use it. Menus
are resource hungry, and will rapidly eat through your connection
and thread table.
Had two JSON entries with the same key, which meant you had
a 50/50 chance of a rebuild being triggered depending on which
entry was picked for the build. :-/
The manifest was being processed, but the package list was
going back to the original base set, which would lead to
a confusing situation of apps being listed but the binaries not
being present.
The vault app is the beginning of a multi-purpose authentication vault.
It will feature:
1. FIDO2 authentication
2. TOTP authenticators
3. Password storage to PDDB with auto-typing via keyboard HID
This is the first step on a very very long journey.
Also includes the USB test commands in shellchat.
This is different from the usb-test crate, in that it's fully
integrated into Xous. usb-test is just for quick-testing the USB
driver, in the absence of most of the rest of Xous.
I don't know why it doesn't break under a default config, but if
xous-core is cloned to a directory that doesn't match the repo
name this breaks. This patch tries to fix it for that case.
Now that we have full JSON parsing inside xtask, actually parse the
assets API endpoint to determine the correct URL.
Signed-off-by: Sean Cross <sean@xobs.io>
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>
The `renode-bypass` flag is used for development in order to speed up
certain features. This creates invalid keys and skips many checks, which
causes problems in the main image.
Remove this flag in order to fix the Renode image.
Signed-off-by: Sean Cross <sean@xobs.io>
unfortunately it greatly increases build times. need to think about
this but at least it prevents me from checking in a locale file that
breaks all the other dev's builds
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.
Closes#76
The test vectors in wycheproof-import/x25519_test.json correspond to the upstream commit 4672ff74d6.
For details see wycheproof-import/README.md.
Signed-off-by: Fabian Weißberg <fabian.weissberg@tu-dortmund.de>
This adds a simple check for the proper Rust toolchain. A more advance
test will advise on toolchain installation.
Signed-off-by: Sean Cross <sean@xobs.io>
This makes `locales` its own package. As a result, the system will not
rebuild the locales unless necessary.
Additionally, the `generate-locales` command has been updated to simply
force a rebuild of this file in order to keep the previous behavior.
Signed-off-by: Sean Cross <sean@xobs.io>
The Renode refactor didn't propagate the `debug` flag. Additionally, the
`TryInto` import is no longer used.
Fix both warnings.
Signed-off-by: Sean Cross <sean@xobs.io>
the engine-25519 server just takes microcode jobs and runs them
on the curve25519 accelerator engine.
all the fancy crypto stuff comes from other crates, which will
be filled in later.
The soc.svd file has now moved under `emulation/soc/` instead of just
under `emulation/`, due to the fact that we now have an EC to emulate as
well.
Signed-off-by: Sean Cross <sean@xobs.io>
- debounce is now in hardware (requires latest version of betrusted-soc)
- key events originate from an interrupt context and propagate through
to the listeners as messages
- attempt to reduce the use of heapless::Vec; there is an awkward
interposer step still between the array methodology and the Vec
methodology
I'm not sure if trying to eliminate the Vec is a good idea,
because...I'm finding that we're just re-implementing Vec, but
much worse.
However, for the purpose of movement of data across
IPC boundaries, it's more robust to use primitive types,
because serializing Vec is not possible without either
forking the heapless crate to derive the rkyv traits; or, we'd
have to do some probably quite dangerous conversion of the Vec
to a raw slice which also doesn't feel nice.
this helps the screen-up time appear faster, so we aren't
waiting for a full poll interval for new data to appear before
the system apears to be powered on
The CSV is no longer used, because it is not in sync with the SVD
anymore. The SVD file now includes everything we need, so the CSV is
redundant.
Signed-off-by: Sean Cross <sean@xobs.io>