You are not logged in.

#1 2009-02-24 17:19:23

jacko
Member
Registered: 2007-11-23
Posts: 840

compat-wireless

Ok, I was gonna try and update this seemingly simple AUR package and adopt it. I wanted to make it a daily snapshot for kernels >= 2.6.27. But it seems I am in over my head. First problem is I can't for the life of me figure out how this diff -u *.patch file I made won't work? Secondly even if I use makepkg -e with the modified Makefile I still get an error about permissions. So here is my updated PKGBUILD, and patch I created.

(the old PKGBUILD is still on the AUR)
Upated PKGBUILD The one I wish to use.

# $Id: PKGBUILD 378 2008-04-19 14:48:22Z thomas $
# Contributor: buddabrod <buddabrod@gmail.com>

pkgname=compat-wireless
_kernver=2.6.28-ARCH
pkgver=2.6
_realver=`date +%F`
pkgrel=1
pkgdesc=" Daily snapshots of the wireless-testing tree for use with kernel versions >= 2.6.27"
url="http://wireless.kernel.org"
depends=('kernel26>=2.6.27')
arch=('i686' 'x86_64')
license=('GPL')
install=$pkgname.install
source=(http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-${_realver}.tar.bz2
            makefile.patch)
md5sums=()
build() {
  cd ${startdir}/src/${pkgname}-${_realver}
  patch -Np1 -i ../makefile.patch || return 1
  echo -ne "CONFIG_IWL3945_LEDS=y\nCONFIG_IWLWIFI_LEDS=y\nCONFIG_MAC80211_LEDS=y\n" >> config.mk
  make KLIB=/lib/modules/${_kernver} DESTDIR=${startdir}/pkg install || return 1
  sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
}

