From 11e9c46c36bc8b4cfb08a20291973b45d8a65f3f Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Tue, 4 Jan 2022 14:21:48 +0800 Subject: [PATCH] fix bcm-2711-cm4 --- build.sh | 10 ++++ patches/950-0785-fixcm4soundboss2.patch | 62 +++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 patches/950-0785-fixcm4soundboss2.patch diff --git a/build.sh b/build.sh index 81d714b5..9982ed00 100755 --- a/build.sh +++ b/build.sh @@ -386,6 +386,16 @@ if [ "$OMR_KERNEL" = "5.4" ] && ([ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" echo "Done" fi +# Add fix bcm2711-rpi-cm4 patch, only working on 64bits images for now +if [ "$OMR_KERNEL" = "5.4" ] && ([ "$OMR_TARGET" = "rpi4" ]); then + echo "Checking if bcm2711-rpi-cm4 patch is set or not" + if ! patch -Rf -N -p1 -s --dry-run < ../../patches/950-0785-fixcm4soundboss2.patch; then + echo "apply..." + patch -N -p1 -s < ../../patches/950-0785-fixcm4soundboss2.patch + fi + echo "Done" +fi + echo "Checking if smsc75xx patch is set or not" if ! patch -Rf -N -p1 -s --dry-run < ../../patches/smsc75xx.patch; then echo "apply..." diff --git a/patches/950-0785-fixcm4soundboss2.patch b/patches/950-0785-fixcm4soundboss2.patch new file mode 100644 index 00000000..81f3d8a7 --- /dev/null +++ b/patches/950-0785-fixcm4soundboss2.patch @@ -0,0 +1,62 @@ +--- a/target/linux/bcm27xx/modules/sound.mk 2022-01-04 05:35:20.202715290 +0800 ++++ b/target/linux/bcm27xx/modules/sound.mk 2022-01-04 05:35:16.419898622 +0800 +@@ -130,29 +130,6 @@ + + $(eval $(call KernelPackage,sound-soc-allo-boss-dac)) + +- +-define KernelPackage/sound-soc-allo-boss2-dac +- TITLE:=Support for Allo Boss2 DAC +- KCONFIG:= \ +- CONFIG_SND_AUDIO_GRAPH_CARD \ +- CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC +- FILES:= \ +- $(LINUX_DIR)/sound/soc/bcm/snd-soc-allo-boss2-dac.ko +- AUTOLOAD:=$(call AutoLoad,68,snd-soc-allo-boss2-dac) +- DEPENDS:= \ +- kmod-sound-soc-bcm2835-i2s \ +- +kmod-i2c-bcm2835 \ +- +kmod-regmap-i2c +- $(call AddDepends/sound) +-endef +- +-define KernelPackage/sound-soc-allo-boss2-dac/description +- This package contains support for Allo Boss2 DAC +-endef +- +-$(eval $(call KernelPackage,sound-soc-allo-boss2-dac)) +- +- + define KernelPackage/sound-soc-allo-digione + TITLE:=Support for Allo Piano DigiOne + KCONFIG:= \ +@@ -867,29 +844,6 @@ + + $(eval $(call KernelPackage,sound-soc-justboom-digi)) + +- +-define KernelPackage/sound-soc-pifi-40-amp +- TITLE:=Support for PiFi-40 amp +- KCONFIG:= \ +- CONFIG_SND_BCM2708_SOC_PIFI_40 \ +- CONFIG_SND_PIFI_40 \ +- CONFIG_SND_SOC_TAS571X +- FILES:= \ +- $(LINUX_DIR)/sound/soc/bcm/snd-soc-pifi-40.ko \ +- $(LINUX_DIR)/sound/soc/codecs/snd-soc-tas571x.ko +- AUTOLOAD:=$(call AutoLoad,68,snd-soc-tas571x) +- DEPENDS:= \ +- kmod-sound-soc-bcm2835-i2s +- $(call AddDepends/sound) +-endef +- +-define KernelPackage/sound-soc-pifi-40-amp/description +- This package contains support for PiFi-40 amp +-endef +- +-$(eval $(call KernelPackage,sound-soc-pifi-40-amp)) +- +- + define KernelPackage/sound-soc-pisound + TITLE:=Support for Blokas Labs PiSound + KCONFIG:= \