diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-01-19 07:49:24 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-01-19 07:49:24 +0000 |
commit | 9741a49e5937f938627386e5c1e4f0f18ee32d4c (patch) | |
tree | 1306763ae2cfa6c82d13dc20d02326cc7887e906 /make | |
parent | a9bfe856cf5b524f157cda222c8b2d07f1463be9 (diff) | |
download | buildroot-novena-9741a49e5937f938627386e5c1e4f0f18ee32d4c.tar.gz buildroot-novena-9741a49e5937f938627386e5c1e4f0f18ee32d4c.zip |
several updates for wireless and firewall stuff,
thanks to Michael Shuler
Diffstat (limited to 'make')
-rw-r--r-- | make/hostap.mk | 52 | ||||
-rw-r--r-- | make/iptables.mk | 40 | ||||
-rw-r--r-- | make/linux.mk | 17 | ||||
-rw-r--r-- | make/wtools.mk | 41 |
4 files changed, 144 insertions, 6 deletions
diff --git a/make/hostap.mk b/make/hostap.mk new file mode 100644 index 000000000..bf2606c11 --- /dev/null +++ b/make/hostap.mk @@ -0,0 +1,52 @@ +############################################################# +# +# hostap +# +############################################################# +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_TARGET_MODULE_DIR=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/hostapd + +$(DL_DIR)/$(HOSTAP_SOURCE): + $(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE) + +hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE) + +$(HOSTAP_BUILD_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 + +$(HOSTAP_BUILD_DIR)/.configured: $(HOSTAP_BUILD_DIR)/.unpacked + touch $(HOSTAP_BUILD_DIR)/.configured + +$(HOSTAP_BUILD_DIR)/driver/modules/hostap.o: $(HOSTAP_BUILD_DIR)/.configured + $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(BUILD_DIR)/linux CC=$(TARGET_CC) + $(MAKE) -C $(HOSTAP_BUILD_DIR)/utils CC=$(TARGET_CC) + $(MAKE) -C $(HOSTAP_BUILD_DIR)/hostapd CC=$(TARGET_CC) + +$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_BUILD_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_BUILD_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/ + # Copy hostapd + cp -af $(HOSTAP_BUILD_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/ + +hostap: $(HOSTAP_TARGET_MODULE_DIR)/hostap.o + +hostap-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_BUILD_DIR) uninstall + -$(MAKE) -C $(HOSTAP_BUILD_DIR) clean + +hostap-dirclean: + rm -rf $(HOSTAP_BUILD_DIR) + diff --git a/make/iptables.mk b/make/iptables.mk new file mode 100644 index 000000000..d7f15ae8d --- /dev/null +++ b/make/iptables.mk @@ -0,0 +1,40 @@ +############################################################# +# +# iptables +# +############################################################# +IPTABLES_SOURCE_URL=ftp://ftp.netfilter.org/pub/iptables +IPTABLES_SOURCE=iptables-1.2.7a.tar.bz2 +IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.7a + +$(DL_DIR)/$(IPTABLES_SOURCE): + $(WGET) -P $(DL_DIR) $(IPTABLES_SOURCE_URL)/$(IPTABLES_SOURCE) + +$(IPTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPTABLES_SOURCE) + bzcat $(DL_DIR)/$(IPTABLES_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(IPTABLES_BUILD_DIR)/.unpacked + +$(IPTABLES_BUILD_DIR)/.configured: $(IPTABLES_BUILD_DIR)/.unpacked + perl -pi -e "s@shell.*YES.*@shell grep -q '__UCLIBC_HAS_IPV6__.*1' \ + $(BUILD_DIR)/uClibc/include/bits/uClibc_config.h && \ + echo YES\), YES\)@;" $(IPTABLES_BUILD_DIR)/Makefile + touch $(IPTABLES_BUILD_DIR)/.configured + +$(IPTABLES_BUILD_DIR)/iptables: $(IPTABLES_BUILD_DIR)/.configured + $(MAKE) -C $(IPTABLES_BUILD_DIR) KERNEL_DIR=$(BUILD_DIR)/linux CC=$(TARGET_CC) + +$(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables + # Copy iptables + cp -af $(IPTABLES_BUILD_DIR)/iptables $(TARGET_DIR)/sbin/ + cp -af $(IPTABLES_BUILD_DIR)/iptables-save $(TARGET_DIR)/sbin/ + cp -af $(IPTABLES_BUILD_DIR)/iptables-restore $(TARGET_DIR)/sbin/ + +iptables: $(TARGET_DIR)/sbin/iptables + +iptables-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPTABLES_BUILD_DIR) uninstall + -$(MAKE) -C $(IPTABLES_BUILD_DIR) clean + +iptables-dirclean: + rm -rf $(IPTABLES_BUILD_DIR) + diff --git a/make/linux.mk b/make/linux.mk index f2b2b3304..271159e57 100644 --- a/make/linux.mk +++ b/make/linux.mk @@ -21,14 +21,19 @@ ############################################################# ifneq ($(filter $(TARGETS),linux),) +# Version of Linux to download and then apply patches to +DOWNLOAD_LINUX_VERSION=2.4.20 +# Version of Linux AFTER patches LINUX_VERSION=2.4.20 -LINUX_DIR=$(BUILD_DIR)/linux-$(LINUX_VERSION) + LINUX_FORMAT=bzImage LINUX_BINLOC=arch/$(ARCH)/boot/$(LINUX_FORMAT) #LINUX_FORMAT=zImage #LINUX_BINLOC=arch/ppc/boot/images/zImage.prep -LINUX_SOURCE=linux-$(LINUX_VERSION).tar.bz2 -LINUX_SITE=http://ftp.kernel.org/pub/linux/kernel/v2.4 + +LINUX_DIR=$(BUILD_DIR)/linux-$(LINUX_VERSION) +LINUX_SOURCE=linux-$(DOWNLOAD_LINUX_VERSION).tar.bz2 +LINUX_SITE=ftp://ftp.kernel.org/pub/linux/kernel/v2.4 LINUX_KCONFIG=$(SOURCE_DIR)/linux.config LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel @@ -38,6 +43,8 @@ $(DL_DIR)/$(LINUX_SOURCE): $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) rm -rf $(LINUX_DIR) bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # Rename the dir from the downloaded version to the AFTER patch version + mv -f $(BUILD_DIR)/linux-$(DOWNLOAD_LINUX_VERSION) $(BUILD_DIR)/linux-$(LINUX_VERSION) mkdir -p $(SOURCE_DIR)/kernel-patches $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR)/kernel-patches -(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux) @@ -53,9 +60,7 @@ $(LINUX_KCONFIG): fi; $(LINUX_DIR)/.configured $(BUILD_DIR)/linux/.configured: $(LINUX_DIR)/.unpacked $(LINUX_KCONFIG) - #perl -i -p -e "s,^CROSS_COMPILE.*,\ - # CROSS_COMPILE=$(STAGING_DIR)/bin/$(ARCH)-uclibc-,g;" \ - # $(LINUX_DIR)/Makefile + perl -i -p -e "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config $(MAKE) -C $(LINUX_DIR) oldconfig include/linux/version.h touch $(LINUX_DIR)/.configured diff --git a/make/wtools.mk b/make/wtools.mk new file mode 100644 index 000000000..3c1ca0bc3 --- /dev/null +++ b/make/wtools.mk @@ -0,0 +1,41 @@ +############################################################# +# +# wtools - Wireless Tools +# +############################################################# +# +WTOOLS_SOURCE_URL=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux +WTOOLS_SOURCE=wireless_tools.26.pre7.tar.gz +WTOOLS_BUILD_DIR=$(BUILD_DIR)/wireless_tools.26 + +$(DL_DIR)/$(WTOOLS_SOURCE): + $(WGET) -P $(DL_DIR) $(WTOOLS_SOURCE_URL)/$(WTOOLS_SOURCE) + +$(WTOOLS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(WTOOLS_SOURCE) + zcat $(DL_DIR)/$(WTOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(WTOOLS_BUILD_DIR)/.unpacked + +$(WTOOLS_BUILD_DIR)/.configured: $(WTOOLS_BUILD_DIR)/.unpacked + touch $(WTOOLS_BUILD_DIR)/.configured + +$(WTOOLS_BUILD_DIR)/iwconfig: $(WTOOLS_BUILD_DIR)/.configured + $(MAKE) -C $(WTOOLS_BUILD_DIR) KERNEL_SRC=$(BUILD_DIR)/linux CC=$(TARGET_CC) + +$(TARGET_DIR)/sbin/iwconfig: $(WTOOLS_BUILD_DIR)/iwconfig + # Copy The Wireless Tools + cp -af $(WTOOLS_BUILD_DIR)/iwconfig $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwevent $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwgetid $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwlist $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwpriv $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwspy $(TARGET_DIR)/sbin/ + +wtools: $(TARGET_DIR)/sbin/iwconfig + +wtools-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(WTOOLS_BUILD_DIR) uninstall + -$(MAKE) -C $(WTOOLS_BUILD_DIR) clean + +wtools-dirclean: + rm -rf $(WTOOLS_BUILD_DIR) + |