Updated patch file (again old patch file is still on the AUR

--- ./Makefile.orig     2009-02-19 16:41:00.000000000 -0500
+++ ./Makefile  2009-02-24 11:27:47.000000000 -0500
@@ -1,10 +1,9 @@
 export KMODDIR?=       updates
 KMODDIR_ARG:=   "INSTALL_MOD_DIR=$(KMODDIR)"
-ifneq ($(origin $(KLIB)), undefined)
-KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(KLIB)"
-else
+ifeq ($(origin $(KLIB)), undefined)
 export KLIB:=          /lib/modules/$(shell uname -r)
 endif
+KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(DESTDIR)"
 export KLIB_BUILD ?=   $(KLIB)/build
 # Sometimes not available in the path
 MODPROBE := /sbin/modprobe
@@ -62,90 +61,18 @@
        $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
                modules_install
        @# All the scripts we can use
-       @mkdir -p /usr/lib/compat-wireless/
-       @install scripts/modlib.sh      /usr/lib/compat-wireless/
-       @install scripts/madwifi-unload /usr/sbin/
+       @mkdir -p $(DESTDIR)/usr/lib/compat-wireless/
+       @mkdir -p $(DESTDIR)/usr/sbin
+       @install scripts/modlib.sh      $(DESTDIR)/usr/lib/compat-wireless/
+       @install scripts/madwifi-unload $(DESTDIR)/usr/sbin/
        @# This is to allow switching between drivers without blacklisting
-       @install scripts/athenable      /usr/sbin/
-       @install scripts/b43enable      /usr/sbin/
-       @install scripts/iwl-enable     /usr/sbin/
-       @install scripts/athload        /usr/sbin/
-       @install scripts/b43load        /usr/sbin/
-       @install scripts/iwl-load       /usr/sbin/
-       @if [ ! -z $(MADWIFI) ]; then \
-               echo ;\
-               echo -n "Note: madwifi detected, we're going to disable it. "  ;\
-               echo "If you would like to enable it later you can run:"  ;\
-               echo "    sudo athenable madwifi"  ;\
-               echo ;\
-               echo Running athenable ath5k...;\
-               /usr/sbin/athenable ath5k ;\
-       fi
-       @if [ ! -z $(OLD_IWL) ]; then \
-               echo ;\
-               echo -n "Note: iwl4965 detected, we're going to disable it. "  ;\
-               echo "If you would like to enable it later you can run:"  ;\
-               echo "    sudo iwl-load iwl4965"  ;\
-               echo ;\
-               echo Running iwl-enable iwlagn...;\
-               /usr/sbin/iwl-enable iwlagn ;\
-       fi
-       @# If on distributions like Mandriva which like to
-       @# compress their modules this will find out and do
-       @# it for you. Reason is some old version of modutils
-       @# won't know mac80211.ko should be used instead of
-       @# mac80211.ko.gz
-       @./scripts/compress_modules
-       @/sbin/depmod -ae
-       @echo
-       @echo "Currently detected wireless subsystem modules:"
-       @echo 
-       @$(MODPROBE) -l mac80211
-       @$(MODPROBE) -l cfg80211
-       @$(MODPROBE) -l lib80211
-       @$(MODPROBE) -l adm8211
-       @$(MODPROBE) -l at76c50x-usb
-       @$(MODPROBE) -l ath5k
-       @$(MODPROBE) -l ath9k
-       @$(MODPROBE) -l b43
-       @$(MODPROBE) -l b43legacy
-       @$(MODPROBE) -l b44
-       @$(MODPROBE) -l ssb
-       @$(MODPROBE) -l rc80211_simple
-       @$(MODPROBE) -l iwlcore
-       @$(MODPROBE) -l iwl3945
-       @$(MODPROBE) -l iwlagn
-       @$(MODPROBE) -l ipw2100
-       @$(MODPROBE) -l ipw2200
-       @$(MODPROBE) -l libipw
-       @$(MODPROBE) -l lib80211
-       @$(MODPROBE) -l lib80211_crypt
-       @$(MODPROBE) -l libertas_cs
-       @$(MODPROBE) -l libertas_tf
-       @$(MODPROBE) -l libertas_tf_usb
-       @$(MODPROBE) -l ub8xxx
-       @$(MODPROBE) -l p54pci
-       @$(MODPROBE) -l p54usb
-       @$(MODPROBE) -l rt2400pci
-       @$(MODPROBE) -l rt2500pci
-       @$(MODPROBE) -l rt2500usb
-       @$(MODPROBE) -l rt61pci
-       @$(MODPROBE) -l rt73usb
-       @$(MODPROBE) -l usbnet
-       @$(MODPROBE) -l cdc_ether
-       @$(MODPROBE) -l rndis_host
-       @$(MODPROBE) -l rndis_wlan
-       @$(MODPROBE) -l rtl8180
-       @$(MODPROBE) -l rtl8187
-       @$(MODPROBE) -l zd1211rw
-       @echo 
-       @echo Now run:
-       @echo 
-       @echo make unload
-       @echo
-       @echo And then load the wireless module you need. If unsure reboot.
-       @echo
-
+       @install scripts/athenable              $(DESTDIR)/usr/sbin/
+       @install scripts/b43enable      $(DESTDIR)/usr/sbin/
+       @install scripts/iwl-enable             $(DESTDIR)/usr/sbin/
+       @install scripts/athload        $(DESTDIR)/usr/sbin/
+       @install scripts/b43load        $(DESTDIR)/usr/sbin/
+       @install scripts/iwl-load       $(DESTDIR)/usr/sbin/
+       
 uninstall:
        @# New location, matches upstream
        @rm -rf $(KLIB)/$(KMODDIR)/net/mac80211/

any help on these two issues is greatly appreciated.

Last edited by jacko (2009-02-24 17:20:30)

Offline

#2 2009-02-24 19:34:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: compat-wireless

You need to talk to arew264 - he says he has it working: http://bbs.archlinux.org/viewtopic.php?id=66061

Offline

#3 2009-02-26 18:39:00

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: compat-wireless

Well, I will ask one more time. Can anyone help me to explain why this PKGBUILD is giving me so much trouble? I would appreciate even the slightest bit of help, you don't have to use compat-wireless to offer PKGBUILD/makepkg advice. I apparently don't know enough about Makfiles to edit them correctly so the source will compile. So if you know anything about Makefile don't hesitate to point out my errors.

This is my modified Makefile, you can grab the original from the source. What is so wrong?

export KMODDIR?=       updates
KMODDIR_ARG:=   "INSTALL_MOD_DIR=$(KMODDIR)"
ifeq ($(origin $(KLIB)), undefined)
export KLIB:=          /lib/modules/$(shell uname -r)
endif
KMODPATH_ARG:=  "INSTALL_MOD_PATH=$(DESTDIR)"
export KLIB_BUILD ?=    $(KLIB)/build
# Sometimes not available in the path
MODPROBE := /sbin/modprobe
MADWIFI=$(shell $(MODPROBE) -l ath_pci)
OLD_IWL=$(shell $(MODPROBE) -l iwl4965)

ifneq ($(KERNELRELEASE),)

include $(M)/$(COMPAT_CONFIG)

NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS)

obj-y := net/wireless/ net/mac80211/
ifeq ($(ONLY_CORE),)
obj-$(CONFIG_B44) += drivers/net/b44.o
obj-y += drivers/ssb/ \
    drivers/misc/eeprom/ \
    drivers/net/usb/ \
    drivers/net/wireless/
endif

else

export PWD :=    $(shell pwd)

# These exported as they are used by the scripts
# to check config and compat autoconf
export COMPAT_CONFIG=config.mk
export CONFIG_CHECK=.$(COMPAT_CONFIG)_md5sum.txt
export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
export CREL=$(shell cat $(PWD)/compat-release)
export CREL_PRE:=.compat_autoconf_
export CREL_CHECK:=$(CREL_PRE)$(CREL)

