summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-20 12:15:27 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-20 12:15:27 +0000
commit12c383b56de2b8ab6c291522fbd40b067babf4aa (patch)
tree3f13d5688f60f46a56519b0e1996dc9567491a3d /make
parent4cc06f8ea8ad95a5f6d0b21b88cdcd38e83646b2 (diff)
run depmod after building pcmcia and after hostap
Diffstat (limited to 'make')
-rw-r--r--make/hostap.mk66
-rw-r--r--make/pcmcia.mk12
2 files changed, 49 insertions, 29 deletions
diff --git a/make/hostap.mk b/make/hostap.mk
index 3525e8201..100d0ce10 100644
--- a/make/hostap.mk
+++ b/make/hostap.mk
@@ -5,7 +5,7 @@
#############################################################
HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
HOSTAP_SOURCE=hostap.tar.gz
-HOSTAP_BUILD_DIR=$(BUILD_DIR)/hostap-snapshot
+HOSTAP_DIR=$(BUILD_DIR)/hostap-snapshot
HOSTAP_TARGET_MODULE_DIR=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/hostap
$(DL_DIR)/$(HOSTAP_SOURCE):
@@ -13,48 +13,58 @@ $(DL_DIR)/$(HOSTAP_SOURCE):
hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE)
-$(HOSTAP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
+$(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
zcat $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- mv -f $(BUILD_DIR)/hostap $(HOSTAP_BUILD_DIR)
- touch $(HOSTAP_BUILD_DIR)/.unpacked
+ mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR)
+ touch $(HOSTAP_DIR)/.unpacked
-$(HOSTAP_BUILD_DIR)/.configured: $(HOSTAP_BUILD_DIR)/.unpacked
+$(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
perl -pi -e "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
- $(HOSTAP_BUILD_DIR)/driver/modules/hostap_config.h
- touch $(HOSTAP_BUILD_DIR)/.configured
-
-$(HOSTAP_BUILD_DIR)/driver/modules/hostap.o: $(HOSTAP_BUILD_DIR)/.configured
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pci KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR) plx KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR)/utils CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR)/hostapd CC=$(TARGET_CC)
- touch -c $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
-
-$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
+ $(HOSTAP_DIR)/driver/modules/hostap_config.h
+ touch $(HOSTAP_DIR)/.configured
+
+$(HOSTAP_DIR)/driver/modules/hostap.o: $(HOSTAP_DIR)/.configured
+ $(MAKE) -C $(HOSTAP_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR) pci KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR) plx KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC)
+ touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
+
+$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_DIR)/driver/modules/hostap.o
# Make the dir
-rm -rf $(HOSTAP_TARGET_MODULE_DIR)
-mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
# Copy The Module Files
- cp -af $(HOSTAP_BUILD_DIR)/driver/modules/*.o $(HOSTAP_TARGET_MODULE_DIR)/
+ cp -af $(HOSTAP_DIR)/driver/modules/*.o $(HOSTAP_TARGET_MODULE_DIR)/
# Copy the pcmcia-cs conf file
-mkdir -p $(TARGET_DIR)/etc/pcmcia
- cp -af $(HOSTAP_BUILD_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
+ cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
# Copy The Utils
- cp -af $(HOSTAP_BUILD_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
# Copy hostapd
- cp -af $(HOSTAP_BUILD_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
+ cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
touch -c $(HOSTAP_TARGET_MODULE_DIR)/hostap.o
-hostap: pcmcia $(HOSTAP_TARGET_MODULE_DIR)/hostap.o
+# use busybox depmod.pl so we need the sources unpacked
+$(HOSTAP_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules
+ [ -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) ] && \
+ $(BUSYBOX_DIR)/examples/depmod.pl \
+ -b $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/ \
+ -k $(LINUX_DIR)/vmlinux \
+ -F $(LINUX_DIR)/System.map \
+ > $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
+ touch $(HOSTAP_DIR)/.modules.dep
+
+hostap: pcmcia $(HOSTAP_TARGET_MODULE_DIR)/hostap.o $(HOSTAP_DIR)/.modules.dep
hostap-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_BUILD_DIR) uninstall
- -$(MAKE) -C $(HOSTAP_BUILD_DIR) clean
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
+ -$(MAKE) -C $(HOSTAP_DIR) clean
hostap-dirclean:
- rm -rf $(HOSTAP_BUILD_DIR)
+ rm -rf $(HOSTAP_DIR)
diff --git a/make/pcmcia.mk b/make/pcmcia.mk
index 614e04ed9..ae604db79 100644
--- a/make/pcmcia.mk
+++ b/make/pcmcia.mk
@@ -87,7 +87,17 @@ $(TARGET_DIR)/sbin/cardmgr: $(PCMCIA_DIR)/cardmgr/cardmgr
chmod a+x $(TARGET_DIR)/etc/init.d/S30pcmcia
chmod -R u+w $(TARGET_DIR)/etc/pcmcia/*
-pcmcia: uclibc $(TARGET_DIR)/sbin/cardmgr
+# use busybox depmod.pl so we need the sources unpacked
+$(PCMCIA_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules
+ [ -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) ] && \
+ $(BUSYBOX_DIR)/examples/depmod.pl \
+ -b $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/ \
+ -k $(LINUX_DIR)/vmlinux \
+ -F $(LINUX_DIR)/System.map \
+ > $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
+ touch $(PCMCIA_DIR)/.modules.dep
+
+pcmcia: uclibc $(TARGET_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep
pcmcia-clean:
rm -f $(TARGET_DIR)/sbin/cardmgr