Compat-wireless editing/compiling *** plz help ***

Problems with packages? Post here, using [tags] of the package name.

Compat-wireless editing/compiling *** plz help ***

Postby seza » Mon Dec 10, 2012 11:11 am

Hi,
I have a RASPI equiped with Alfa USB Adptr AWUS036NH and loaded with Arch ver:
$this->bbcode_second_pass_code('', 'Uname -a
Linux alarmpi 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l ')
Following various tut's I am trying to edit the compat driver to remove the TX power limit
(I am aware of the legal issues related to this - its only a temporary setup for educational purposes)

I attempted different versions of the driver but it always fail when I run 'make'

any ideas please - am struggling here.

thanks
seza
 
Posts: 13
Joined: Sat Dec 08, 2012 6:51 am

Re: Compat-wireless editing/compiling *** plz help ***

Postby moonman » Tue Dec 11, 2012 12:24 am

I haven't had any success building it a while ago as well. AFAIK linux-headers doesn't have some necessary headers to build it, but when i copied the necessery files it still errored out. What is the kernel and the error that you get?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Compat-wireless editing/compiling *** plz help ***

Postby seza » Tue Dec 11, 2012 10:34 pm

All sorts of compilations errors,
mostly missing files - now I've given up on that.
am trying to to use aircrack-ng to see if that helps with using 'iw reg set BO'

cheers
seza
 
Posts: 13
Joined: Sat Dec 08, 2012 6:51 am

Re: Compat-wireless editing/compiling *** plz help ***

Postby pepedog » Wed Dec 12, 2012 1:46 pm

OK, it does build
You have to edit PKGBUILD
First I think you need matching source to you kernel version
http://wireless.kernel.org/en/users/Download/stable/#compat-wireless_3.2_stable_releases

I had to add these
CFLAGS=""
CXXFLAGS=""
it complained that hard and soft float both set, where it gets soft from I don't know

Next, and I don't like this, had to remove this line to stop compile errors
-Werror-implicit-function-declaration
from /root/crrpi/usr/src/linux-3.2.27-16-ARCH+/Makefile
And this is going to need a 1Gb swap file to build

Plus other changes to PKGBUILD

Plus more changes needed in package section
Here is my PKGBUILD so far, let someone else have a go, it builds but doesn't package
Even though I'm in a rpi rootfs chroot, it's seeing the kernel version of the system I'm building on
$this->bbcode_second_pass_code('', '# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: hokasch <hokasch at operamail dot com>
# Contributor: Dennis Brendel <buddabrod at gmail dot com>
# Contributor: Mathias Buren <mathias.buren at gmail dot com>
# Contributor: Benjamin Mtz (Cruznick) <cruznick at archlinux dot us>

pkgname=compat-wireless-patched
pkgver=3.2.5_1 # NO CRAP! (-c)
_upver="${pkgver//_/-}"
pkgrel=3
pkgdesc='Compat wireless driver patched for better injection'
url='http://wireless.kernel.org/en/users/Download/stable/'
arch=('i686' 'x86_64')
license=('GPL')
depends=('linux')
makedepends=('linux-api-headers' 'linux-headers')
# http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/compat-wireless-3.2.5-1.tar.bz2
source=("http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/compat-wireless-3.2.5-1.tar.bz2" \
'mac80211.compat08082009.wl_frag+ack_v1.patch')
sha1sums=('e7bcdc038b9f85e74308b175b41560b6d5a31c50'
'85f7a1b141549b774f5631fba259bc414aeeffb8')

_extramodules=extramodules-3.2.27--raspberrypi
_kernver=$(cat /usr/lib/modules/${_extramodules}/version) # TODO make this a lower boundary and utilize in reality pacman to get freshest paths

install=install

# For a list of supported drivers, run ./scripts/driver-select from the source tarball.
# To only build specific ones, define the _selected_drivers variable; for instance:
# _selected_drivers='atheros intel wl12xx'
# You can also export this variable in ~/.bashrc or /etc/profile to automate updating this package

build() {
cd "${srcdir}/compat-wireless-${_upver}"
CFLAGS=""
CXXFLAGS=""
# modprobe -l dropped in kmod
sed 's:modprobe -l \([^ )`]*\):find /usr/lib/modules/*/kernel -name "\1.ko*" | sed "s|.*/kernel||":' -i scripts/*
sed 's:\$(MODPROBE) -l \([^ )`]*\):find /usr/lib/modules/*/kernel -name "\1.ko*" | sed "s|.*/kernel||":' -i Makefile

# rfkill.h does not use compat-3.1.h # TODO : IS THIS RLY NEEDED ?
echo '#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)' >> net/wireless/core.h

# Patch time!
patch -p1 -i ../mac80211.compat08082009.wl_frag+ack_v1.patch

# Make time!
[[ -n ${_selected_drivers} ]] && scripts/driver-select ${_selected_drivers}
make KLIB=/usr/lib/modules/"${_kernver}"
}

package() {
cd "${srcdir}/compat-wireless-${_upver}"
mkdir ${pkgdir}/usr/
make INSTALL_MOD_PATH="${pkgdir}/usr" KMODDIR=../"${_extramodules}" install-modules
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;

install -d "${pkgdir}"/usr/sbin
install scripts/*{enable,load} "${pkgdir}"/usr/sbin

install -d "${pkgdir}"/usr/lib/compat-wireless
install scripts/modlib.sh "${pkgdir}"/usr/lib/compat-wireless

install -d "${pkgdir}"/usr/lib/udev/rules.d
install udev/compat_firmware.sh "${pkgdir}"/usr/lib/udev
install udev/50-compat_firmware.rules "${pkgdir}"/usr/lib/udev/rules.d
}
')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to Packages

Who is online

Users browsing this forum: No registered users and 13 guests