include $(PWD)/$(COMPAT_CONFIG)

all: modules

modules: $(CREL_CHECK)
    @./scripts/check_config.sh
    $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
    @touch $@

# With the above and this we make sure we generate a new compat autoconf per
# new relase of compat-wireless-2.6 OR when the user updates the 
# $(COMPAT_CONFIG) file
$(CREL_CHECK):
    @# Force to regenerate compat autoconf
    @rm -f $(CONFIG_CHECK)
    @./scripts/check_config.sh
    @touch $@
    @md5sum $(COMPAT_CONFIG) > $(CONFIG_CHECK)

install: uninstall modules
    $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
        modules_install
    @# All the scripts we can use
    @mkdir -p $(DESTDIR)/usr/lib/compat-wireless/
    @mkdir -p $(DESTDIR)/usr/sbin
    @install scripts/modlib.sh    $(DESTDIR)/usr/lib/compat-wireless/
    @install scripts/madwifi-unload    $(DESTDIR)/usr/sbin/
    @# This is to allow switching between drivers without blacklisting
    @install scripts/athenable        $(DESTDIR)/usr/sbin/
    @install scripts/b43enable    $(DESTDIR)/usr/sbin/
    @install scripts/iwl-enable        $(DESTDIR)/usr/sbin/
    @install scripts/athload    $(DESTDIR)/usr/sbin/
    @install scripts/b43load    $(DESTDIR)/usr/sbin/
    @install scripts/iwl-load    $(DESTDIR)/usr/sbin/
    
uninstall:
    @# New location, matches upstream
    @rm -rf $(KLIB)/$(KMODDIR)/net/mac80211/
    @rm -rf $(KLIB)/$(KMODDIR)/net/wireless/
    @rm -rf $(KLIB)/$(KMODDIR)/drivers/ssb/
    @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/usb/
    @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/wireless/
    @# Lets only remove the stuff we are sure we are providing
    @# on the misc directory.
    @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom/eeprom_93cx6.ko*
    @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom_93cx6.ko*
    @rm -f $(KLIB)/$(KMODDIR)/drivers/net/b44.ko*
    @/sbin/depmod -ae
    @echo
    @echo "Your old wireless subsystem modules were left intact:"
    @echo 
    @$(MODPROBE) -l mac80211
    @$(MODPROBE) -l cfg80211
    @$(MODPROBE) -l lib80211
    @$(MODPROBE) -l adm8211
    @$(MODPROBE) -l at76c50x-usb
    @$(MODPROBE) -l ath5k
    @$(MODPROBE) -l ath9k
    @$(MODPROBE) -l b43
    @$(MODPROBE) -l b43legacy
    @$(MODPROBE) -l b44
    @$(MODPROBE) -l ssb
    @$(MODPROBE) -l rc80211_simple
    @$(MODPROBE) -l iwlcore
    @$(MODPROBE) -l iwl3945
    @$(MODPROBE) -l iwlagn
    @$(MODPROBE) -l ipw2100
    @$(MODPROBE) -l ipw2200
    @$(MODPROBE) -l libipw
    @$(MODPROBE) -l lib80211
    @$(MODPROBE) -l lib80211_crypt
    @$(MODPROBE) -l libertas_cs
    @$(MODPROBE) -l libertas_tf
    @$(MODPROBE) -l libertas_tf_usb
    @$(MODPROBE) -l ub8xxx
    @$(MODPROBE) -l p54pci
    @$(MODPROBE) -l p54usb
    @$(MODPROBE) -l rt2400pci
    @$(MODPROBE) -l rt2500pci
    @$(MODPROBE) -l rt2500usb
    @$(MODPROBE) -l rt61pci
    @$(MODPROBE) -l rt73usb
    @$(MODPROBE) -l usbnet
    @$(MODPROBE) -l cdc_ether
    @$(MODPROBE) -l rndis_host
    @$(MODPROBE) -l rndis_wlan
    @$(MODPROBE) -l rtl8180
    @$(MODPROBE) -l rtl8187
    @$(MODPROBE) -l zd1211rw
    @
    @echo 

clean:
    @if [ -d net -a -d $(KLIB_BUILD) ]; then \
        $(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean ;\
    fi
    @rm -f $(CREL_PRE)*
unload:
    @./scripts/unload.sh

load: unload
    @./scripts/load.sh

.PHONY: all clean install uninstall unload load

endif

clean-files += Module.symvers modules modules.order $(CREL_CHECK) $(CONFIG_CHECK)

I suppose I will just drop the package and let someone else worry about it.

Offline

#4 2009-03-01 15:28:24

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: compat-wireless

forget it, I fixed my issue. Orphaned, have at it.

Offline

#5 2009-03-16 16:38:02

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: compat-wireless

usually when you fix your issue... you post about how you fixed it so others who may have a similiar problem and can search and find the answer.

Offline

Board footer

Powered by FluxBB