#! /bin/bash set -eu DRIVER_TARBALL=DPO_RT3090_LinuxSTA_V2.4.0.1_20101110_WiFiBTCombo_RFKill.bz2 EXTRACT=extract extract() { # bit weird, this; the tarball contains a single file, which is a tar ... tar xfj "$1" inner="$(ls)" tar xf "$inner" rm "$inner" } BUILD_DIR=/tmp/rt3090 mkdir -p "$BUILD_DIR" rm -rf "$BUILD_DIR"/* cd "$BUILD_DIR" $EXTRACT ~root/"$DRIVER_TARBALL" cd "$(ls)" # "Build for being controlled by NetworkManager or wpa_supplicant wext functions" # also enlarge the CONFIG_FRAME_WARN (not by that name!) to current kernel standard sed -i.orig \ -e 's/HAS_WPA_SUPPLICANT=n/HAS_WPA_SUPPLICANT=y/' \ -e 's/HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n/HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y/' \ -e '/^WFLAGS :=/aWFLAGS += -Wframe-larger-than=2048' \ os/linux/config.mk # TODO: fix CONFIG_FRAME_WARN make make install # copies in firmware and driver, and does depmod rm -rf "$BUILD_DIR" echo echo "Reboot to load new driver (unless you know how to make modprobe work)"