-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and start using generic functions fw_reldir() and fw_relfilepath() #1224
Conversation
Minor fixes to prepare support for /sys/kernel/debug/sof/fw_profile/ - Move emptiness test and error message from caller to function. - Give a much more specific name - Call journalctl directly, no need for the journalctl_cmd() indirection here. Signed-off-by: Marc Herbert <[email protected]>
Usual LNL failures in https://sof-ci.01.org/softestpr/PR1224/build686/devicetest/index.html, everything else 100% green (even suspend/resume!) EDIT after force-push: Usual LNL failures in https://sof-ci.01.org/softestpr/PR1224/build690/devicetest/index.html everything else green. |
Unifies all 3 possible ways to find the relative firmware directory. To be used in find_ldc_file() and is_firmware_file_zephyr(). Signed-off-by: Marc Herbert <[email protected]>
Simplify get_ldc_subdir() but using the new, universal fw_reldir(). Signed-off-by: Marc Herbert <[email protected]>
Add new, "universal" fw_relfilepath() function modelled after fw_reldir(). To be used in `is_firmware_file_zephyr()` and others. Signed-off-by: Marc Herbert <[email protected]>
Faster and more flexible. Signed-off-by: Marc Herbert <[email protected]>
case-lib/lib.sh
Outdated
@@ -825,22 +825,30 @@ is_zephyr_ldc() | |||
# https://github.com/thesofproject/linux/issues/3867 and friends. Keep this existing | |||
# journalctl_cmd() code as a fallback for older kernels or when the firmware has been |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
journalctl_cmd() -> journalctl
@@ -840,6 +840,45 @@ fw_reldir() | |||
printf '%s' "$(dirname "$from_klogs")" | |||
} | |||
|
|||
# Prints the relative firmware filepath: e.g. `intel/sof-ipc4/tgl/community/sof-tgl.ri` | |||
# | |||
# Some of the code duplicates fw_reldir() above. Unfortunately can't re-use and invoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to put a comment of duplication and possible re-use, but good comment here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed commit by commit. much make sense than reviewing entire change. Easy to follow.
Thank you for fixing the annoying error.
Add two generic functions fw_reldir() and fw_relfilepath() which search in this order:
The 3., slower, "legacy" option is kept because it's useful with either old kernels or when the modules have been unloaded.
Start using these two generic functions in
is_firmware_file_zephyr()
andget_ldc_subdir()
.