Skip to content

Commit f2e3ae9

Browse files
committed
lib.sh: get_ldc_subdir(): add optional platform argument to strip
This is needed by IPC4 - which generally does not use the .ldc file but that's another debate for later; let's just get the check-sof-logger.sh test passing again for now. This problem wasn't found until last week when Fred cleaned up and simplified the internal Intel deployment script. This part of the logic has too many fallbacks so one of them was probably hiding the issue, probably picking up some .ldc file in /etc instead. ``` ── sof-ipc4 │   ├── arl │   │   └── community │   │   └── sof-arl.ri -> ../../mtl/community/sof-mtl.ri │   ├── arl-s │   │   └── community │   │   └── sof-arl-s.ri -> ../../mtl/community/sof-mtl.ri │   ├── mtl │   │   └── community │   │   └── sof-mtl.ri │   ├── sof-arl.ldc -> sof-mtl.ldc │   ├── sof-arl-s.ldc -> sof-mtl.ldc │   └── sof-mtl.ldc ``` Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 6a55123 commit f2e3ae9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

case-lib/lib.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,10 @@ fake_kern_error()
305305

306306
}
307307

308+
# $1: optional (platform) string to strip. Useful for IPC4.
308309
get_ldc_subdir()
309310
{
311+
local strip_arg="$1"
310312
local subdir='intel/sof' # default
311313
local fw_path
312314
local fw_path_info='/sys/kernel/debug/sof/fw_profile/fw_path'
@@ -323,6 +325,7 @@ get_ldc_subdir()
323325
subdir=${subdir%/community}
324326
subdir=${subdir%/intel-signed}
325327
subdir=${subdir%/dbgkey}
328+
test -z "$strip_arg" || subdir=${subdir%/"$strip_arg"}
326329
fi
327330
fi
328331
printf '%s' "$subdir"
@@ -345,7 +348,7 @@ find_ldc_file()
345348
}
346349
ldcFile=/etc/sof/sof-"$platf".ldc
347350
[ -e "$ldcFile" ] || {
348-
local subdir; subdir=$(get_ldc_subdir)
351+
local subdir; subdir=$(get_ldc_subdir "$platf")
349352
ldcFile=/lib/firmware/"${subdir}"/sof-"$platf".ldc
350353
}
351354
fi

0 commit comments

Comments
 (0)