Skip to content
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

Extend kconfig #93

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions amd-defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ CONFIG_SND_SOC_SOF_AMD_TOPLEVEL=m
CONFIG_SND_SOC_SOF_AMD_RENOIR=m
CONFIG_SND_SOC_SOF_AMD_REMBRANDT=m
CONFIG_SND_AMD_ACP_CONFIG=m
CONFIG_SND_SOC_SOF_AMD_VANGOGH=m
CONFIG_SND_SOC_SOF_AMD_ACP63=m
3 changes: 0 additions & 3 deletions base-defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
CONFIG_EXPERT=y
CONFIG_DYNAMIC_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y

CONFIG_FW_LOADER_COMPRESS=y
CONFIG_FW_LOADER_COMPRESS_ZSTD=y
Expand Down
23 changes: 12 additions & 11 deletions kconfig-distro-sof-dev-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$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 \
$@
"$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 \
"$KCONFIG_DIR"/soundwire-codecs-defconfig \
"$@"
20 changes: 10 additions & 10 deletions kconfig-distro-sof-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$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 \
$@
"$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 \
"$@"
14 changes: 7 additions & 7 deletions kconfig-hda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$@"
4 changes: 3 additions & 1 deletion kconfig-lib.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

#!/bin/bash
# shellcheck disable=SC2034
Copy link

@marc-hb marc-hb Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file is only meant to be sourced, not invoked directory so I wouldn't do this.

shellcheck is like checkpatch: it's right most of the time but all the time.

There are ways to silence specific warnings but since shellcheck is not run in CI in this repo then I wouldn't bother.

# ^-----^ SC2034 (warning): COMMAND appears unused.
BUILD_DIR=$(pwd)

# find merge_config in code directory
Expand Down
24 changes: 12 additions & 12 deletions kconfig-minimize-distro-add-sof-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

$COMMAND .config \
$KCONFIG_DIR/minimize-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$@
"$KCONFIG_DIR"/minimize-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$@"
14 changes: 7 additions & 7 deletions kconfig-sof-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig ARCH=arm64
$COMMAND -m .config \
$KCONFIG_DIR/arm64-nobloat-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$@
"$KCONFIG_DIR"/arm64-nobloat-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$@"
make olddefconfig ARCH=arm64
19 changes: 19 additions & 0 deletions kconfig-sof-default-nodev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$@"
33 changes: 17 additions & 16 deletions kconfig-sof-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/avs-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$KCONFIG_DIR/bpf-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/avs-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$KCONFIG_DIR"/soundwire-codecs-defconfig \
"$KCONFIG_DIR"/bpf-defconfig \
"$@"
26 changes: 13 additions & 13 deletions kconfig-sof-nocodec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/nocodec-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/bpf-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/nocodec-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/bpf-defconfig \
"$@"
1 change: 1 addition & 0 deletions mach-driver-defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m
CONFIG_SND_SOC_INTEL_SOF_NAU8825_MACH=m
CONFIG_SND_SOC_INTEL_SOF_SSP_AMP_MACH=m
CONFIG_SND_SOC_INTEL_SOF_DA7219_MACH=m

# Intel machine drivers only supported in SST mode
CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
Expand Down
2 changes: 2 additions & 0 deletions sof-defconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# These configurations can be used by distros without issues

CONFIG_DYNAMIC_DEBUG=y

# Generic SOF selections
CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SOF_PCI=m
Expand Down
4 changes: 4 additions & 0 deletions sof-dev-defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# These configurations should not be used by distros but only by
# developers

# top-level configs
CONFIG_EXPERT=y
CONFIG_PM_ADVANCED_DEBUG=y

# debug options
CONFIG_SND_SOC_SOF_DEVELOPER_SUPPORT=y
CONFIG_SND_SOC_SOF_DEBUG=y
Expand Down
24 changes: 24 additions & 0 deletions soundwire-codecs-defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# add codecs so that they are compiled even if no machine
# drivers are selected
CONFIG_MFD_CS42L43_SDW=m
CONFIG_SND_SOC_CS35L56_SDW=m
CONFIG_SND_SOC_CS42L42_SDW=m
CONFIG_SND_SOC_CS42L43_SDW=m
CONFIG_SND_SOC_MAX98373_SDW=m

CONFIG_SND_SOC_RT1017_SDCA_SDW=m
CONFIG_SND_SOC_RT1308_SDW=m
CONFIG_SND_SOC_RT1316_SDW=m
CONFIG_SND_SOC_RT1318_SDW=m
CONFIG_SND_SOC_RT5682_SDW=m
CONFIG_SND_SOC_RT700_SDW=m
CONFIG_SND_SOC_RT711_SDW=m
CONFIG_SND_SOC_RT711_SDCA_SDW=m
CONFIG_SND_SOC_RT712_SDCA_SDW=m
CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW=m
CONFIG_SND_SOC_RT722_SDCA_SDW=m
CONFIG_SND_SOC_RT715_SDW=m
CONFIG_SND_SOC_RT715_SDCA_SDW=m

# SoundWire mockup codec
CONFIG_SND_SOC_SDW_MOCKUP=m
14 changes: 0 additions & 14 deletions soundwire-defconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
CONFIG_SOUNDWIRE=m
CONFIG_SOUNDWIRE_INTEL=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m

# add codecs so that they are compiled even if no machine
# drivers are selected
CONFIG_SND_SOC_RT700_SDW=m
CONFIG_SND_SOC_RT711_SDW=m
CONFIG_SND_SOC_RT1308_SDW=m
CONFIG_SND_SOC_RT715_SDW=m
CONFIG_SND_SOC_RT711_SDCA_SDW=m
CONFIG_SND_SOC_RT1316_SDW=m
CONFIG_SND_SOC_RT1318_SDW=m
CONFIG_SND_SOC_RT715_SDCA_SDW=m

# SoundWire mockup codec
CONFIG_SND_SOC_SDW_MOCKUP=m
Loading