Skip to content

Commit 1848d0f

Browse files
Merge pull request #1378 from jasonrandrews/new-content
Initial version of System76 Thelio Astra automotive Learning Path
2 parents dec3dfd + 72c44c1 commit 1848d0f

File tree

7 files changed

+397
-0
lines changed

7 files changed

+397
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Develop Arm automotive software on the System76 Thelio Astra
3+
4+
minutes_to_complete: 60
5+
6+
who_is_this_for: This is an introductory topic for automotive developers interested in local development using the System76 Thelio Astra Linux desktop computer.
7+
8+
learning_objectives:
9+
- Create an efficient automotive development environment on the System76 Thelio Astra desktop.
10+
- Build and run the Arm Automotive Solutions Software Reference Stack locally.
11+
12+
prerequisites:
13+
- A System76 Thelio Astra desktop computer running Ubuntu 24.04.
14+
15+
author_primary: Jason Andrews
16+
17+
### Tags
18+
skilllevels: Introductory
19+
subjects: Containers and Virtualization
20+
armips:
21+
- Neoverse
22+
operatingsystems:
23+
- Linux
24+
tools_software_languages:
25+
- Automotive
26+
27+
### FIXED, DO NOT MODIFY
28+
# ================================================================================
29+
weight: 1 # _index.md always has weight of 1 to order correctly
30+
layout: "learningpathall" # All files under learning paths have this same wrapper
31+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
32+
---
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
# ================================================================================
3+
# Edit
4+
# ================================================================================
5+
6+
next_step_guidance: >
7+
You have successfully learned how to build and run the Arm Automotive Solutions Software Reference Stack on the System76 Thelio Astra.
8+
9+
recommended_path: "/learning-paths/cross-platform/docker-build-cloud/"
10+
11+
further_reading:
12+
- resource:
13+
title: Arm Automotive Solutions Documentation
14+
link: https://arm-auto-solutions.docs.arm.com/en/v1.1/index.html
15+
type: documentation
16+
- resource:
17+
title: Parsec
18+
link: https://parsec.community/
19+
type: documentation
20+
21+
# ================================================================================
22+
# FIXED, DO NOT MODIFY
23+
# ================================================================================
24+
weight: 21 # set to always be larger than the content in this path, and one more than 'review'
25+
title: "Next Steps" # Always the same
26+
layout: "learningpathall" # All files under learning paths have this same wrapper
27+
---
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# ================================================================================
3+
# Edit
4+
# ================================================================================
5+
6+
# Always 3 questions. Should try to test the reader's knowledge, and reinforce the key points you want them to remember.
7+
# question: A one sentence question
8+
# answers: The correct answers (from 2-4 answer options only). Should be surrounded by quotes.
9+
# correct_answer: An integer indicating what answer is correct (index starts from 0)
10+
# explanation: A short (1-3 sentence) explanation of why the correct answer is correct. Can add additional context if desired
11+
12+
13+
review:
14+
- questions:
15+
question: >
16+
To get enough memory, the Arm Automotive Solutions Software Reference Stack must be built on an Arm cloud instance.
17+
answers:
18+
- "True"
19+
- "False"
20+
correct_answer: 2
21+
explanation: >
22+
You can build the automotive software stack on a local machine using the System76 Thelio Astra Linux desktop.
23+
24+
- questions:
25+
question: >
26+
Which things below are benefits of Parsec?
27+
answers:
28+
- "Platform Agnostic API"
29+
- "Secure boot and attestation"
30+
- "Key management and cryptography"
31+
- "All of the above"
32+
correct_answer: 4
33+
explanation: >
34+
All of these help Parsec provide unified access to hardware security.
35+
36+
# ================================================================================
37+
# FIXED, DO NOT MODIFY
38+
# ================================================================================
39+
title: "Review" # Always the same title
40+
weight: 20 # Set to always be larger than the content in this path
41+
layout: "learningpathall" # All files under learning paths have this same wrapper
42+
---
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
# User change
3+
title: "Build the Arm Automotive Solutions Software Reference Stack"
4+
5+
weight: 3
6+
7+
layout: "learningpathall"
8+
---
9+
10+
The Arm Automotive Solutions Software Reference Stack can be run on the Arm Reference Design-1 AE.
11+
12+
This is a concept hardware design built on the Neoverse V3AE Application Processor (as primary compute) and augmented with an Arm Cortex-R82AE based safety island.
13+
14+
The system additionally includes a Runtime Security Engine (RSE) used for the secure boot and runtime secure services.
15+
16+
The software stack consists of firmware, boot loader, hypervisor, Linux kernel, file system, and applications.
17+
18+
The development environment uses the Yocto Project build framework.
19+
20+
## Build the automotive software stack
21+
22+
The Thelio Astra makes it possible to build the complete software stack on an Arm-based local machine, instead of alternatives such as an Arm-based cloud instances or a non-Arm desktop computer.
23+
24+
You can build the Using the Arm Automotive Solutions Software Reference Stack from the command line of the Ubuntu 20.04 Multipass virtual machine.
25+
26+
Create a new directory and clone the repository:
27+
28+
```console
29+
mkdir -p ~/arm-auto-solutions
30+
cd ~/arm-auto-solutions
31+
git clone https://git.gitlab.arm.com/automotive-and-industrial/arm-auto-solutions/sw-ref-stack.git --branch v1.1
32+
```
33+
34+
Open the configuration menu:
35+
36+
```console
37+
kas menu sw-ref-stack/Kconfig
38+
```
39+
40+
Use the space bar and arrow keys to select the three components show in the screen capture below:
41+
- Accept the END USER LICENSE AGREEMENT
42+
- Safety Island Actuation Demo
43+
- Baremetal
44+
45+
![configuration #center](configure.png)
46+
47+
{{% notice Note %}}
48+
To build and run you much accept the EULA.
49+
{{% /notice %}}
50+
51+
Use tab to navigate to the `Build` button and press enter to start the build.
52+
53+
The build will take some time, depending on the number of CPUs in your virtual machine.
54+
97.6 KB
Loading
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
# User change
3+
title: "Run the Parsec demo"
4+
5+
weight: 4
6+
7+
layout: "learningpathall"
8+
---
9+
10+
11+
There are a number of example applications which demonstrate the software stack running the reference hardware system modeled by a Fixed Virtual Platform (FVP). The Parsec demo is explained below.
12+
13+
The [Parsec-enabled TLS demo](https://arm-auto-solutions.docs.arm.com/en/v1.1/design/applications/parsec_enabled_tls.html) illustrates a HTTPS session. A simple web page is transferred using a Transport Layer Security (TLS) connection.
14+
15+
Parsec, or Platform AbstRaction for SECurity, is an open-source initiative that provides a common API to hardware security and cryptographic services.
16+
17+
This enables applications to interact with the secure hardware of a device without needing to know the specific details of the hardware itself. The Parsec abstraction layer makes it easier to develop secure applications that can run on different devices and platforms.  
18+
19+
Follow the instructions below to run the Parsec demo.
20+
21+
## Run the Parsec SSL demo
22+
23+
From the command line, start a Tmux session.
24+
25+
```console
26+
tmux new-session -s arm-auto-solutions
27+
```
28+
29+
Tmux makes it possible to connect to the output from multiple hardware subsystems in the reference design.
30+
31+
To run the software stack on the FVP run:
32+
33+
```console
34+
cd ~/arm-auto-solutions
35+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose"
36+
```
37+
38+
This will run the entire software stack on a model of the hardware.
39+
40+
At anytime you can use Tmux to interact with the different subsystems using `Ctrl-b` then `w` to bring up a list of windows. Use the arrow keys to select a window.
41+
42+
After the software boots, you reach a Linux login prompt: `fvp-rd-kronos login:`
43+
44+
Enter `root` for the login name, no password is required.
45+
46+
Make sure the initialization process is complete by running:
47+
48+
```console
49+
systemctl is-system-running --wait
50+
```
51+
52+
If the output is `running`, continue to the next step. If not, re-run the command until the output is `running`.
53+
54+
On the primary compute run the SSL server:
55+
56+
```console
57+
ssl_server &
58+
```
59+
60+
The output from the server is printed:
61+
62+
```output
63+
. Seeding the random number generator... ok
64+
. Loading the server cert. and key... ok
65+
. Bind on https://localhost:4433/ ... ok
66+
. Setting up the SSL data.... ok
67+
. Waiting for a remote connection ...
68+
```
69+
70+
The SSL client runs in a standard Ubuntu 22.04 container and requests a web page from the SSL server. The client has been modified to use Parsec, making it more portable and abstracting the details of the hardware security services.
71+
72+
Run the Parsec enabled SSL client:
73+
74+
```console
75+
docker run --rm -v /run/parsec/parsec.sock:/run/parsec/parsec.sock -v /usr/bin/ssl_client1:/usr/bin/ssl_client1 --network host docker.io/library/ubuntu:22.04 ssl_client1
76+
```
77+
78+
The container will be downloaded and run. The SSL client application named `ssl_client1` runs.
79+
80+
The client application requests a webpage from the SSL server and the output is:
81+
82+
```output
83+
. Seeding the random number generator... ok
84+
. Loading the CA root certificate ... ok (0 skipped)
85+
. Connecting to tcp/localhost/4433... ok
86+
. Performing the SSL/TLS handshake... ok
87+
. Setting up the SSL/TLS structure... ok
88+
. Performing the SSL/TLS handshake... ok
89+
< Read from client: 18 bytes read
90+
91+
GET / HTTP/1.0
92+
93+
> Write to client: ok
94+
. Verifying peer X.509 certificate... ok
95+
> Write to server: 156 bytes written
96+
97+
HTTP/1.0 200 OK
98+
Content-Type: text/html
99+
100+
<h2>Mbed TLS Test Server</h2>
101+
<p>Successful connection using: TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256</p>
102+
103+
. Closing the connection... ok
104+
. Waiting for a remote connection ... 18 bytes written
105+
106+
GET / HTTP/1.0
107+
108+
< Read from server: 156 bytes read
109+
110+
HTTP/1.0 200 OK
111+
Content-Type: text/html
112+
113+
<h2>Mbed TLS Test Server</h2>
114+
<p>Successful connection using: TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256</p>
115+
```
116+
117+
## Shutdown and clean up
118+
119+
You can shut down the simulated system:
120+
121+
```console
122+
shutdown now
123+
```
124+
125+
You will return to the command line.
126+
127+
Type `exit` to leave the Tmux session and `exit` again to leave the Multipass virtual machine.
128+
129+
To delete the Multipass VM run the commands:
130+
131+
```console
132+
multipass stop u20-32
133+
multipass delete u20-32
134+
multipass purge
135+
```
136+
137+
You have run the Parsec example from the Arm Automotive Solutions Software Reference Stack.
138+
139+
There are many other example applications you can run, refer to the Further Reading section.

0 commit comments

Comments
 (0)