@@ -23,6 +23,15 @@ from source. It consists of the following projects:
23
23
- Some system packages are needed, which can be installed with ` sudo apt install libssl-dev libxkbcommon-dev ` or similar
24
24
- If you receive an error about ` feature resolver is required ` , try installing a newer version of ` rustc ` and ` cargo ` via [ rustup] ( https://rustup.rs )
25
25
26
+ ## Local-vs-crates.io Verification
27
+ By default the ` xtask ` resolver runs a check to confirm that your local files
28
+ match the ones referenced in ` crates.io ` . For a handful of core crates, the
29
+ build preferentially runs from what is on ` crates.io ` , so local changes have
30
+ no effect until they are pushed as an update to an existing crate. If you see
31
+ an error complaining about local source files not being published, make sure
32
+ you have the correct patches in place in your top level ` Cargo.toml ` file,
33
+ and bypass the check with ` --no-verify ` .
34
+
26
35
## Quickstart using Hosted Mode
27
36
28
37
You can try out Xous in a "hosted mode" wherein programs are compiled
@@ -84,15 +93,32 @@ Betrusted core. These addresses will change as hardware is modified,
84
93
so if you distribute a modified Betrusted core, you should be sure
85
94
to distribute the ` .svd ` file.
86
95
87
- We have included a reference version of the gateware and its SVD
88
- file in the ` precursors ` directory, so you can compile a gateware
89
- for the reference image using this command:
96
+ The [ UTRA] ( ./utralib/README.md ) abstracts the details of the register
97
+ locations, by wrapping them in logical names that don't change.
98
+ For Precursor, the SVD files are tracked inside ` utralib/precursor/soc-<gitref>.svd ` .
99
+ Since each soc.svd can potentially change with a git reference, a gitref
100
+ is coded into the filename by convention.
101
+
102
+ Generally, one can create an image for hardware using the following command:
90
103
91
104
``` sh
92
- cargo xtask hw -image precursors/soc.svd
105
+ cargo xtask app -image
93
106
```
94
107
108
+ And it will pull from the default soc.svd configuration. The default config
109
+ can be seen in the [ utralib/Cargo.tom] ( ./utralib/Cargo.toml ) file, in the
110
+ ` default = [...] ` arguments seen at the bottom of the file. If you have
111
+ built your own custom soc.svd file, the most convenient way to update
112
+ to this is to simply replace the file referenced in the default with yours,
113
+ and then run ` cargo build ` inside the ` utralib ` directory (not in the Xous
114
+ root -- the ` build ` command must happen inside the directory to force a
115
+ regeneration of the generated UTRA bindings). This will likely result
116
+ in a complaint when you run ` xtask ` that your local tree does not match what
117
+ is checked into ` git ` ; if you are building from your own configuration,
118
+ that is correct, and thus you should add ` --no-verify ` to your ` xtask ` command
119
+ to suppress the check.
120
+
95
121
The resulting images are in your target directory (typically ` target/riscv32imac-unknown-xous-elf/release/ ` )
96
122
with the names ` xous.img ` (for the kernel) and ` loader.bin ` (for its bootloader). The corresponding
97
- gateware is in ` precursors/soc_csr.bin ` . These can be written to your
123
+ gateware is in ` precursors/soc_csr-<gitref> .bin ` . These can be written to your
98
124
device by following the [ update guide] ( https://github.com/betrusted-io/betrusted-wiki/wiki/Updating-Your-Device ) .
0 commit comments