1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 15:54:04 +02:00

kernel package cleanup, move madwifi from target/linux/package/ to package/, update to 0.9.0

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3860 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-05-31 14:32:17 +00:00
parent 376671b487
commit 9e0015224d
13 changed files with 164 additions and 123 deletions

View File

@ -61,10 +61,16 @@ scripts/config/mconf: .config.in
scripts/config/conf: .config.in scripts/config/conf: .config.in
$(MAKE) -C scripts/config conf $(MAKE) -C scripts/config conf
menuconfig: scripts/config/mconf config: scripts/config/conf
$< Config.in $< 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.in
config-clean: config-clean:

View File

@ -1,20 +1,11 @@
# $Id$ # $Id$
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(TOPDIR)/package/kernel.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
PKG_NAME:=base-files PKG_NAME:=base-files
PKG_RELEASE:=8 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 }' ) REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
ifeq ($(REV),) ifeq ($(REV),)
@ -23,6 +14,12 @@ endif
include $(TOPDIR)/package/rules.mk 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 CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files
define Package/base-files$(TARGET) define Package/base-files$(TARGET)
@ -49,7 +46,6 @@ define Package/uclibc
DESCRIPTION:=C library for embedded systems DESCRIPTION:=C library for embedded systems
endef endef
define Build/Prepare define Build/Prepare
mkdir -p $(PKG_BUILD_DIR) mkdir -p $(PKG_BUILD_DIR)
endef endef

28
package/kernel.mk Normal file
View File

@ -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

117
package/madwifi/Makefile Normal file
View File

@ -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))

View File

@ -3,7 +3,6 @@ wlan_scan_ap
wlan_scan_sta wlan_scan_sta
ath_hal ath_hal
ath_rate_sample ath_rate_sample
ath_pci
wlan_acl wlan_acl
wlan_ccmp wlan_ccmp
wlan_tkip wlan_tkip

View File

@ -1,12 +1,12 @@
diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile 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/Makefile 2006-03-13 19:23:02.000000000 -0500
+++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.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 all: modules tools
-modules: configcheck svnversion.h -modules: configcheck svnversion.h
+modules: svnversion.h +modules: svnversion.h
mkdir -p ${SYMBOLSDIR} mkdir -p ${SYMBOLSDIR}
for i in ${DIRS_MODULES}; do \ for i in ${DIRS_MODULES}; do \
$(MAKE) -C $$i || exit 1; \ $(MAKE) -C $$i || exit 1; \

View File

@ -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