Skip to content

Commit 1c4bf62

Browse files
lrgirdwolgirdwood
authored andcommitted
scripts: readme: Make the readme generic and add more info
Rename the readme to a generic name and add context for more scripts. Add more markdown. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent bd3644c commit 1c4bf62

File tree

2 files changed

+107
-34
lines changed

2 files changed

+107
-34
lines changed

scripts/README.docker

Lines changed: 0 additions & 34 deletions
This file was deleted.

scripts/Readme.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SOF Helper Scripts
2+
3+
This folder contains a lot of useful scripts that can speed up development for routine tasks or simplify execution of complex tasks.
4+
5+
## Build Scripts
6+
7+
SOF has several build targets depending on whether you are building firmware, tooling, documentation or topologies. This directory has a helper for each.
8+
9+
### Firmware
10+
11+
Firmware can either be built using west command directly or by the xtensa-build-zephyr.py script. This script wraps up the west commands and can build using either the Zephyr SDK compiler or the Cadence xtensa compiler for xtensa targets.
12+
13+
Please run the script with --help to see all options.
14+
15+
E.g to build SOF for Intel Pantherlake:
16+
17+
1) Enable the python virtual environment for west. This should be in your SOF workspace installation direction. Default is ```~/work/sof``` (only needs run once).
18+
```bash
19+
source ~/work/sof/.venv/bin/activate
20+
```
21+
2) Now run the build script. *Note: most build errors are a result of ingredients being out of sync with the west manifest. Please run ```west update``` and rebuild before fixing/reporting build errors.*
22+
```bash
23+
./scripts/xtensa-build-zephyr.py -p ptl
24+
```
25+
26+
### Testbench
27+
28+
Testbench is a host application that is used to run SOF processing modules on developers PC. This allows for module development using regular host based tooling.
29+
30+
Please run
31+
```bash
32+
./rebuild-testbench.sh --help
33+
```
34+
for full options.
35+
36+
Testbench can be also be built for Cadence simulator targets.
37+
38+
### Tools and Topologies
39+
40+
Tooling and topology can be built together using one script. To build all topologies please run:
41+
42+
```bash
43+
./scripts/build-tools.sh
44+
```
45+
46+
This script can build:
47+
1) sof-ctl
48+
2) sof-logger
49+
3) probes
50+
4) all topology 1 & 2 and test topologies.
51+
5) Local ALSA git version for alsa-lib and alsa-utils that have features not yet in distro version of ALSA packages.
52+
53+
## SDK Support
54+
55+
There is some SDK support in this directory for speeding up or simplifying tasks with multiple steps.
56+
57+
### New Modules
58+
59+
A new module can be created by running the sdk-create-module script. This script will copy the template module and rename all strings, Cmakefiles, Kconfigs to match the new module. It will also create a UUID for the new module and a TOML manifest entry (for targets that need this).
60+
61+
Please run
62+
```bash
63+
./sdk-create-module.py new_module_name
64+
```
65+
66+
## Docker
67+
68+
The docker container provided in docker_build sets up a build environment for
69+
building Sound Open Firmware. A working docker installation is needed to run
70+
the docker build container.
71+
72+
Note: In order to run docker as non sudo/root user please run.
73+
```bash
74+
sudo usermod -aG docker your-user-name
75+
```
76+
Then logout and login again.
77+
78+
Quick Start:
79+
80+
First, build the docker container. This step needs to be done initially and
81+
when the toolchain or alsa dependencies are updated.
82+
```bash
83+
cd scripts/docker_build
84+
./docker-build.sh
85+
```
86+
After the container is built, it can be used to run the scripts.
87+
88+
To build for tigerlake:
89+
```bash
90+
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -l tgl
91+
```
92+
or (may need password test0000 for rimage install)
93+
```bash
94+
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh tgl
95+
```
96+
To rebuild the topology and logger:
97+
```bash
98+
./scripts/docker-run.sh ./scripts/build-tools.sh
99+
```
100+
An incremental sof.git build:
101+
```bash
102+
./scripts/docker-run.sh make
103+
```
104+
Or enter a shell:
105+
```bash
106+
./scripts/docker-run.sh bash
107+
```

0 commit comments

Comments
 (0)