sof/scripts
Peter Ujfalusi 1adb1e45d3 xtensa-build-zephyr.py: Add option to create deployable build
The default firmware file path is standardized among vendors as follows:
IPC3
    /lib/firmware/VENDOR/sof/
    ├── community
    │   └── sof-PLAT.ri
    ├── dbgkey
    │   └── sof-PLAT.ri
    └── sof-PLAT.ri
IPC4
    /lib/firmware/VENDOR/sof-ipc4/
    └── PLAT
        ├── community
        │   └── sof-PLAT.ri
        ├── dbgkey
        │   └── sof-PLAT.ri
        └── sof-PLAT.ri\n

Currently the binaries created by the build can only be used for direct
deployment on IPC3 platforms but if one builds different vendor firmwares
the files have to be manually picked and sorted out.
We have two flags: --fw-naming and --use-platform-subdir which can be
played with but still not going to produce deployable build.

Introduce a new flag: --deployable-build
With the flag specified all other modificators are going to be ignored and
the build will do the 'right thing' to create a directory structure which
can be deployed as it is to the target's firmware directory.

To achieve this several changes needed:
PlatformConfig:
- drop the name member and replace it with a vendor string
- add a flag to indicate IPC4 platforms
  Later a new option can be added if needed for platforms which can be
  IPC3 or IPC4

Ignore fw-naming and use-platform-subdir in case of deployable build. The
options will be reset to their default in case they are changed.

symlink_or_copy extended to handle relative symlinks when the target and
link is not under the same directory.

The --deployable-build is disabled by default, it has to be enabled to
create deployable build for now.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-12-19 17:02:38 +00:00
..
cmake cmake: a few new add_local_sources[_ifdef]() compatibility macros 2023-11-29 14:52:36 +00:00
docker_build Dockerfile: add AMD/Vangogh gcc toolchain 2023-07-14 12:50:49 +01:00
kconfig
scan platform: remove support for cAVS 1.5 platforms 2023-03-02 11:28:23 +00:00
README.docker platform: remove support for Baytrail and Cherrytrail 2023-02-08 13:36:04 +00:00
build-tools.sh fuzzer: remove old fuzzer 2023-03-15 13:23:42 +00:00
checkpatch.pl cmake: stop sneakily downloading missing submodules at build time 2022-08-31 10:40:04 +01:00
const_structs.checkpatch
docker-qemu.sh
docker-run.sh scripts/docker-run.sh: run with sudo-cwd.sh 2023-05-02 21:09:11 +03:00
fuzz.sh Give fuzz.sh a `proper -h` help text 2023-12-19 16:52:33 +00:00
gen-doc.sh
host-testbench.sh host-testbench.sh: add FullTest variable and set 0 by default 2022-09-07 22:09:33 +01:00
parse_sparse_output.sh parse_sparse_output.sh: add "removes address space" and "too many" 2023-04-25 11:52:23 +03:00
qemu-check.sh platform: remove support for cAVS 2.0 platforms 2023-03-07 14:02:18 +02:00
rebuild-testbench.sh rebuild-testbench.sh: add incremental build command in help message 2023-12-19 16:54:45 +00:00
run-mocks.sh Scripts: run-mocks.sh: Change default config to avoid error 2023-08-25 16:55:18 +01:00
set_xtensa_params.sh set_xtensa_params.sh: add ZEPHYR_TOOLCHAIN_VARIANT 2023-12-13 22:17:35 +02:00
sof-post-commit-hook.sh check patch: allow C99 comments 2021-12-06 09:58:32 +00:00
sof-pre-commit-hook.sh
sof-target-install.sh
sof_fw.kb
spelling.txt
sudo-cwd.sh scripts/sudo-cwd.sh: don't try to copy missing sudoers.d/ permissions 2023-01-06 14:52:09 +00:00
test-repro-build.sh Intel: remove XTOS support 2023-05-11 19:17:17 +03:00
xtensa-build-all.sh scripts: rename XTENSA_TOOLS_VERSION to TOOLCHAIN_VER as in Zephyr 2023-12-13 22:17:35 +02:00
xtensa-build-zephyr.py xtensa-build-zephyr.py: Add option to create deployable build 2023-12-19 17:02:38 +00:00

README.docker

The docker container provided in docker_build sets up a build environment for
building Sound Open Firmware. A working docker installation is needed to run
the docker build container.

Note: In order to run docker as non sudo/root user please run.

sudo usermod -aG docker your-user-name

Then logout and login again.

Quick Start:

First, build the docker container. This step needs to be done initially and
when the toolchain or alsa dependencies are updated.

cd scripts/docker_build

./docker-build.sh

After the container is built, it can be used to run the scripts.

To build for tigerlake:
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -l tgl
or (may need password test0000 for rimage install)
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh tgl

To rebuild the topology and logger:
./scripts/docker-run.sh ./scripts/build-tools.sh

An incremental sof.git build:
./scripts/docker-run.sh make

Or enter a shell:
./scripts/docker-run.sh bash