From c28428bde85d44dc51a0216d31b5055efc1dd845 Mon Sep 17 00:00:00 2001 From: David Planella Date: Sun, 27 Jul 2008 15:36:56 +0200 Subject: [PATCH] Created an INSTALL file, Makefile modifications An INSTALL file has bee added to the driver, with detailed instructions about building and installing it. The Makefile has been modified in order to make it also usable for an in-tree build. A short notice indicating that some of the information in the README file has been added to it. Sonn the complete README file will be updated. --- INSTALL | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 125 +++++++++++++++++++++++++----------------------------- README | 7 +++ 3 files changed, 210 insertions(+), 67 deletions(-) create mode 100644 INSTALL rewrite Makefile (64%) diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..e0380b3 --- /dev/null +++ b/INSTALL @@ -0,0 +1,145 @@ +1. Introduction + +This document describes the steps required to build and install the acx driver +in a Linux system. + +Two alternative methods are described, referred to as in-tree and out-of-tree, +of which only one of them must be chosen. The recommended way, because of its +simplicity, is the out-of-tree installation, although it requires an installed +set of kernel include headers in the system. + +The following sections describe each one of these two methods. Notice again +that you should only pick one of them. + +1. Inside the kernel tree + +1.1 Copy the driver sources into the kernel tree + + cd + cd drivers/net/wireless/ + mkdir acx + cd acx + cp /* . + +1.2. Kernel build system preparation + +Modify the file drivers/net/wireless/Makefile by adding the following line to +it: + + obj-$(CONFIG_ACX_MAC80211) += acx/ + +Modify the file drivers/net/wireless/Kconfig by adding the following line to +it: + + source "drivers/net/wireless/acx/Kconfig" + +Start the kernel configuration menu as usual: + + make menuconfig + +(or any similar method, e.g. with graphical interface) + +Now you can simply configure the kernel in the usual way, making sure that the +CONFIG_ACX_MAC80211 option and at least one of the CONFIG_ACX_MAC80211_PCI or +CONFIG_ACX_MAC80211_USB options are set in the .config file, as described +below. + +Note: you will have to first select the mac80211 stack in the kernel +configuration menu: + +Networking ---> + Wireless ---> + {M} Improved wireless configuration API + [*] nl80211 new netlink interface support + -*- Wireless extensions + Generic IEEE 802.11 Networking Stack (mac80211) + Rate control algorithm selection ---> + [ ] Enable mac80211 mesh networking (pre-802.11s) support (NEW) + [ ] Enable packet alignment debugging + [ ] Enable debugging output + < > Generic IEEE 802.11 Networking Stack (DEPRECATED) + +ACX kernel configuration (select either PCI/USB support or both) + +Device Drivers ---> + [*] Network device support ---> + Wireless LAN ---> + [*] Wireless LAN (IEEE 802.11) + TI acx100/acx111 802.11b/g wireless chipsets + [*] TI acx100/acx111 802.11b/g PCI + [ ] TI acx100/acx111 802.11b/g USB (NEW) + +1.3. Build + +Issue a standard 'make' or 'make modules' command on the command line in order +to start the compilation of the kernel. Depending on the kernel configuration +you have chosen, this might take some time. + +Refer to the kernel documentation for further information. + +1.4. Installation + +TODO -> description of the standard kernel module installation and the 'make +modules_install' target. Refer to the kernel documentation for now. + +2. Outside the kernel tree + +2.1. Quick-start build + +Assuming you have a set of installed kernel headers for the kernel against you +are trying to build -and run- the driver, and you are building the PCI driver, +you can simply issue the usual make command: + + make + +You can now skip to the 'Installation' section below. + +2.2. Advanced build + +In case you need to specify configuration options other than the default PCI +build (e.g. you need to build the USB driver, or you want to build against a +special kernel version), you will first need to have a look at the Makefile in +order to understand it. + +You will see that there is an EXTRA_KCONFIG variable, which you can modify +directly on the file or define it on the command-line to suit your needs: + + export EXTRA_KCONFIG="CONFIG_ACX_MAC80211=m CONFIG_ACX_MAC80211_USB=y" && make + +If you use this method (CLI), do not forget to either unset ('unset +EXTRA_KCONFIG') or explicitly define EXTRA_KCONFIG for subsequent builds! + +You can also define the KERNELDIR variable in order to specify a different +kernel directory other than that of the the currently running one. + +Note that you can also execute make with 'make V=1' in order to get verbose +information during the build. + +2.3. Installation + +TODO -> check the modules_install target (i.e. 'make modules_install' as root) + +If you have got any comments, questions or want to propose some improvement to +these instructions, please either send an e-mail to the acx driver user's +mailing list at or post a message to the +project's forum at http://sourceforge.net/forum/forum.php?forum_id=257272. + +----- + +Copyright (C) 2008 The ACX100 Open Source Project + + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +Original author: + David Planella diff --git a/Makefile b/Makefile dissimilarity index 64% index 2ec2483..325128d 100644 --- a/Makefile +++ b/Makefile @@ -1,67 +1,58 @@ -# This makefile, adapted from http://lwn.net/Kernel/LDD3/, CH02 allows -# compiling driver either inside or outside the kernel tree without further -# modifications. -# -# * Inside the kernel tree: simply configure and compile the kernel in the usual -# way, making sure that the CONFIG_ACX_MAC80211 option and at least one of the -# CONFIG_ACX_MAC80211_PCI or CONFIG_ACX_MAC80211_USB options are set in the -# .config file. -# -# * Outside the kernel tree: modify EXTRA_KCONFIG to define any required -# configuration options. Then execute 'make' to build the module ('make V=1' for -# verbose output). Execute 'make modules_install' as root in order to install -# the module. - -################################################################################ - -# Here you can manually define configuration options when doing a build outside -# the kernel tree. Note that you can either modify this file or define the -# EXTRA_KCONFIG variable on the command line, i.e.: -# -# export EXTRA_KCONFIG="CONFIG_ACX_MAC80211=m CONFIG_ACX_MAC80211_USB=y" && make -# -# If you use this method (CLI), do not forget to either clear or explicitly -# define EXTRA_KCONFIG for subsequent builds! - -EXTRA_KCONFIG?= \ - CONFIG_ACX_MAC80211=m \ - CONFIG_ACX_MAC80211_PCI=y - -EXTRA_CFLAGS:= \ - $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \ - $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) - -################################################################################ - -ifneq ($(KERNELRELEASE),) -# If KERNELRELEASE is defined, we've been invoked from the kernel build system -# and can use its language (this variable can only be set only from the top -# level Makefile of the source tree). We simply have to declare the modules -# and leave the rest to the kernel build system. - obj-$(CONFIG_ACX_MAC80211) += acx-mac80211.o - acx-mac80211-obj-$(CONFIG_ACX_MAC80211_PCI) += pci.o - acx-mac80211-obj-$(CONFIG_ACX_MAC80211_USB) += usb.o - acx-mac80211-objs := common.o $(acx-mac80211-obj-y) -else -# Otherwise we were called directly from the command line: the the kernel build -# system must be explicitly invoked. - KERNELDIR ?= /lib/modules/$(shell uname -r)/build - PWD := $(shell pwd) -all: - $(MAKE) -C $(KERNELDIR) M=$(PWD) $(EXTRA_KCONFIG) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules - -install: - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install - -clean: - $(MAKE) -C $(KERNELDIR) M=$(PWD) clean - -distclean: - $(MAKE) -C $(KERNELDIR) M=$(PWD) distclean - -help: - $(MAKE) -C $(KERNELDIR) M=$(PWD) help - -.PHONY: modules modules_install distclean - -endif +# -*-Makefile-*- +# Copyright (C) 2008 +# The ACX100 Open Source Project +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# This makefile, allows compiling driver either inside or outside the kernel +# tree without further modifications. +# +# Please read the INSTALL file for further information. + +ifneq ($(KERNELRELEASE),) +# If KERNELRELEASE is defined, we've been invoked from the kernel build system +# and can use its language (this variable can only be set only from the top +# level Makefile of the source tree). We simply have to declare the modules and +# leave the rest to the kernel build system. + obj-$(CONFIG_ACX_MAC80211) += acx-mac80211.o + acx-mac80211-obj-$(CONFIG_ACX_MAC80211_PCI) += pci.o + acx-mac80211-obj-$(CONFIG_ACX_MAC80211_USB) += usb.o + acx-mac80211-objs := common.o $(acx-mac80211-obj-y) +else +# Otherwise we were called directly from the command line: the the kernel build +# system must be explicitly invoked. + EXTRA_KCONFIG?= \ + CONFIG_ACX_MAC80211=m \ + CONFIG_ACX_MAC80211_PCI=y + + EXTRA_CFLAGS:= \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) + KERNELDIR ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) +all: + $(MAKE) -C $(KERNELDIR) M=$(PWD) $(EXTRA_KCONFIG) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules + +install: + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install + +clean: + $(MAKE) -C $(KERNELDIR) M=$(PWD) clean + +help: + $(MAKE) -C $(KERNELDIR) M=$(PWD) help + +.PHONY: modules modules_install clean help + +endif diff --git a/README b/README index 92c4855..1a6fd34 100644 --- a/README +++ b/README @@ -31,6 +31,13 @@ ** ------------------------------------------------------------------ */ +============================================================================= +NOTE (2008-07-27): some of the information on this README file is out of date. +Please stay tuned for updates. In the meantime, you can refer to the INSTALL +file for installation instructions and the wiki for general information: +http://acx100.sourceforge.net/wiki/Main_Page +============================================================================= + This tarball is targeted at 2.6 inclusion only. Not designed to work or even compile with 2.4. dscape wifi stack is mandatory -- 2.11.4.GIT