From c68d8ca2c400a26eae49f87f4e977d99ba4881d6 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 4 Feb 2022 10:00:54 -0600 Subject: [PATCH 1/2] kconfig: add two scripts to update distro config to sof and sof-dev 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 --- kconfig-distro-sof-dev-update.sh | 19 +++++++++++++++++++ kconfig-distro-sof-update.sh | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 kconfig-distro-sof-dev-update.sh create mode 100755 kconfig-distro-sof-update.sh diff --git a/kconfig-distro-sof-dev-update.sh b/kconfig-distro-sof-dev-update.sh new file mode 100755 index 0000000..2c6d066 --- /dev/null +++ b/kconfig-distro-sof-dev-update.sh @@ -0,0 +1,19 @@ +#!/bin/bash +KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) +echo $KCONFIG_DIR + +. $KCONFIG_DIR/kconfig-lib.sh + +echo "-sof" > localversion +make olddefconfig +make localmodconfig + +$COMMAND .config \ + $KCONFIG_DIR/sof-defconfig \ + $KCONFIG_DIR/sof-dev-defconfig \ + $KCONFIG_DIR/amd-defconfig \ + $KCONFIG_DIR/mach-driver-defconfig \ + $KCONFIG_DIR/hdaudio-codecs-defconfig \ + $KCONFIG_DIR/lock-stall-defconfig \ + $KCONFIG_DIR/soundwire-defconfig \ + $@ diff --git a/kconfig-distro-sof-update.sh b/kconfig-distro-sof-update.sh new file mode 100755 index 0000000..f6116cb --- /dev/null +++ b/kconfig-distro-sof-update.sh @@ -0,0 +1,18 @@ +#!/bin/bash +KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) +echo $KCONFIG_DIR + +. $KCONFIG_DIR/kconfig-lib.sh + +echo "-sof" > localversion +make olddefconfig +make localmodconfig + +$COMMAND .config \ + $KCONFIG_DIR/sof-defconfig \ + $KCONFIG_DIR/amd-defconfig \ + $KCONFIG_DIR/mach-driver-defconfig \ + $KCONFIG_DIR/hdaudio-codecs-defconfig \ + $KCONFIG_DIR/lock-stall-defconfig \ + $KCONFIG_DIR/soundwire-defconfig \ + $@ From dc4520bec97d2edb3d92520ce6a4613df45914c8 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 10 Feb 2022 14:07:13 -0600 Subject: [PATCH 2/2] kconfig: use set -e at the top 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 --- kconfig-distro-sof-dev-update.sh | 3 +++ kconfig-distro-sof-update.sh | 3 +++ kconfig-hda.sh | 3 +++ kconfig-minimize-distro-add-sof-defaults.sh | 3 +++ kconfig-sof-arm64.sh | 3 +++ kconfig-sof-default.sh | 3 +++ kconfig-sof-nocodec.sh | 3 +++ 7 files changed, 21 insertions(+) diff --git a/kconfig-distro-sof-dev-update.sh b/kconfig-distro-sof-dev-update.sh index 2c6d066..5bbdfb7 100755 --- a/kconfig-distro-sof-dev-update.sh +++ b/kconfig-distro-sof-dev-update.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-distro-sof-update.sh b/kconfig-distro-sof-update.sh index f6116cb..e599106 100755 --- a/kconfig-distro-sof-update.sh +++ b/kconfig-distro-sof-update.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-hda.sh b/kconfig-hda.sh index 50068ab..e4f3b54 100755 --- a/kconfig-hda.sh +++ b/kconfig-hda.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-minimize-distro-add-sof-defaults.sh b/kconfig-minimize-distro-add-sof-defaults.sh index 62fc7a9..a995a57 100755 --- a/kconfig-minimize-distro-add-sof-defaults.sh +++ b/kconfig-minimize-distro-add-sof-defaults.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-sof-arm64.sh b/kconfig-sof-arm64.sh index 4817bdb..af494a5 100755 --- a/kconfig-sof-arm64.sh +++ b/kconfig-sof-arm64.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-sof-default.sh b/kconfig-sof-default.sh index 0542e3d..41faede 100755 --- a/kconfig-sof-default.sh +++ b/kconfig-sof-default.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR diff --git a/kconfig-sof-nocodec.sh b/kconfig-sof-nocodec.sh index 035e1a6..aeaf7ff 100755 --- a/kconfig-sof-nocodec.sh +++ b/kconfig-sof-nocodec.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -e + KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]}) echo $KCONFIG_DIR