Xous SDK (pinned for betrusted transpilation)
Find a file
bunnie fa8325c2ed cleanup pddb for gen2 targets
gate out modals entirely from gen2 pddb

passwords in gen2 are now entirely handled outside of the
respective service crates, cleaning up the APIs

some history - on gen1 (precursor) devices, the thesis was to
reduce the amount of distance a password has to travel from
the point of a user entering it to the point of use. I think this
is academically interesting, but it pulls in a lot of code
into each service to manage the passwords, conflating services
with UI layers.

it was a nice experiment.

in gen2 (and hopefully beyond) targets, we now commit to
the idea that something else is passing in the sensitive key
materials. This means that, in fact, keying material has to
transition between process spaces, which increases the attack
surface to recover this. However, it also makes the crates
more portable and maintainable.

This is mitigated partially by the fact that in gen2 targets
the entirety of the code base runs within a piece of silicon,
so "sniffing" (passive observation of data going to memory)
attacks are a good bit harder.
2025-11-08 03:52:39 +08:00
.cargo update lockfile and remove a stale alias 2025-10-20 02:22:02 +08:00
.github/workflows
.vscode make bao1x view default for vscoders 2025-10-06 14:24:06 +08:00
api bump versions 2025-10-06 13:23:18 +08:00
apps bump versions 2025-10-06 13:23:18 +08:00
apps-dabao add test routine to print environment variables 2025-11-06 13:54:59 +08:00
bao1x-boot update handling of id numbers 2025-11-06 14:10:38 +08:00
baremetal add handling for dabao case in baremetal 2025-10-31 09:46:09 +08:00
devkey
docs add vault documentation 2025-07-31 17:23:32 +08:00
emulation renode: vexriscv: fix CPU on newer Renode versions 2024-08-20 09:05:10 +08:00
imports bump versions 2025-10-06 13:23:18 +08:00
kernel bump versions 2025-10-06 13:23:18 +08:00
libs cleanup the keystore api 2025-11-08 03:52:03 +08:00
LICENSES
loader fix susres on precursor 2025-11-07 08:01:31 +08:00
locales code formatting and typo fix on locales build script 2025-04-29 03:02:33 +08:00
planning bump versions 2025-10-06 13:23:18 +08:00
precursors
services cleanup pddb for gen2 targets 2025-11-08 03:52:39 +08:00
signing add more breadcrumbs to remind myself about tools i made 2025-10-27 17:41:15 +08:00
svd2repl update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
svd2utra bump versions 2025-10-06 13:23:18 +08:00
tools Remove python cache and build artifacts, update .gitignore 2025-10-17 22:04:14 +02:00
tools-bao helper for app creation and move all subparsers to their respective command files 2025-11-03 23:39:11 +09:00
utralib commit more to stage next publishing 2025-10-06 13:30:37 +08:00
xous-ipc bump versions 2025-10-06 13:23:18 +08:00
xous-rs bump versions 2025-10-06 13:23:18 +08:00
xtask add keystore to dabao configuration 2025-11-01 22:59:07 +08:00
.gitattributes
.gitignore Remove python cache and build artifacts, update .gitignore 2025-10-17 22:04:14 +02:00
analyze-bloat.sh
API.md regex search/replace instances of xous_ipc::String to String 2024-09-22 14:14:55 +08:00
baosign.ps1 Add a script for automating the signing of bao1x images. 2025-10-06 23:47:09 +08:00
Cargo.lock update lockfile 2025-11-06 14:11:00 +08:00
Cargo.toml update lockfile to match version bump 2025-10-06 13:39:23 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
FORMATTING.md
LICENSE
publish.py re-add the kernel publish argument 2024-12-16 18:55:08 +08:00
README-baochip.md Update README for Xous; stab at improving the documentation. 2025-10-08 01:16:45 +08:00
README-precursor.md helps to save the file 2025-10-08 01:20:31 +08:00
README.md Update README for Xous; stab at improving the documentation. 2025-10-08 01:16:45 +08:00
RELEASE-v0.8.md
RELEASE-v0.9.md FLAG DAY: fix all names to harmonize around 'bao1x' 2025-09-18 21:25:51 +08:00
rustfmt.toml fix formatting skip directive 2025-09-30 00:44:13 +08:00

Xous Core

Core files for the Xous microkernel operating system.

The Xous Book covers the architecture and structure of the kernel.

The wiki is a community resource that answers many FAQ.

The Boachip README is the starting point for Baochip users.

The Precursor README is the starting point for Precursor users.

Xous is a mono-repo project. It contains the kernel, libraries, applications, and tools necessary to build full device images. Here is a brief description of the more important directories:

  • api: "Secular" API libraries - minimal-dependency, common-core APIs used by core Xous services
  • apps: Precursor applications
  • apps-dabao: Dabao applications
  • apps-baosec: Baosec applications
  • bao1x-boot: Bao1x secure boot chain
  • baremetal: Baremetal target - runs after the boot chain, for developers that don't want Xous but can still use Xous' no-std features
  • emulation: Renode scripts used to emulate Xous
  • imports: Vendored-in libraries that had to be forked for Xous compatibility
  • kernel: core memory manager, irq manager, and syscall implementations.
  • libs: Device driver libraries. The common thread is that none of these code bases contain a main.rs, just a lib.rs.
  • loader: Sets up virtual memory space and boots the kernel
  • locales: Tools for handling internationalization
  • signing: Scripts for generating signed images
  • services: Xous programs that support Xous apps. Middleware, if you will.
  • svd2utra: A program for converting SVD chip descriptions in XML to the UTRA "header file" format
  • tools: Programs used to construct a final boot image. Also the home of various diagnostic and test utilities.
  • utralib: The Unambigous Thin Register Abtraction. The core hardware interface for Xous.
  • xous-ipc: Inter-process communication convenience APIs for Xous
  • xous-rs: API files for the kernel. Where the syscall interfaces live.
  • xtask: The build system manager for Xous.

Dependencies

Install the latest Rust or run rustup update to update your Rust installation prior to building. Xous development assumes a recent version of Rust.

Build Commands

  • Precursor: cargo xtask app-image
  • Dabao: cargo xtask dabao
  • Baosec: cargo xtask baosec
  • Baochip baremetal: cargo xtask baremetal-bao1x

Additional apps to be bundled into images can be specified as extra arguments on the command line, e.g. cargo xtask dabao helloworld will generate a Dabao image that includes helloworld in the detached-app section. Features, app-features, loader-features, and so forth can also be passed as command line arguments; run cargo xtask on its own for more help.

Emulation

  • cargo xtask run will bring up an emulated Precursor
  • cargo xtask baosec-emu will bring up an emulated Baosec
  • cargo xtask renode-image will build an image suitable for Renode emulation of a Precursor target. Start renode by running renode emulation/xous-release.resc

Building Documentation

A flag of --feature doc-deps must be passed when running cargo doc, like this:

cargo doc --no-deps --feature doc-deps

doc-deps is a dummy hardware target that satisfies the requirement of a "board" when building documentation.

Local-vs-crates.io Verification

xtask does a check every build to ensure that any crates.io dependencies are synchronized with the contents of the monorepo. It protects against the scenario where you edited a crate that exists in the Xous repo, but the build system ignores the local edits because it's fetching an old version from crates.io.

Developers working on published crates should patch them in the root Cargo.toml file and bypass the check with --no-verify.

Acknowledgement

This project is funded through the NGI0 PET Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825310.

NLnet foundation logo NGI0 logo