linux: skip installing modules if modules are disabled in kernel config

This patch will check if CONFIG_MODULES is set in the kernel .config, if not
yes then it will skip installing the modules.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
This commit is contained in:
Hans-Christian Egtvedt 2008-10-30 14:56:58 +00:00
parent fed8349509
commit fc23ee8dea

View File

@ -394,13 +394,19 @@ $(LINUX26_KERNEL): $(LINUX26_DIR)/$(LINUX26_BINLOC)
$(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed: $(LINUX26_DIR)/.configured $(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed: $(LINUX26_DIR)/.configured
rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED) rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)
rm -f $(TARGET_DIR)/sbin/cardmgr rm -f $(TARGET_DIR)/sbin/cardmgr
$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) modules # Make Linux depend on modules only if enabled in the .config.
$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \ @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \
DEPMOD=$(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 \ echo "*** Installing Linux kernel modules" ; \
INSTALL_MOD_PATH=$(TARGET_DIR) modules_install $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) modules; \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source DEPMOD=$(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 \
$(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 -b $(TARGET_DIR) $(LINUX26_VERSION_PROBED) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install; \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build; \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source; \
$(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 -b $(TARGET_DIR) $(LINUX26_VERSION_PROBED); \
else \
echo "*** Skipping installing modules since it is not enabled" ; \
fi
touch $@ touch $@
linux26-menuconfig: $(LINUX26_DIR)/.patched host-sed linux26-menuconfig: $(LINUX26_DIR)/.patched host-sed