Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Dec 24, 2021

Fixes old (Aug 2020) and untested commit b2a325a ("cmake: Handle
empty SOF_SRC_HASH_LONG") which tried to use GIT_LOG_HASH as a fallback
for the SOF_SRC_HASH .ldc checksum but always fell back on "0" instead
because of a misunderstanding of cmake's surprisingly complex "if"
operator.

Before Zephyr this was not an issue in practice because GIT_LOG_HASH was
empty anyway when SOURCE_DIRECTORY/.git was missing, so there was
nothing to lose.

For the Zephyr builds this will now use the SOF SHA1 as the .ldc checksum
for now. Probably not ideal yet but far better than the current constant
"0" which means no check at all.

Also log the SOF_SRC_HASH fallback value now and change the second
fallback (when GIT_LOG_HASH is also missing) from "0" to the
searchable hexspeak "baadf00d".

Signed-off-by: Marc Herbert marc.herbert@intel.com

Fixes old (Aug 2020) and untested commit b2a325a ("cmake: Handle
empty SOF_SRC_HASH_LONG") which tried to use GIT_LOG_HASH as a fallback
for the SOF_SRC_HASH .ldc checksum but always fell back on "0" instead
because of a misunderstanding of cmake's surprisingly complex "if"
operator.

Before Zephyr this was not an issue in practice because GIT_LOG_HASH was
empty anyway when SOURCE_DIRECTORY/.git was missing, so there was
nothing to lose.

For the Zephyr builds this will now use the SOF SHA1 as the .ldc checksum
for now. Probably not ideal yet but far better than the current constant
"0" which means no check at all.

Also log the SOF_SRC_HASH fallback value now and change the second
fallback (when GIT_LOG_HASH is also missing) from "0" to the
searchable hexspeak "baadf00d".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb marked this pull request as ready for review December 24, 2021 01:36
@marc-hb marc-hb requested review from ktrzcinx and kv2019i December 24, 2021 01:37
@marc-hb marc-hb added bug Something isn't working as expected P1 Blocker bugs or important features Zephyr Issues only observed with Zephyr integrated labels Dec 24, 2021
@marc-hb
Copy link
Collaborator Author

marc-hb commented Dec 24, 2021

This will help remove some unrelated noise from very complex corruption issue #5120

Sample output from https://sof-ci.01.org/sofpr/PR5129/build11460/build/tgl_zph.txt

-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter 
-- version.cmake starting SOF build at 2021-12-24T01:21:55Z UTC
-- Building git commit with parent(s):
2e09c300a997 b1ff2b303c11 0376e66d494d (HEAD, sof/pull/5129/merge) Merge 0376e66d494d1d5936a4035a59050090b2175dfa into b1ff2b303c11f876a6aaa9ca0338dc3e3ab0d7da
-- GIT_TAG / GIT_LOG_HASH : v2.0-rc1-110-g2e09c300a997 / 2e09c300a997
CMake Warning at /srv/home/jenkins/workspace/sof_generic_build/scripts/cmake/version.cmake:118 (message):
  /srv/home/jenkins/workspace/sof_generic_build/zephyr/.git not found, source
  content hash cannot computed for the .ldc.  Using SOF_SRC_HASH=2e09c300
  from GIT_LOG_HASH instead
Call Stack (most recent call first):
  /srv/home/jenkins/workspace/sof_generic_build/zephyr/CMakeLists.txt:671 (include)

-- Up-to-date /srv/home/jenkins/workspace/sof_generic_build/zephyr/include/version.h
-- Configuring done
-

https://sof-ci.01.org/sofpr/PR5129/build11460/devicetest is all green but missing Zephyr. Re-running.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Dec 24, 2021

SOFCI TEST

EDIT: https://sof-ci.01.org/sofpr/PR5129/build11463/devicetest/?model=TGLU_UP_HDA_ZEPHYR&testcase=check-sof-logger shows a non-zero .ldc checksum. Everything is green.

@marc-hb marc-hb requested a review from lyakh December 24, 2021 05:27
@lgirdwood lgirdwood merged commit 5d66f1d into thesofproject:main Dec 24, 2021
@marc-hb marc-hb deleted the fix-zep-ldc-chk branch January 7, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected P1 Blocker bugs or important features Zephyr Issues only observed with Zephyr integrated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants