summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-03-14 20:34:03 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-14 20:34:03 +0100
commitf8dac2f4b92d9058b891b53c6b744861f726b54b (patch)
tree975e1f407ac5ce451350a57b4fa8ca2c86e3eac3
parent67ee55eaa0d1807e80f1161baf9dedc76b70771a (diff)
implement kernel symbol neutral method to select audio addon boards
-rw-r--r--Config.in1
-rw-r--r--package/bcm28xx-bootloader/Makefile12
-rw-r--r--target/config/Config.in.addons35
3 files changed, 42 insertions, 6 deletions
diff --git a/Config.in b/Config.in
index bc6d180ee..d6a28892c 100644
--- a/Config.in
+++ b/Config.in
@@ -24,6 +24,7 @@ source "target/config/Config.in.systemopts"
source "target/config/Config.in.subsystem"
source "target/config/Config.in.qemuopts"
source "target/config/Config.in.cpu"
+source "target/config/Config.in.addons"
comment "After you saved your configuration once, you shouldn't change anything above"
depends on ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_CHOOSE_ARCH
diff --git a/package/bcm28xx-bootloader/Makefile b/package/bcm28xx-bootloader/Makefile
index df6a7c2f6..def515b7e 100644
--- a/package/bcm28xx-bootloader/Makefile
+++ b/package/bcm28xx-bootloader/Makefile
@@ -57,27 +57,27 @@ ifeq ($(ADK_PACKAGE_BCM28XX_BOOTLOADER_CUTDOWN),y)
endif
printf "gpu_mem=$(ADK_TARGET_GPU_MEM)\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_AMP),)
+ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_AMP),)
printf "dtoverlay=hifiberry-amp\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DAC),)
+ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_DAC),)
printf "dtoverlay=hifiberry-dac\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DIGI),)
+ifneq ($(ADK_TARGET_HARDWARE_HIFIBERRY_DIGI),)
printf "dtoverlay=hifiberry-digi\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_DAC),)
+ifneq ($(ADK_TARGET_HARDWARE_RPI_DAC),)
printf "dtoverlay=rpi-dac\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_IQAUDIO_DAC),)
+ifneq ($(ADK_TARGET_HARDWARE_IQAUDIO_DAC),)
printf "dtoverlay=iqaudio-dac\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifneq ($(ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO),)
+ifneq ($(ADK_TARGET_HARDWARE_RPI_PROTO),)
printf "dtoverlay=rpi-proto\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
diff --git a/target/config/Config.in.addons b/target/config/Config.in.addons
new file mode 100644
index 000000000..7f68968f2
--- /dev/null
+++ b/target/config/Config.in.addons
@@ -0,0 +1,35 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+choice
+prompt "Audio Board"
+depends on ADK_TARGET_OS_LINUX && ADK_TARGET_BOARD_BCM28XX
+
+config ADK_TARGET_HARDWARE_NONE
+ bool "No audio addon board"
+
+config ADK_TARGET_HARDWARE_HIFIBERRY_AMP
+ bool "Hifiberry AMP"
+ select ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_AMP
+
+config ADK_TARGET_HARDWARE_HIFIBERRY_DAC
+ bool "Hifiberry DAC"
+ select ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DAC
+
+config ADK_TARGET_HARDWARE_HIFIBERRY_DIGI
+ bool "Hifiberry DIGI"
+ select ADK_KERNEL_SND_BCM2708_SOC_HIFIBERRY_DIGI
+
+config ADK_TARGET_HARDWARE_RPI_DAC
+ bool "RPI-DAC"
+ select ADK_KERNEL_SND_BCM2708_SOC_RPI_DAC
+
+config ADK_TARGET_HARDWARE_IQAUDIO_DAC
+ bool "IQAudio-DAC"
+ select ADK_KERNEL_SND_BCM2708_SOC_IQAUDIO_DAC
+
+config ADK_TARGET_HARDWARE_RPI_PROTO
+ bool "Rpi-Proto"
+ select ADK_KERNEL_SND_BCM2708_SOC_RPI_PROTO
+
+endchoice