Browse Source

Fixup the build of the hostap utils, use the kernel hostap
stuff for the driver modules.

Eric Andersen 22 years ago
parent
commit
bae87f8eec
2 changed files with 10 additions and 27 deletions
  1. 8 25
      make/hostap.mk
  2. 2 2
      sources/linux.config

+ 8 - 25
make/hostap.mk

@@ -6,7 +6,6 @@
 HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
 HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
 HOSTAP_SOURCE=hostap.tar.gz
 HOSTAP_SOURCE=hostap.tar.gz
 HOSTAP_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):
 $(DL_DIR)/$(HOSTAP_SOURCE):
 	$(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE)
 	$(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE)
@@ -19,26 +18,21 @@ $(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
 	touch $(HOSTAP_DIR)/.unpacked
 	touch $(HOSTAP_DIR)/.unpacked
 
 
 $(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
 $(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
-	$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
-		$(HOSTAP_DIR)/driver/modules/hostap_config.h
+	#$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
+	#	$(HOSTAP_DIR)/driver/modules/hostap_config.h
 	touch  $(HOSTAP_DIR)/.configured
 	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) CFLAGS="$(TARGET_CFLAGS)"
-	$(MAKE) -C $(HOSTAP_DIR) pci KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)"
-	$(MAKE) -C $(HOSTAP_DIR) plx KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)"
-	$(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)"
-	$(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)"
+$(HOSTAP_DIR)/utils/hostap_crypt_conf: $(HOSTAP_DIR)/.configured
+	$(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules"
+	$(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules -I../utils"
 	touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
 	touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
 
 
-$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_DIR)/driver/modules/hostap.o
+$(TARGET_DIR)//usr/bin/hostap_crypt_conf: $(HOSTAP_DIR)/utils/hostap_crypt_conf
 	# Make the dir
 	# Make the dir
 	-rm -rf $(HOSTAP_TARGET_MODULE_DIR)
 	-rm -rf $(HOSTAP_TARGET_MODULE_DIR)
 	-mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
 	-mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
-	# Copy The Module Files
-	cp -af $(HOSTAP_DIR)/driver/modules/*.o $(HOSTAP_TARGET_MODULE_DIR)/
 	# Copy the pcmcia-cs conf file
 	# Copy the pcmcia-cs conf file
-	-mkdir -p $(TARGET_DIR)/etc/pcmcia	
+	-mkdir -p $(TARGET_DIR)/etc/pcmcia
 	cp -af $(HOSTAP_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
 	# Copy The Utils
 	cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
 	cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
@@ -47,19 +41,8 @@ $(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_DIR)/driver/modules/hostap.o
 	cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
 	cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
 	# Copy hostapd
 	# Copy hostapd
 	cp -af $(HOSTAP_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
 
 
-# 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: pcmcia $(TARGET_DIR)//usr/bin/hostap_crypt_conf
 
 
 hostap-clean:
 hostap-clean:
 	$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
 	$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall

+ 2 - 2
sources/linux.config

@@ -534,7 +534,7 @@ CONFIG_NET_RADIO=y
 # CONFIG_AIRONET4500_PROC is not set
 # CONFIG_AIRONET4500_PROC is not set
 # CONFIG_AIRO is not set
 # CONFIG_AIRO is not set
 CONFIG_HERMES=m
 CONFIG_HERMES=m
-# CONFIG_HOSTAP is not set
+CONFIG_HOSTAP=m
 # CONFIG_PLX_HERMES is not set
 # CONFIG_PLX_HERMES is not set
 # CONFIG_TMD_HERMES is not set
 # CONFIG_TMD_HERMES is not set
 # CONFIG_PCI_HERMES is not set
 # CONFIG_PCI_HERMES is not set
@@ -545,7 +545,7 @@ CONFIG_HERMES=m
 # Wireless Pcmcia cards support
 # Wireless Pcmcia cards support
 #
 #
 CONFIG_PCMCIA_HERMES=m
 CONFIG_PCMCIA_HERMES=m
-# CONFIG_HOSTAP_CS is not set
+CONFIG_HOSTAP_CS=m
 # CONFIG_AIRO_CS is not set
 # CONFIG_AIRO_CS is not set
 CONFIG_NET_WIRELESS=y
 CONFIG_NET_WIRELESS=y