1From dc0a646a460e6da10ddbe7bf02794051d76f8751 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Thu, 4 Nov 2021 17:30:06 +0100 4Subject: [PATCH] drivers/dahdi/Kbuild: fix HOTPLUG_FIRMWARE definition 5 6HOTPLUG_FIRMWARE is used before being defined resulting in the following 7build failure since version 2.7.0 and 8https://git.asterisk.org/gitweb/?p=dahdi/linux.git;a=commit;h=e2f492595c9191ba6d556ccac1bde4c1bb892938: 9 10 MODPOST /home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/Module.symvers 11ERROR: modpost: "_binary_dahdi_fw_oct6114_032_bin_start" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcaxx.ko] undefined! 12ERROR: modpost: "_binary_dahdi_fw_oct6114_032_bin_size" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcaxx.ko] undefined! 13ERROR: modpost: "_binary_dahdi_fw_oct6114_128_bin_start" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte43x.ko] undefined! 14ERROR: modpost: "_binary_dahdi_fw_oct6114_064_bin_start" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte43x.ko] undefined! 15ERROR: modpost: "_binary_dahdi_fw_oct6114_128_bin_size" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte43x.ko] undefined! 16ERROR: modpost: "_binary_dahdi_fw_oct6114_064_bin_size" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte43x.ko] undefined! 17ERROR: modpost: "_binary_dahdi_fw_oct6114_032_bin_start" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte13xp.ko] undefined! 18ERROR: modpost: "_binary_dahdi_fw_oct6114_032_bin_size" [/home/fabrice/buildroot/output/build/dahdi-linux-5c840cf43838e0690873e73409491c392333b3b8/drivers/dahdi/wcte13xp.ko] undefined! 19 20Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 21[Upstream status: sent to "Shaun Ruffell <sruffell@sruffell.net>"] 22--- 23 drivers/dahdi/Kbuild | 18 +++++++++--------- 24 1 file changed, 9 insertions(+), 9 deletions(-) 25 26diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild 27index 855e5bf..b1a8481 100644 28--- a/drivers/dahdi/Kbuild 29+++ b/drivers/dahdi/Kbuild 30@@ -13,6 +13,15 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/ 31 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/ 32 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o 33 34+ifndef HOTPLUG_FIRMWARE 35+ifneq (,$(filter y m,$(CONFIG_FW_LOADER))) 36+HOTPLUG_FIRMWARE := yes 37+else 38+HOTPLUG_FIRMWARE := no 39+endif 40+export HOTPLUG_FIRMWARE 41+endif 42+ 43 wcte13xp-objs := wcte13xp-base.o wcxb_spi.o wcxb.o wcxb_flash.o 44 CFLAGS_wcte13xp-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api 45 ifeq ($(HOTPLUG_FIRMWARE),yes) 46@@ -61,15 +70,6 @@ endif 47 48 CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation 49 50-ifndef HOTPLUG_FIRMWARE 51-ifneq (,$(filter y m,$(CONFIG_FW_LOADER))) 52-HOTPLUG_FIRMWARE := yes 53-else 54-HOTPLUG_FIRMWARE := no 55-endif 56-export HOTPLUG_FIRMWARE 57-endif 58- 59 # fix typo present in CentOS and RHEL 2.6.9 kernels 60 BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2 61 BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp) 62-- 632.33.0 64 65