-
Notifications
You must be signed in to change notification settings - Fork 23
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
kconfig: add two scripts to update distro config to sof and sof-dev #68
kconfig: add two scripts to update distro config to sof and sof-dev #68
Conversation
@nklayman can you give this a try? |
3f15255
to
e88bc6d
Compare
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.
In decreasing importance order:
-
Add
set -e
at the top of every script so it stops immediately on error
[sof-test] add set -e to all test cases (Unless You Love Debugging) sof-test#312 -
These scripts are missing quotes on almost every line. Simply run shellcheck and will tell you where they are missing. Pro tip: if your IDE understands gcc errors and lets you click on them, then
shellcheck -f gcc
offers the same.
https://mywiki.wooledge.org/Quotes
I'm Too Lazy to Read, Just Tell Me What to Do
When in doubt, double-quote every expansion in your shell commands.
- Nit: move everything to a
main()
function.
clean-up: move all shell script code to a function and use a "main" sof-test#740
$KCONFIG_DIR/hdaudio-codecs-defconfig \ | ||
$KCONFIG_DIR/lock-stall-defconfig \ | ||
$KCONFIG_DIR/soundwire-defconfig \ | ||
$@ |
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.
Especially this one must be quoted
$@ | |
"$@" |
KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
echo $KCONFIG_DIR | ||
|
||
. $KCONFIG_DIR/kconfig-lib.sh |
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.
Is this were $COMMAND comes from? If yes a very brief comment would be useful.
it's a copy of scripts written by others and that are used EVERY DAY by our github workflow. I am not a shell expert and if you want changes patches are welcome for all the scripts in this project. |
To enable SOF on a platform, it may be easier to start from the existing distro configurations. kconfig-distro-sof-update.sh adds the minimal SOF options needed kconfig-distro-sof-dev-update.sh: adds the SOF developer options Most users would need the first script only. To speed-up compilation time, the scripts rely on 'make localmodconfig', which assumes that all required modules are loaded beforehand. Signed-off-by: Pierre-Louis Bossart <[email protected]>
e88bc6d
to
c68d8ca
Compare
Sorry I thought it was something new based on the commit message. I agree consistency is important. Please add at least |
Recommended by Marc Herbert: Add set -e at the top of every script so it stops immediately on error Signed-off-by: Pierre-Louis Bossart <[email protected]>
done |
To enable SOF on a platform, it may be easier to start from the
existing distro configurations.
kconfig-distro-sof-update.sh adds the minimal SOF options needed
kconfig-distro-sof-dev-update.sh: adds the SOF developer options
Most users would need the first script only.
Signed-off-by: Pierre-Louis Bossart [email protected]