diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | package/base-files/Makefile | 20 | ||||
-rw-r--r-- | package/kernel.mk | 28 | ||||
-rw-r--r-- | package/madwifi/Config.in (renamed from target/linux/package/madwifi/Config.in) | 0 | ||||
-rw-r--r-- | package/madwifi/Makefile | 117 | ||||
-rw-r--r-- | package/madwifi/files/madwifi.init (renamed from target/linux/package/madwifi/files/madwifi.init) | 0 | ||||
-rw-r--r-- | package/madwifi/files/madwifi.modules (renamed from target/linux/package/madwifi/files/madwifi.modules) | 1 | ||||
-rw-r--r-- | package/madwifi/ipkg/kmod-madwifi.control (renamed from target/linux/package/madwifi/ipkg/kmod-madwifi.control) | 0 | ||||
-rw-r--r-- | package/madwifi/patches/100-kernel_cflags.patch (renamed from target/linux/package/madwifi/patches/100-kernel_cflags.patch) | 6 | ||||
-rw-r--r-- | package/madwifi/patches/101-no_werror.patch (renamed from target/linux/package/madwifi/patches/101-no_werror.patch) | 0 | ||||
-rw-r--r-- | package/madwifi/patches/102-multicall_binary.patch (renamed from target/linux/package/madwifi/patches/102-multicall_binary.patch) | 0 | ||||
-rw-r--r-- | package/madwifi/patches/104-apmode_by_default.patch (renamed from target/linux/package/madwifi/patches/104-apmode_by_default.patch) | 0 | ||||
-rw-r--r-- | target/linux/package/madwifi/Makefile | 105 |
13 files changed, 164 insertions, 123 deletions
@@ -61,10 +61,16 @@ scripts/config/mconf: .config.in scripts/config/conf: .config.in $(MAKE) -C scripts/config conf -menuconfig: scripts/config/mconf +config: scripts/config/conf $< Config.in -config: scripts/config/conf +defdconfig: scripts/config/conf + $< -d Config.in + +oldconfig: scripts/config/conf + $< -o Config.in + +menuconfig: scripts/config/mconf $< Config.in config-clean: diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 485ebddc3b..226782bb92 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,20 +1,11 @@ # $Id$ include $(TOPDIR)/rules.mk - -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk -include $(TOPDIR)/target/linux/rules.mk -TARGET:=-$(BOARD)-$(KERNEL) -BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -endif +include $(TOPDIR)/package/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 -PKG_BUILD_DIR:=$(BUILD_DIR)/base-files +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) @@ -23,6 +14,12 @@ endif include $(TOPDIR)/package/rules.mk +ifneq ($(DUMP),1) +TARGET:=-$(BOARD)-$(KERNEL) +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files define Package/base-files$(TARGET) @@ -49,7 +46,6 @@ define Package/uclibc DESCRIPTION:=C library for embedded systems endef - define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef diff --git a/package/kernel.mk b/package/kernel.mk new file mode 100644 index 0000000000..def66437c6 --- /dev/null +++ b/package/kernel.mk @@ -0,0 +1,28 @@ +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk + +KERNEL:=unknown +ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) +KERNEL:=2.4 +LINUX_KMOD_SUFFIX=o +endif +ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) +KERNEL:=2.6 +LINUX_KMOD_SUFFIX=ko +endif + +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ +) + +KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) + +KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules +MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +endif diff --git a/target/linux/package/madwifi/Config.in b/package/madwifi/Config.in index 168f1e7b8b..168f1e7b8b 100644 --- a/target/linux/package/madwifi/Config.in +++ b/package/madwifi/Config.in diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile new file mode 100644 index 0000000000..c24c821b24 --- /dev/null +++ b/package/madwifi/Makefile @@ -0,0 +1,117 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=madwifi +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 +PKG_MD5SUM:=9b558d1df84cab2b0006c595feee0fba + +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +ifeq ($(ARCH),mips) + HAL_TARGET:=mips-be-elf +endif +ifeq ($(ARCH),mipsel) + HAL_TARGET:=mips-le-elf +endif +ifeq ($(ARCH),i386) + HAL_TARGET:=i386-elf +endif +ifeq ($(ARCH),armeb) + HAL_TARGET:=xscale-be-elf +endif + +BUS := PCI +ifneq ($(CONFIG_LINUX_2_4_AR531X),) + BUS := AHB +endif +ifneq ($(CONFIG_LINUX_2_6_ARUBA),) + BUS := PCI AHB # no suitable HAL for AHB yet. +endif + +BUS_MODULES:= +ifeq ($(findstring AHB,$(BUS)),AHB) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) +endif + +MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + TARGET="$(HAL_TARGET)" \ + TOOLPREFIX="$(KERNEL_CROSS)" \ + TOOLPATH="$(KERNEL_CROSS)" \ + KERNELPATH="$(LINUX_DIR)" \ + DOMULTI=1 + +include $(TOPDIR)/package/rules.mk + +ifeq ($(findstring AHB,$(BUS)),AHB) +define Build/Compile/ahb + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all +endef +endif + +ifeq ($(findstring PCI,$(BUS)),PCI) +define Build/Compile/pci + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all +endef +endif + +define Build/Compile +$(call Build/Compile/ahb) +$(call Build/Compile/pci) +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include/madwifi + $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ + mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 + $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/madwifi +endef + +define Package/kmod-madwifi + SECTION:=drivers + CATEGORY:=Drivers + DEFAULT:=y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE, m if ALL + TITLE:=Driver for Atheros wireless chipsets + DESCRIPTION:=Driver for Atheros 802.11a/b/g chipsets + URL:=http://madwifi.org/ +endef + +define Package/kmod-madwifi/install + mkdir -p $(1)/etc/modules.d + mkdir -p $(1)/etc/init.d + mkdir -p $(1)/lib/modules/$(LINUX_VERSION) + mkdir -p $(1)/usr/sbin + install -m0644 ./files/madwifi.modules $(1)/etc/modules.d/20-madwifi +ifeq ($(findstring AHB,$(BUS)),AHB) + echo ath_ahb >> $(1)/etc/modules.d/20-madwifi +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + echo ath_pci >> $(1)/etc/modules.d/20-madwifi +endif + install -m0755 ./files/madwifi.init $(1)/etc/init.d/S20madwifi + $(CP) \ + $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ + $(BUS_MODULES) \ + $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmod-madwifi)) diff --git a/target/linux/package/madwifi/files/madwifi.init b/package/madwifi/files/madwifi.init index b1e78c0930..b1e78c0930 100644 --- a/target/linux/package/madwifi/files/madwifi.init +++ b/package/madwifi/files/madwifi.init diff --git a/target/linux/package/madwifi/files/madwifi.modules b/package/madwifi/files/madwifi.modules index eac01b66ee..515c1e9aa1 100644 --- a/target/linux/package/madwifi/files/madwifi.modules +++ b/package/madwifi/files/madwifi.modules @@ -3,7 +3,6 @@ wlan_scan_ap wlan_scan_sta ath_hal ath_rate_sample -ath_pci wlan_acl wlan_ccmp wlan_tkip diff --git a/target/linux/package/madwifi/ipkg/kmod-madwifi.control b/package/madwifi/ipkg/kmod-madwifi.control index ddab426b30..ddab426b30 100644 --- a/target/linux/package/madwifi/ipkg/kmod-madwifi.control +++ b/package/madwifi/ipkg/kmod-madwifi.control diff --git a/target/linux/package/madwifi/patches/100-kernel_cflags.patch b/package/madwifi/patches/100-kernel_cflags.patch index b67183c384..ef283dd3f2 100644 --- a/target/linux/package/madwifi/patches/100-kernel_cflags.patch +++ b/package/madwifi/patches/100-kernel_cflags.patch @@ -1,12 +1,12 @@ diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile --- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500 +++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500 -@@ -52,7 +52,7 @@ +@@ -51,7 +51,7 @@ all: modules tools --modules: configcheck svnversion.h -+modules: svnversion.h +-modules: configcheck svnversion.h ++modules: svnversion.h mkdir -p ${SYMBOLSDIR} for i in ${DIRS_MODULES}; do \ $(MAKE) -C $$i || exit 1; \ diff --git a/target/linux/package/madwifi/patches/101-no_werror.patch b/package/madwifi/patches/101-no_werror.patch index 40eddc669f..40eddc669f 100644 --- a/target/linux/package/madwifi/patches/101-no_werror.patch +++ b/package/madwifi/patches/101-no_werror.patch diff --git a/target/linux/package/madwifi/patches/102-multicall_binary.patch b/package/madwifi/patches/102-multicall_binary.patch index 8f20e467b8..8f20e467b8 100644 --- a/target/linux/package/madwifi/patches/102-multicall_binary.patch +++ b/package/madwifi/patches/102-multicall_binary.patch diff --git a/target/linux/package/madwifi/patches/104-apmode_by_default.patch b/package/madwifi/patches/104-apmode_by_default.patch index bce07b50a0..bce07b50a0 100644 --- a/target/linux/package/madwifi/patches/104-apmode_by_default.patch +++ b/package/madwifi/patches/104-apmode_by_default.patch diff --git a/target/linux/package/madwifi/Makefile b/target/linux/package/madwifi/Makefile deleted file mode 100644 index 97cb0bd5e5..0000000000 --- a/target/linux/package/madwifi/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=madwifi-ng -PKG_VERSION:=r1543-20060506 -PKG_RELEASE:=1 -PKG_MD5SUM:=3d89e5197c7e43eb37564c176140b2bf - -PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -ifeq ($(ARCH),mips) -HAL_TARGET:=mips-be-elf -endif -ifeq ($(ARCH),mipsel) -HAL_TARGET:=mips-le-elf -endif -ifeq ($(ARCH),i386) -HAL_TARGET:=i386-elf -endif -ifeq ($(ARCH),armeb) -HAL_TARGET:=xscale-be-elf -endif - -BUS := PCI - -ifneq ($(CONFIG_LINUX_2_4_AR531X),) - BUS := AHB -endif -ifneq ($(CONFIG_LINUX_2_6_ARUBA),) - BUS := PCI AHB # no suitable HAL for AHB yet. -endif - -BUS_MODULES:= -ifeq ($(findstring AHB,$(BUS)),AHB) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) -endif -ifeq ($(findstring PCI,$(BUS)),PCI) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) -endif - - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TARGET="$(HAL_TARGET)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - DOMULTI=1 - - -$(PKG_BUILD_DIR)/.built: -ifeq ($(findstring AHB,$(BUS)),AHB) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all -endif -ifeq ($(findstring PCI,$(BUS)),PCI) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all -endif - $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi - touch $@ - -$(IPKG_KMOD_MADWIFI): - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d - mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION) - mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin - install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi - install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi - $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ - $(BUS_MODULES) \ - $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/ - $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/madwifi - $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ - mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 - $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/madwifi - -compile-targets: install-dev -clean-targets: uninstall-dev |