-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review wording of new documentation #34
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5d5eaaf
Review of README
marnovandermaas 0b5002f
Revision of getting started guide
marnovandermaas 9b1d298
Put each sentence on its own line
marnovandermaas 7a60a30
Revise running software
marnovandermaas 5c2db1e
Review exercises docs
marnovandermaas 1a06121
Minor fixes to exploring cheriot rtos doc
marnovandermaas d0458f6
Fix name in run simulator script
marnovandermaas 30eff74
Add Windows-specific board instructions
marnovandermaas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
# CHES CHERIoT Workshop Preparation | ||
|
||
In advance of the CHES Affiliated Sunburst Workshop, it's essential you prepare your environment so any issues can be sorted in advance of the day. If you have any issues in following this guide please contact the Sunburst Team on [[email protected]](mailto:[email protected]). | ||
In advance of the CHES Affiliated Sunburst Workshop, it's essential you prepare your environment so any issues can be sorted in advance of the day. | ||
If you have any issues in following this guide please contact the Sunburst Team on [[email protected]](mailto:[email protected]). | ||
|
||
The Sonata software build environment can be setup under Windows, OSX and Linux. | ||
The Sonata software build environment can be setup under Windows, macOS and Linux. | ||
|
||
We use a tool called [Nix](https://nixos.org/) to manage the build environment on all platforms. You will install it but don't need to know anything about it to follow these instructions. | ||
We use a tool called [Nix](https://nixos.org/) to manage the build environment on all platforms. | ||
You will install it but don't need to know anything about it to follow these instructions. | ||
|
||
Only Windows requires specific instructions, Nix handles everything you need on Linux and OSX. So if you're not using Windows jump straight to 'Installing Nix'. | ||
Only Windows requires specific instructions, Nix handles everything you need on Linux and macOS. | ||
So if you're not using Windows jump straight to [Installing Nix](#installing-nix). | ||
|
||
## Windows Specific Setup | ||
|
||
To obtain a Linux environment on Windows, you can choose to start a virtual machine or use Windows Subsystem for Linux (WSL). | ||
|
||
Microsoft provides a detailed guide on how to install WSL: https://learn.microsoft.com/en-us/windows/wsl/install. For latest systems this would just be a single command: | ||
Microsoft provides [a detailed guide on how to install WSL](https://learn.microsoft.com/en-us/windows/wsl/install). | ||
For latest systems this would just be a single command: | ||
```bat | ||
wsl --install | ||
``` | ||
|
@@ -21,14 +25,16 @@ You might need to enable virtualisation in the BIOS if it's not enabled by defau | |
If you are running the command without admin privileges, user account control (UAC) popups will appear a few times asking to allow changes to be made to the device. | ||
Click "yes" to approve. | ||
|
||
After the command's completion, it should say that Ubuntu is installed. Reboot your machine to make these changes effective. | ||
After the command's completion, it should say that Ubuntu is installed. | ||
Reboot your machine for the changes to take effect. | ||
|
||
After rebooting, Ubuntu should be available in your start menu. | ||
Click it to start. For the first time, it would prompt you to select a Unix username and password. | ||
Click it to start. | ||
For the first time, it prompts you to select a Unix username and password. | ||
Follow the Linux (Ubuntu) steps for the rest of this guide. | ||
|
||
> ℹ️ If you have installed your WSL a long time ago, systemd may not have been enabled by default. | ||
> It is recommended to use enable systemd. | ||
> It is recommended to enable systemd. | ||
> See https://learn.microsoft.com/en-us/windows/wsl/systemd. | ||
|
||
## Installing Nix | ||
|
@@ -40,38 +46,37 @@ We recommend installing Nix with the Determinate Systems' [`nix-installer`](http | |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install | ||
``` | ||
|
||
For more indepth instructions, follow the guide on [the zero to nix site](https://zero-to-nix.com/start/install). | ||
For more in-depth instructions, follow the guide on [the zero to nix site](https://zero-to-nix.com/start/install). | ||
|
||
*If you've downloaded nix through another method, make sure the experimental features ["flakes"](https://nixos.wiki/wiki/Flakes) and ["nix-command"](https://nixos.wiki/wiki/Nix_command) are enabled.* | ||
*If you've downloaded Nix through another method, make sure the experimental features ["flakes"](https://nixos.wiki/wiki/Flakes) and ["nix-command"](https://nixos.wiki/wiki/Nix_command) are enabled.* | ||
|
||
*To use Nix from the terminal you'll need to open up a new terminal for it to be added to your path.* | ||
|
||
### Setup Cache | ||
|
||
To make use of the lowRISC cache so you don't have to rebuild binaries yourself, you'll need to make sure you're a trusted user. | ||
To do this, you will need to add your user to the trusted users in `/etc/nix/nix.conf`, e.g. `trusted-users = root username`. *You can also add all users from a certain group instead of a single user by using an `@` symbol before the group name, e.g. `@sudo` or `@wheel`.* | ||
To make use of the lowRISC Nix cache, so you don't have to rebuild binaries yourself, you'll need to make sure you're a trusted user. | ||
To do this, you will need to add your user to the trusted users in `/etc/nix/nix.conf`, e.g. `trusted-users = root username`. | ||
*You can also add all users from a certain group instead of a single user by using an `@` symbol before the group name, e.g. `@sudo` or `@wheel`.* | ||
|
||
> ℹ️ For Ubuntu users (including WSL users), this means adding this line to the `/etc/nix/nix.conf`: | ||
> ``` | ||
> trusted-users = root @sudo | ||
> ``` | ||
> | ||
> | ||
> You'll need to restart the nix-daemon afterwards for the change to be picked up. | ||
> ```sh | ||
> sudo systemctl restart nix-daemon | ||
> ``` | ||
|
||
|
||
> ℹ️ For OSX users, this means adding this line to the `/etc/nix/nix.conf`: | ||
> ℹ️ For macOS users, this means adding this line to the `/etc/nix/nix.conf`: | ||
> ``` | ||
> trusted-users = root @admin | ||
> ``` | ||
> | ||
> | ||
> You then need to restart your Mac for the changes to take effect. | ||
|
||
## Enter the CHERIoT development environment | ||
|
||
|
||
Running the following will put you in a shell environment with all the applications needed to build the CHERIoT RTOS. | ||
|
||
```sh | ||
|
@@ -81,7 +86,8 @@ nix develop github:lowRISC/sonata-software | |
exit | ||
``` | ||
|
||
These applications are layered on top of your usual environment. You can see what was added with `echo $PATH`. | ||
These applications are layered on top of your usual environment. | ||
You can see what was added with `echo $PATH`. | ||
|
||
``` | ||
do you want to allow configuration setting 'extra-substituters' to be set to 'https://nix-cache.lowrisc.org/public/' (y/N)? y | ||
|
@@ -91,8 +97,8 @@ do you want to permanently mark this value as trusted (y/N)? y | |
warning: ignoring untrusted substituter 'https://nix-cache.lowrisc.org/public/', you are not a trusted user. | ||
``` | ||
|
||
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-cache). 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. | ||
|
||
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-cache). | ||
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. | ||
|
||
## Your first build | ||
|
||
|
@@ -125,7 +131,8 @@ Wrote 147968 bytes to build/cheriot/cheriot/release/sonata_simple_demo.uf2 | |
|
||
(Note output size may differ) | ||
|
||
If you have got a successful build, congratulations! Your environment is ready to go for Sonata software development. Get in touch with Greg Chadwick on [[email protected]](mailto:[email protected]) if you have any issues. | ||
If you have got a successful build, congratulations! Your environment is ready to go for Sonata software development. | ||
Get in touch with lowRISC on [[email protected]](mailto:[email protected]) if you have any issues. | ||
|
||
For reference the full output (from a build run on a Linux machine) looks like: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to point at the exercises readme and not it's directory. I think there's an important semantic difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I made this change is that link currently exits the mdbook and goes to GitHub. I would like it to stay within the mdbook. Happy to fix it in another way though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason you actually made this change was that this used to lead to
.../README.html
that didn't exist until the mdbook-regex PR. That PR the mistakenly redirected it to github. This will be fixed by #36There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!