Hello,
I'd like to improve the madwifi rules and update to 0.9.3. The current state 
allows to compile for my platform (powerpc-be-elf) only.

My questions:
* How do i set the correct ATH_* varibale values for path and target 
architekture (see attached madwifi.make rule for details)?
* How can i use "make install" of the madwifi Makefile. It uses the hosts 
"strip" command instead of the targets strip.

Kind regards,
Tom

---[madwifi.in]-------------------------------------------------------------
config MADWIFI
        bool
        prompt "Multiband Atheros WiFi Driver"
        depends on WIRELESS
        help
          MadWifi is short for Multiband Atheros Driver for Wireless Fidelity. 
          In other words: this project provides a Linux kernel device driver for
          Atheros-based Wireless LAN devices. The driver works such that your
          WLAN card will appear as a normal network interface in the system. 
          Additionally there is support for the Wireless Extensions API. This 
          allows you to configure the device using common wireless tools 
          (ifconfig, iwconfig and friends).

---[madwifi.make]---------------------------------------------------------
# -*-makefile-*-
# $Id: madwifi.make 2007-03-21 10:54:00 TST $
#
# 
# Adopted to madwifi 0.9.3
#  !currently it only compiles for powerpc!
#  !a few ugly hardcoded values remain!
#

PACKAGES-$(PTXCONF_MADWIFI) += madwifi

#
# Paths and names
#
MADWIFI_VERSION         = 0.9.3
MADWIFI                 = madwifi-$(MADWIFI_VERSION)
MADWIFI_SUFFIX          = tar.gz
MADWIFI_URL             = 
$(PTXCONF_SETUP_SFMIRROR)/madwifi/$(MADWIFI).$(MADWIFI_SUFFIX)
MADWIFI_SOURCE          = $(SRCDIR)/$(MADWIFI).$(MADWIFI_SUFFIX)
MADWIFI_DIR             = $(BUILDDIR)/$(MADWIFI)

ATH_INSTALLPATH         = "/lib/modules/2.6.18-mpc5200-4/kernel/net"
ATH_TARGET_ARCH         = "powerpc-be-elf"


# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

madwifi_get: $(STATEDIR)/madwifi.get

$(STATEDIR)/madwifi.get: $(madwifi_get_deps_default)
        @$(call targetinfo, $@)
        @$(call touch, $@)

$(MADWIFI_SOURCE):
        @$(call targetinfo, $@)
        @$(call get, MADWIFI)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

madwifi_extract: $(STATEDIR)/madwifi.extract

$(STATEDIR)/madwifi.extract: $(madwifi_extract_deps_default)
        @$(call targetinfo, $@)
        @$(call clean, $(MADWIFI_DIR))
        @$(call extract, MADWIFI)
        @$(call patchin, MADWIFI)
        @$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

madwifi_prepare: $(STATEDIR)/madwifi.prepare

MADWIFI_PATH    =  PATH=$(CROSS_PATH)

MADWIFI_ENV = \
        KERNELRELEASE=$(KERNEL_VERSION) \
        KERNELPATH=$(KERNEL_DIR) \
        DESTDIR=$(ROOTDIR)

#
# autoconf
#
MADWIFI_AUTOCONF =  $(CROSS_AUTOCONF_USR)

$(STATEDIR)/madwifi.prepare: $(madwifi_prepare_deps_default)
        @$(call targetinfo, $@)
        @$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

madwifi_compile: $(STATEDIR)/madwifi.compile

$(STATEDIR)/madwifi.compile: $(madwifi_compile_deps_default)
        @$(call targetinfo, $@)
        cd $(MADWIFI_DIR) && $(MADWIFI_ENV) $(MADWIFI_PATH) \
          $(MAKE) CROSS_COMPILE=$(PTXCONF_GNU_TARGET)- TARGET=$(ATH_TARGET_ARCH)
        @$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

madwifi_install: $(STATEDIR)/madwifi.install

$(STATEDIR)/madwifi.install: $(madwifi_install_deps_default)
        @$(call targetinfo, $@)
        @$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

madwifi_targetinstall: $(STATEDIR)/madwifi.targetinstall

# requires uudecode, which is part of sharutils
$(STATEDIR)/madwifi.targetinstall: $(madwifi_targetinstall_deps_default)
        @$(call targetinfo, $@)

        @$(call install_init, madwifi)
        @$(call install_fixup, madwifi,PACKAGE,madwifi)
        @$(call install_fixup, madwifi,PRIORITY,optional)
        @$(call install_fixup, madwifi,VERSION,$(MADWIFI_VERSION))
        @$(call install_fixup, madwifi,SECTION,base)
        @$(call install_fixup, madwifi,AUTHOR,"(c) madwifi.org; PTXDist 
Integration: Tom St")
        @$(call install_fixup, madwifi,DEPENDS,)
        @$(call install_fixup, madwifi,DESCRIPTION,missing)

# install all madwifi tools
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/wlanconfig, /usr/bin/wlanconfig)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/athstats, /usr/bin/athstats)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/athchans, /usr/bin/athchans)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/athctrl, /usr/bin/athctrl)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/athdebug, /usr/bin/athdebug)
        @$(call install_copy, madwifi, 0, 0, 0755, $(MADWIFI_DIR)/tools/athkey, 
/usr/bin/athkey)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/80211debug, /usr/bin/80211debug)
        @$(call install_copy, madwifi, 0, 0, 0755, 
$(MADWIFI_DIR)/tools/80211stats, /usr/bin/80211stats)
        
# install all madwifi modules into one folder
        cd $(MADWIFI_DIR) && \
          for file in `find . | grep '.ko$$' `; do      \
            ATH_MODULENAME=`echo "$$file" | sed -e "s/.*\///g"`; \
            $(call install_copy, madwifi, 0, 0, 0644, $(MADWIFI_DIR)/$$file, 
$(ATH_INSTALLPATH)/$$ATH_MODULENAME, n); \
          done 

        @$(call install_finish, madwifi)

        @$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

madwifi_clean:
        rm -rf $(STATEDIR)/madwifi.*
        rm -rf $(IMAGEDIR)/madwifi_*
        rm -rf $(MADWIFI_DIR)

# vim: syntax=make


-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to