From 6dbe1188dee52f7c7455b4184e3993d9c8b50fee Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sun, 7 Dec 2008 06:55:36 +0000 Subject: [PATCH] taget/linux: handle non-modular kernels Based on b151271 in Bernhard's tree. --- target/linux/Makefile.in | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/target/linux/Makefile.in b/target/linux/Makefile.in index ca6b352cf4..e6ec351d2e 100644 --- a/target/linux/Makefile.in +++ b/target/linux/Makefile.in @@ -198,13 +198,19 @@ $(LINUX26_KERNEL): $(INITRAMFS_TARGET) $(BB_INITRAMFS_TARGET) \ $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION)/modules.dep: $(LINUX26_DIR)/.configured rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION) rm -f $(TARGET_DIR)/sbin/cardmgr - $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) modules - $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \ + @if grep -q CONFIG_MODULES=y $(LINUX26_DIR)/.config; then \ + set -x; \ + echo "Have CONFIG_MODULES"; \ + $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) modules; \ + $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \ DEPMOD=$(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 \ - INSTALL_MOD_PATH=$(TARGET_DIR) modules_install - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION)/build - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION)/source - $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 -b $(TARGET_DIR) $(LINUX_HEADERS_VERSION) + INSTALL_MOD_PATH=$(TARGET_DIR) modules_install; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION)/build \ + $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION)/source; \ + $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-depmod26 -b $(TARGET_DIR) $(LINUX_HEADERS_VERSION); \ + else \ + echo "No CONFIG_MODULES"; \ + fi touch -c $@ linux26-menuconfig: $(LINUX26_DIR)/.patched host-sed -- 2.30.2