From: Adrian Schmutzler Date: Fri, 24 Jan 2020 22:40:22 +0000 (+0100) Subject: kernel: use older kernel for explicitly setting dependencies X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9e0aab44b656be530b7b92ac03588ffc4d4cd1fa;p=openwrt%2Fstaging%2Fblocktrron.git kernel: use older kernel for explicitly setting dependencies It is generally more desirable to use older kernel versions for dependencies, as this will require less changes when newer kernels are added (they will by default select the newer packages). Since we currently only have two kernels (4.14 and 4.19) in master, this patch applies this logic by converting all LINUX_4_19 symbols to their inverted LINUX_4_14 equivalents. Signed-off-by: Adrian Schmutzler --- diff --git a/package/kernel/i2c-gpio-custom/Makefile b/package/kernel/i2c-gpio-custom/Makefile index 4891423d5c..11095abbb8 100644 --- a/package/kernel/i2c-gpio-custom/Makefile +++ b/package/kernel/i2c-gpio-custom/Makefile @@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/i2c-gpio-custom SUBMENU:=I2C support TITLE:=Custom GPIO-based I2C device - DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio @!LINUX_4_19 + DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio @LINUX_4_14 FILES:=$(PKG_BUILD_DIR)/i2c-gpio-custom.ko KCONFIG:= endef diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index ce6705a59a..cd46697168 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -131,7 +131,7 @@ $(eval $(call KernelPackage,iio-dht11)) define KernelPackage/iio-bme680 SUBMENU:=$(IIO_MENU) TITLE:=BME680 gas/humidity/pressure/temperature sensor - DEPENDS:=@LINUX_4_19 +kmod-iio-core +kmod-regmap-core + DEPENDS:=@!LINUX_4_14 +kmod-iio-core +kmod-regmap-core KCONFIG:=CONFIG_BME680 FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko endef diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 5bfd1617a3..2854ce31fa 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -541,7 +541,7 @@ $(eval $(call KernelPackage,8139cp)) define KernelPackage/r8169 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +LINUX_4_19:kmod-phy-realtek + DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +!LINUX_4_14:kmod-phy-realtek KCONFIG:=CONFIG_R8169 \ CONFIG_R8169_NAPI=y \ CONFIG_R8169_VLAN=n diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 3ecbf868c2..7eda8e6270 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -540,7 +540,7 @@ define KernelPackage/nf-nathelper-extra KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA) FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m))) - DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch +kmod-ipt-raw +LINUX_4_19:kmod-asn1-decoder + DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch +kmod-ipt-raw +!LINUX_4_14:kmod-asn1-decoder endef define KernelPackage/nf-nathelper-extra/description diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 3656441650..ada35acddc 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -1143,7 +1143,7 @@ $(eval $(call KernelPackage,rxrpc)) define KernelPackage/mpls SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=MPLS support - DEPENDS:=+LINUX_4_19:kmod-iptunnel + DEPENDS:=+!LINUX_4_14:kmod-iptunnel KCONFIG:= \ CONFIG_MPLS=y \ CONFIG_LWTUNNEL=y \ diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index b65d0155db..d3e062743d 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -169,7 +169,7 @@ define KernelPackage/eeprom-at24 SUBMENU:=$(OTHER_MENU) TITLE:=EEPROM AT24 support KCONFIG:=CONFIG_EEPROM_AT24 - DEPENDS:=+kmod-i2c-core +kmod-nvmem +LINUX_4_19:kmod-regmap-i2c + DEPENDS:=+kmod-i2c-core +kmod-nvmem +!LINUX_4_14:kmod-regmap-i2c FILES:=$(LINUX_DIR)/drivers/misc/eeprom/at24.ko AUTOLOAD:=$(call AutoProbe,at24) endef @@ -938,7 +938,7 @@ $(eval $(call KernelPackage,ptp)) define KernelPackage/ptp-gianfar SUBMENU:=$(OTHER_MENU) TITLE:=Freescale Gianfar PTP support - DEPENDS:=@TARGET_mpc85xx +kmod-ptp @!LINUX_4_19 + DEPENDS:=@TARGET_mpc85xx +kmod-ptp @LINUX_4_14 KCONFIG:=CONFIG_PTP_1588_CLOCK_GIANFAR FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_ptp.ko AUTOLOAD:=$(call AutoProbe,gianfar_ptp) @@ -954,7 +954,7 @@ $(eval $(call KernelPackage,ptp-gianfar)) define KernelPackage/ptp-qoriq SUBMENU:=$(OTHER_MENU) TITLE:=Freescale QorIQ PTP support - DEPENDS:=@TARGET_mpc85xx +kmod-ptp @LINUX_4_19 + DEPENDS:=@TARGET_mpc85xx +kmod-ptp @!LINUX_4_14 KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ FILES:=$(LINUX_DIR)/drivers/ptp/ptp_qoriq.o AUTOLOAD:=$(call AutoProbe,ptp_qoriq) @@ -987,7 +987,7 @@ define KernelPackage/random-tpm TITLE:=Hardware Random Number Generator TPM support KCONFIG:=CONFIG_HW_RANDOM_TPM FILES:=$(LINUX_DIR)/drivers/char/hw_random/tpm-rng.ko - DEPENDS:= +kmod-random-core +kmod-tpm @!LINUX_4_19 + DEPENDS:= +kmod-random-core +kmod-tpm @LINUX_4_14 AUTOLOAD:=$(call AutoProbe,tpm-rng) endef diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 30be6221b7..6ea112634c 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -496,7 +496,7 @@ $(eval $(call KernelPackage,usb-dwc3-of-simple)) define KernelPackage/usb-dwc3-qcom TITLE:=DWC3 Qualcomm USB driver - DEPENDS:=@LINUX_4_19 @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3 + DEPENDS:=@!LINUX_4_14 @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3 KCONFIG:= CONFIG_USB_DWC3_QCOM FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index f726d0ef03..d385a427c6 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -511,7 +511,7 @@ $(eval $(call KernelPackage,video-uvc)) define KernelPackage/video-gspca-core MENU:=1 TITLE:=GSPCA webcam core support framework - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core +LINUX_4_19:kmod-video-videobuf2 + DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core +!LINUX_4_14:kmod-video-videobuf2 KCONFIG:=CONFIG_USB_GSPCA FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_main.ko AUTOLOAD:=$(call AutoProbe,gspca_main) diff --git a/package/kernel/spi-gpio-custom/Makefile b/package/kernel/spi-gpio-custom/Makefile index b0da3db188..34a478fb5d 100644 --- a/package/kernel/spi-gpio-custom/Makefile +++ b/package/kernel/spi-gpio-custom/Makefile @@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/spi-gpio-custom SUBMENU:=SPI Support TITLE:=Custom GPIO-based SPI device - DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev @!LINUX_4_19 + DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev @LINUX_4_14 FILES:=$(PKG_BUILD_DIR)/spi-gpio-custom.ko KCONFIG:= endef diff --git a/package/kernel/w1-gpio-custom/Makefile b/package/kernel/w1-gpio-custom/Makefile index 021791ff94..5445097a81 100644 --- a/package/kernel/w1-gpio-custom/Makefile +++ b/package/kernel/w1-gpio-custom/Makefile @@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/w1-gpio-custom SUBMENU:=W1 support TITLE:=Custom GPIO-based 1-wire device - DEPENDS:=kmod-w1 +kmod-w1-master-gpio @!LINUX_4_19 + DEPENDS:=kmod-w1 +kmod-w1-master-gpio @LINUX_4_14 FILES:=$(PKG_BUILD_DIR)/w1-gpio-custom.ko KCONFIG:= endef