You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/getting-started.md
+27-24Lines changed: 27 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
1
# Getting started guide
2
2
3
3
This guide tells you how to get started with the Sonata board.
4
-
If you have any issues in following this guide please contact the Sunburst Team at [info@lowrisc.org](mailto:info@lowrisc.org).
4
+
If you have any issues in following this guide please contact the lowRISC team at [info@lowrisc.org](mailto:info@lowrisc.org).
5
+
If you are attending a *workshop*, please feel free to speak to one of the organisers who will be pleased to help.
5
6
6
7
The Sonata software build environment can be setup under Windows, macOS and Linux.
7
8
We use a tool called [Nix](https://nixos.org/) to manage the build environment on all platforms.
8
9
You need to install Nix but don't need to know anything else about it to follow these instructions.
9
10
10
-
You also need to setup the Sonata board itself with the latest release.
11
+
If you have a Sonata board, you can also set it up with the latest release.
12
+
If you are attending a *workshop* and are borrowing a board, this step will have already been done for you.
11
13
Read the [updating the sonata system guide](https://lowrisc.github.io/sonata-system/doc/guide/updating-system.html) for instructions on how to do this.
12
14
You only need to follow the first two steps listed there.
15
+
Don't worry if you don't have a board, because you can still follow the rest of this getting started guide.
13
16
14
17
Only Windows requires specific instructions, Nix handles everything you need on Linux and macOS.
15
-
So if you're not using Windows jump straight to [Installing Nix](#installing-nix).
18
+
So if you are not using Windows jump straight to [Installing Nix](#installing-nix).
16
19
17
20
## Windows-specific setup
18
21
@@ -38,16 +41,16 @@ Follow the Linux (Ubuntu) steps for the rest of this guide.
38
41
39
42
> ℹ️ If you have installed your WSL a long time ago, `systemd` may not have been enabled by default.
40
43
> It is recommended to enable `systemd`.
41
-
> See https://learn.microsoft.com/en-us/windows/wsl/systemd.
44
+
> Follow the following guide on [using systemd to manage Linux services with WSL](https://learn.microsoft.com/en-us/windows/wsl/systemd).
42
45
43
46
## Installing Nix
44
47
45
48
The Nix package manager is used to create reproducible builds and consistent development environments.
46
-
For Linux systems it's recommended the following command from the official [documentation](https://nixos.org/download/):
49
+
For Linux systems, we recommend the following command from the official [documentation](https://nixos.org/download/):
47
50
```sh
48
51
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
49
52
```
50
-
For other systems such as macOS, Windows(WSL2), Docker and others, follow the official [documentation](https://nixos.org/download/).
53
+
For other systems such as macOS, Windows(WSL2), Docker and others, follow the official [documentation](https://nixos.org/download/).
51
54
52
55
To use Nix from the terminal you need to open up a new terminal for it to be added to your path.
53
56
@@ -92,7 +95,11 @@ exit
92
95
```
93
96
94
97
These applications are layered on top of your usual environment.
95
-
You can see what was added with `echo $PATH`.
98
+
You can see what was added with: `echo $PATH`
99
+
100
+
If you see the warning that substituter is ignored, cancel the process with Ctrl+C and check to see that [trusted-users is setup properly](#setup-nix-cache).
101
+
Nix can and will build everything from source if it can't find a cached version, so letting it continue will cause LLVM-CHERIoT to be built from scratch on your machine.
102
+
This is what the warning looks like if you have not configured the cache correctly:
96
103
97
104
```
98
105
do you want to allow configuration setting 'extra-substituters' to be set to 'https://nix-cache.lowrisc.org/public/' (y/N)? y
@@ -102,9 +109,6 @@ do you want to permanently mark this value as trusted (y/N)? y
102
109
warning: ignoring untrusted substituter 'https://nix-cache.lowrisc.org/public/', you are not a trusted user.
103
110
```
104
111
105
-
If you see the warning that substituter is ignored, cancel the process with Ctrl+C and check to see that [trusted-users is setup properly](#setup-nix-cache).
106
-
Nix can and will build everything from source if it can't find a cached version, so letting it continue will cause LLVM-CHERIoT to be built from scratch on your machine.
107
-
108
112
## Your first build
109
113
110
114
Clone the Sonata software repository, *making sure to recursively clone submodules as well*, then navigate into it.
@@ -116,8 +120,6 @@ git clone --branch v1.1 \
116
120
cd sonata-software
117
121
```
118
122
119
-
Note a particular branch is specified, this must match your release, the release notes will tell you which branch you should use.
120
-
121
123
Enter the nix development development environment if you haven't already.
122
124
*Note that because we are in the repository we don't need to provide any arguments to `nix develop`.*
123
125
@@ -128,7 +130,7 @@ nix develop
128
130
Then build the examples with the following command.
129
131
130
132
```sh
131
-
xmake -P examples
133
+
xmake build -P examples
132
134
```
133
135
134
136
After running this you should see the build run to completion and report success, the critical lines indicating a successful build are:
@@ -155,14 +157,14 @@ For reference the full output (from a build run on a Linux machine) looks like:
155
157
$ xmake build -P examples
156
158
checking for platform ... cheriot
157
159
checking for architecture ... cheriot
158
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
159
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
160
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
161
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
162
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
163
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
164
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
165
-
generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in ... ok
160
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
161
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
162
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
163
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
164
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
165
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
166
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
167
+
generating sonata-software/cheriot-rtos/sdk/firmware.ldscript.in ... ok
Not overriding global variable alignment for _ZL10memTaskTwo since it has a section assigned.Not overriding global variable alignment for _ZL18memAnalogueTaskTwo since it has a section assigned.
196
+
Not overriding global variable alignment for _ZL10memTaskTwo since it has a section assigned.
197
+
Not overriding global variable alignment for _ZL18memAnalogueTaskTwo since it has a section assigned.
0 commit comments