sof/scripts
Marc Herbert b4edab69de Revert "cmake: make sure sha1 is computed without filters"
Commit 3315681c69 ("cmake: make sure sha1 is computed without
filters") added the `--no-filters` option to the `git hash-object`
invocation used to produce a `src/` checksum embedded in all firmware
binaries and .ldc files.

This fixed a small mismatch for the (very few) people using the
_asymmetric_ `autocrlf = input`. However it created a huge mismatch for
the numerous people using the _symetric_ `autocrlf = true`.

So revert that commit, remove `--no-filters` and replace it with a build
time warning.

`--no-filters` produces a checksum of the files as they are on the
filesystem, as opposed to how they would be input into git after
optional CRLF -> LF conversion.

When `--no-filters` was added, no one was compiling in Windows. Most
developers were not performing any conversion because there is no
`autocrlf` conversion by default on Linux.  Files were identical inside
and outside of git and life was simple.

Simple life except for at least one indomitable Linux developer who had
the _asymmetric_ `autocrlf = input` setting. Also, the SOF git repo
always had two exceptional (and generated) files with CRLF end of lines;
see issue #5917 for details (all other files have LF end of lines). So
for that "asymmetric" developer only and these two files only, `autocrlf
= input` converted these 2 files to LF before hashing and this caused a
different checksum. `--no-filters` stopped that conversion and "solved"
that mismatch.

But now Windows has entered the stage. On Windows, the default is
usually (and unfortunately) the symmetric `autocrlf = true`. It is the
default for Github's Windows runner. This symmetric default converts ALL
other files to CRLF when extracting them out of git. This causes `git
hash-object --no-filters` to produce a _different hash for all but 2
files on Windows_!

The only solution is to:

1. Drop the `--no-filters` to align everything on what is _stored in
   git_. What is stored in git is the only thing we are sure all users have
   in common.

2. Request users to use only _symmetric_ `autocrlf` settings so any
   optional input+output conversion cancels itself out.

3. Convert odd files and make sure they all have LF end of lines.

4. In the future, drop this entire git hash-object technique which is
   flawed in multiple ways and has been causing multiple issues. Much,
   much more work than this very small revert though.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 12:17:51 +00:00
..
cmake Revert "cmake: make sure sha1 is computed without filters" 2023-01-18 12:17:51 +00:00
docker_build docker: add AMD/Rembrandt gcc toolchain 2022-08-10 21:25:50 +01:00
kconfig
scan script: clang scan-build for xtensa 2020-03-04 11:02:56 +01:00
README.docker
build-tools.sh scripts: fix check whether CMake configuration succeeded 2023-01-04 16:09:08 +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: fix wrong uid in warning 1001 -> 1000 2022-10-10 11:29:05 +01:00
gen-doc.sh gen-doc.sh: Use getopts for parsing arguments 2020-03-31 15:10:34 +01:00
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 sparse: pass platform argument to error filter script 2022-12-12 12:05:26 +00:00
qemu-check.sh scripts: qemu-check.sh: update READY_IPC for imx8 2022-12-05 14:33:46 +00:00
rebuild-testbench.sh scripts: replace "make" with "cmake --build" 2021-01-18 16:11:46 +00:00
run-mocks.sh scripts/run-mocks.sh: major refactor 2021-07-26 09:19:50 +01: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 scripts/test-repro-build.sh: leave only TGL 2022-09-02 18:30:02 +01:00
xtensa-build-all.sh platform: Add mt8188 to Kconfig 2022-12-15 16:11:23 +00:00
xtensa-build-zephyr.py xtensa-build-zephyr.py: convert sof-info/ text files from CRLF to LF 2022-12-23 11:02:21 +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 baytrail:
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -l byt
or (may need password test0000 for rimage install)
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh byt

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