kernel: fix build error for external kernel.
fixed build error when external kernel is selected from menuconfig. The patches present in target/linux/generic does not gets applied to external kernel and build fails while compiling mac82011 & regmap-core kernel modules. as a fix added check in Makefile for CONFIG_EXTERNAL_KERNEL_TREE present or not. Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
This commit is contained in:
		 Sandeep Sheriker Mallikarjun
					Sandeep Sheriker Mallikarjun
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							ff6e62b288
						
					
				
				
					commit
					441c26da6a
				
			| @@ -707,11 +707,15 @@ define KernelPackage/regmap | |||||||
| 	   CONFIG_REGMAP_I2C \ | 	   CONFIG_REGMAP_I2C \ | ||||||
| 	   CONFIG_SPI=y | 	   CONFIG_SPI=y | ||||||
|   FILES:= \ |   FILES:= \ | ||||||
| 	$(LINUX_DIR)/drivers/base/regmap/regmap-core.ko \ |  | ||||||
| 	$(LINUX_DIR)/drivers/base/regmap/regmap-i2c.ko \ | 	$(LINUX_DIR)/drivers/base/regmap/regmap-i2c.ko \ | ||||||
| 	$(LINUX_DIR)/drivers/base/regmap/regmap-mmio.ko \ | 	$(LINUX_DIR)/drivers/base/regmap/regmap-mmio.ko \ | ||||||
| 	$(if $(CONFIG_SPI),$(LINUX_DIR)/drivers/base/regmap/regmap-spi.ko) | 	$(if $(CONFIG_SPI),$(LINUX_DIR)/drivers/base/regmap/regmap-spi.ko) | ||||||
|   AUTOLOAD:=$(call AutoLoad,21,regmap-core regmap-i2c regmap-mmio regmap-spi) |   AUTOLOAD:=$(call AutoLoad,21,regmap-core regmap-i2c regmap-mmio regmap-spi) | ||||||
|  |   ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") | ||||||
|  |    ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") | ||||||
|  |     FILES += $(LINUX_DIR)/drivers/base/regmap/regmap-core.ko | ||||||
|  |    endif | ||||||
|  |   endif | ||||||
| endef | endef | ||||||
|  |  | ||||||
| define KernelPackage/regmap/description | define KernelPackage/regmap/description | ||||||
|   | |||||||
| @@ -1797,11 +1797,16 @@ ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),) | |||||||
|  endef |  endef | ||||||
| endif | endif | ||||||
|  |  | ||||||
|  | #do not Build/Configure for EXTERNAL KERNEL | ||||||
|  | ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") | ||||||
|  |   ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") | ||||||
|     define Build/Configure |     define Build/Configure | ||||||
| 	  cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h | 	  cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h | ||||||
| 	  cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h | 	  cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h | ||||||
| 	  cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h | 	  cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h | ||||||
|     endef |     endef | ||||||
|  |   endif | ||||||
|  | endif | ||||||
|  |  | ||||||
| define Build/Compile | define Build/Compile | ||||||
| 	$(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config | 	$(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user