Commit Graph

15 Commits

Author SHA1 Message Date
Marc Herbert e6f72dee82 zephyr/docker-build.sh: upgrade CMake to 3.21 or above
CMake 3.21 changed the order object files are passed the linker. This
breaks build reproducibility.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-16 15:19:44 -08:00
Marc Herbert 082cc8fbd1 zephyr/docker-build.sh: give PATH precedence to a local sparse
Adjust PATH to give precedence to any local sparse. New precedence:

1. zephyr-workspace
2. /opt/sparse/bin
3. Anything else in default PATH

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-11-22 09:19:45 +00:00
Marc Herbert 027be98371 zephyr/docker: move exec_as_sof_uid() to new sudo-cwd.sh
Besides making things more obvious, the important functional change is
that the user switch is now performed for _every_ invoked, command, not
just for the build command.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-10 11:29:05 +01:00
Marc Herbert 2d2f5f6982 zephyr/docker-*.sh: pass REAL_CC through for sparse support
Other minor fixes

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-09-26 12:33:56 +01:00
Marc Herbert 125d372b19 docker-build.sh: don't switch versions when already initialized
Restore ability to use (and test!) zephyr/docker-build.sh locally
without overwriting work in progress.

Fixes commit b371373f7d ("scripts: docker-build.sh updated with
changes from xtensa-build-zephyr.py")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-04 09:46:22 +01:00
Andrey Borisovich b371373f7d scripts: docker-build.sh updated with changes from xtensa-build-zephyr.py
Removed old flags from python script call and replaced with
new one. Added one more working directory to zephyr-build container
now SOF is placed in /workdir/sof and west workspace in /workdir .

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-08-03 11:43:22 +01:00
Marc Herbert 3f86cab70f zephyr/docker-build.sh: make failure to symlink the SDK not fatal
When running interactively the symlink may already be there.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-05-08 10:01:57 +01:00
Marc Herbert d09844ab98 zephyr/docker-build.sh: match UID with 'adduser' instead of 'chgrp -R'
This fixes SOF version.cmake which was just broken by a recent git
security update and started to fail like this:

```
  -- SOF version.cmake starting at 2022-04-25T18:14:56Z UTC
  -- /workdir/zephyr/.. is at git commit with parent(s):
  fatal: unsafe repository ('/workdir' is owned by someone else)
  To add an exception for this directory, call:

   git config --global --add safe.directory /workdir
```
(example at https://github.com/thesofproject/sof/runs/6162885265)

chgrp -R was always an ugly hack because it was messing with
(persistent) file permissions on the host, outside the container. This
new adduser solution is unfortunately much more code but it does not
leak any side effect outside the container.

Do not fix scripts/docker-run.sh yet because there is still no UID
mismatch between Github Actions and the SOF container (they're both
1001) but add a warning + TODO.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-04-26 22:08:53 +01:00
Marc Herbert e2db3bcdb9 .github: switch to new xtensa-build-zephyr.py
Switch Github Actions away from older shell script.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-24 14:54:50 +00:00
Marc Herbert 63ce1d6b51 zephyr/docker-build: fix "stale" ZEPHYR_SDK_INSTALL_DIR comment
It's apparently not stale but "stable".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-29 16:58:24 +01:00
Marc Herbert 1b4b3a575b zephyr/docker-build: unset stale ZEPHYR_SDK_INSTALL_DIR, symlink toolchains
Currently set to obsolete 0.12.4. Better remove it here for everyone
rather than overriding it in Github Actions only.

Also symlinks the toolchains in /opt to /home to fix autodetection

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-28 16:13:27 +01:00
Marc Herbert a0ab594045 zephyr/docker-build.sh: pass arguments through to xtensa-build-zephyr.sh
Allows passing compilation flags and any other argument.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-09 15:48:18 +01:00
Marc Herbert 2802f2a40a zephyr/docker-build.sh: apt-get install tree
To show the staging area at the end of the Zephyr build

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Marc Herbert 55025f6343 zephyr/docker-build.sh: remove apt update / install libssl-dev
The Zephyr image has been updated in
https://github.com/zephyrproject-rtos/docker-image/pull/58

This will save some time and even better avoid llvm.org
glitches like this one:

https://github.com/thesofproject/sof/pull/4089/checks?check_run_id=2554961695

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-13 12:00:45 +01:00
Marc Herbert 014a386dfb .github: add Zephyr build
Use the official image from the Zephyr project
https://github.com/zephyrproject-rtos/docker-image

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-30 11:12:29 +01:00