Skip to content

Commit d484e9b

Browse files
[doc] Getting started updates
Just some minor textual changes which will hopefully clarify things.
1 parent 86c517f commit d484e9b

1 file changed

Lines changed: 27 additions & 24 deletions

File tree

doc/getting-started.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# Getting started guide
22

33
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.
56

67
The Sonata software build environment can be setup under Windows, macOS and Linux.
78
We use a tool called [Nix](https://nixos.org/) to manage the build environment on all platforms.
89
You need to install Nix but don't need to know anything else about it to follow these instructions.
910

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.
1113
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.
1214
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.
1316

1417
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).
1619

1720
## Windows-specific setup
1821

@@ -38,16 +41,16 @@ Follow the Linux (Ubuntu) steps for the rest of this guide.
3841

3942
> ℹ️ If you have installed your WSL a long time ago, `systemd` may not have been enabled by default.
4043
> 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).
4245
4346
## Installing Nix
4447

4548
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/):
4750
```sh
4851
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
4952
```
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/).
5154

5255
To use Nix from the terminal you need to open up a new terminal for it to be added to your path.
5356

@@ -92,7 +95,11 @@ exit
9295
```
9396
9497
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:
96103

97104
```
98105
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
102109
warning: ignoring untrusted substituter 'https://nix-cache.lowrisc.org/public/', you are not a trusted user.
103110
```
104111

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-
108112
## Your first build
109113

110114
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 \
116120
cd sonata-software
117121
```
118122

119-
Note a particular branch is specified, this must match your release, the release notes will tell you which branch you should use.
120-
121123
Enter the nix development development environment if you haven't already.
122124
*Note that because we are in the repository we don't need to provide any arguments to `nix develop`.*
123125

@@ -128,7 +130,7 @@ nix develop
128130
Then build the examples with the following command.
129131

130132
```sh
131-
xmake -P examples
133+
xmake build -P examples
132134
```
133135

134136
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:
155157
$ xmake build -P examples
156158
checking for platform ... cheriot
157159
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
166168
[ 29%]: cache compiling.release ../cheriot-rtos/sdk/core/scheduler/main.cc
167169
[ 29%]: cache compiling.release automotive/lib/automotive_common.c
168170
[ 30%]: cache compiling.release automotive/lib/no_pedal.c
@@ -191,7 +193,8 @@ generating /home/mvdmaas/repos/sw-sonata/cheriot-rtos/sdk/firmware.ldscript.in .
191193
[ 39%]: cache compiling.release automotive/lib/automotive_common.c
192194
[ 40%]: cache compiling.release automotive/cheri/receive.cc
193195
[ 41%]: cache compiling.release ../cheriot-rtos/sdk/core/scheduler/main.cc
194-
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.
195198
[ 42%]: cache compiling.release ../cheriot-rtos/sdk/core/loader/boot.cc
196199
[ 43%]: cache compiling.release ../cheriot-rtos/sdk/core/allocator/main.cc
197200
[ 43%]: compiling.release ../cheriot-rtos/sdk/core/loader/boot.S
@@ -315,5 +318,5 @@ warning: ./cheriot-rtos/sdk/xmake.lua:116: unknown language value 'c2x', it may
315318
warning: add -v for getting more warnings ..
316319
```
317320

318-
If you're following this guide as preparation for a workshop, you are now all set up and don't need to go any further.
319-
With a successful software build you can now try [running software](./guide/running-software.md).
321+
If you are following this guide as preparation for a *workshop*, you are now all set up and don't need to go any further.
322+
If you are here on your own, you can now try [running software](./guide/running-software.md).

0 commit comments

Comments
 (0)