Skip to content

Commit 007683c

Browse files
committed
lib.sh: switch is_zephyr() to look for zephyr strings in .ldc
Now that the sof-logger is well tested with Zephyr, change the is_zephyr() test to count the number of "zephyr" strings in the .ldc dictionary file. The previous test was based on /etc/sof/manifest.txt which is a CI-only file. This probably removes a dependency on 'jq' too. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 46daf46 commit 007683c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

case-lib/lib.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,15 @@ disable_kernel_check_point()
392392

393393
is_zephyr()
394394
{
395-
local manifest=/etc/sof/manifest.txt
396-
test -e "$manifest" || return 1
397-
jq '.version.firmwareType' "$manifest" | grep "zephyr"
395+
local ldcFile
396+
ldcFile=$(find_ldc_file) || {
397+
dloge '.ldc file not found, assuming XTOS firmware'
398+
return 1
399+
}
400+
local znum
401+
znum=$(strings "$ldcFile" | grep -c -i zephyr)
402+
# As of Nov. 2021, znum ~= 30 for Zephyr and 0 for XTOS
403+
test "$znum" -gt 10
398404
}
399405

400406
logger_disabled()

0 commit comments

Comments
 (0)