apt-get install kernel-package gcc binutils libc6-dev libssl-devUse aphost and rt2x00 snapshots:
cd /tmp/src wget http://hostap.epitest.fi/releases/snapshots/hostapd-0.6-2007-03-25.tar.gz wget http://rt2x00.serialmonkey.com/rt2x00-cvs-daily.tar.gz (Unpack both into /tmp/src
tar xvzf rt2x00-cvs-daily.tar.gz tar xvzf hostapd-0.6-2007-03-25.tar.gzand edit hostap defconfig file: Replace
# Driver interface for drivers using Devicescape IEEE 802.11 stack #CONFIG_DRIVER_DEVICESCAPE=y # Currently, driver_devicescape.c build requires some additional parameters # to be able to include some of the kernel header files. Following lines can # be used to set these (WIRELESS_DEV must point to the root directory of the # wireless-dev.git tree). #WIRELESS_DEV=/usr/src/wireless-dev #CFLAGS += -I$(WIRELESS_DEV)/include #CFLAGS += -I$(WIRELESS_DEV)/net/d80211 #CFLAGS += -D_LINUX_TYPES_Hwith
# Driver interface for drivers using Devicescape IEEE 802.11 stack CONFIG_DRIVER_DEVICESCAPE=y # Currently, driver_devicescape.c build requires some additional parameters # to be able to include some of the kernel header files. Following lines can # be used to set these (WIRELESS_DEV must point to the root directory of the # wireless-dev.git tree). WIRELESS_DEV=/tmp/src/rt2x00-cvs-2007041802/ieee80211 CFLAGS += -I$(WIRELESS_DEV) CFLAGS += -I$(WIRELESS_DEV)/net/d80211After that
cp defconfig .config && makeand voila, it compiles! Go grab a green tea in the mean time, and once it finalises, adapt the Makefile for Debian/Ubuntu standards to
install: all for i in $(ALL); do cp $$i /usr/sbin/$$i; doneand run
sudo make installWe now need to compile a vanilla kernel (without ubuntu's -mm patches) to make rt2x00 work (source: http://rt2x00.serialmonkey.com/phpBB2/viewtopic.php?t=3547)
cd /usr/src sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.7.tar.bz2 sudo tar xjf linux-2.6.20.7.tar.bz2 sudo apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 sudo cp /boot/config-`uname -r` ./.config sudo make menuconfigGo to Load an Alternate Configuration File and choose .config (which contains the configuration of the current Ubuntu kernel you are running). Then browse through the kernel configuration menu and make your choices (or do it in vi and check .config). For 2.6.20, all required options were already set in the original Ubuntu configuration (either set to y or m) as you can see from the .config extract below:
Kernel config option Required for component ------------------------------------------------------------------ # CONFIG_NET_RADIO all # CONFIG_PCI rt2400pci, rt2500pci, rt61pci # CONFIG_USB rt2500usb, rt73usb # CONFIG_HOTPLUG rt61pci, rt73usb # CONFIG_FW_LOADER rt61pci, rt73usb # CONFIG_DEBUG_FS rt2x00 (optional, only for debug) # CONFIG_INPUT rfkill # CONFIG_CRYPTO d80211 # CONFIG_CRYPTO_AES d80211 # CONFIG_CRYPTO_AES_586 d80211 (optional, only for x86) # CONFIG_CRYPTO_AES_X86_64 d80211 (optional, only for x86_64) # CONFIG_CRYPTO_ARC4 d80211 # CONFIG_CRYPTO_ECB d80211 (Only for kernels > 2.6.19)Make the vanilla kernel with the Ubuntu configuration:
make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-rt2x00-attempt kernel_image kernel_headersCreate a symlink for the proprietary firmware in /lib/firmware. Note that the link target "2.6.20.7-rt2x00-attempt" is a result of the used kernel source (in our case linux-2.6.20.7.tar.bz2) and the make-kpkg argument "--append-to-version=-rt2x00-attempt"!
ln -s 2.6.20-15-powerpc/ 2.6.20.7-rt2x00-attemptand install the kernel packages you just created (through compilation):
sudo dpkg -i ../linux-image-2.6.20.7-rt2x00-attempt_2.6.20.7-rt2x00-attempt-10.00.Custom_powerpc.debNo changes are required in /etc/yaboot.conf (since the newly installed kernel becomes the default kernel anyway), but just in case, run
sudo ybin -v
Congratulations: Reboot and enjoy new vanilla Kernel that is ready for the rt2x00 compilation as outlined in the next steps.
IvD (rt2x00 maintainer) suggests enabling mac80211 inside the Ubuntu kernel (source: same thread as above). Fortunately for us, the stock Ubuntu .config that we used before for compiling the kernel contains alreadyCONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m CONFIG_IEEE80211_SOFTMAC=m # CONFIG_IEEE80211_SOFTMAC_DEBUG is not setso we must disable CONFIG_MAC80211 in the rt2x00 config file named rt2x00_compat.h by removing (or commenting) the line containing ax25_ptr. Apply patch from http://rt2x00.serialmonkey.com/phpBB2/viewtopic.php?t=3616 (direct download link for the patch file: http://rt2x00.serialmonkey.com/phpBB2/download.php?id=1225) and apply the patch via:
patch -p0 < fix.patch make sudo make installrmmod the old modules, and install the new ones (modprobe rt73usb) This is my simple configuration for the wlan card in /etc/network/interfaces (without any WEP or WPA configuration):
# The wlan interface auto wlan0 iface wlan0 inet static pre-up iwconfig wlan0 mode master essid "YOUR_ESSID" address 192.168.1.254 netmask 255.255.255.0To test the card manually, use the following set of commands in a shell:
ifconfig wlan0 down iwconfig wlan0 mode master essid "YOUR_ESSID" ifconfig wlan0 192.168.1.254 ifconfig wlan0 upOnce you confirmed via ifconfig that the card is detected and runs fine, you can change the settings for the freshly compiled hostapd in /etc/hostapd/hostapd.conf to:
interface=wlan0 driver=devicescape hw_mode=g channel=4 debug=2 beacon_int=100 dtim_period=2 ssid=YOUR_ESSIDand finally launch hostap with
hostapd -dd /etc/hostapd/hostapd.confFor hostap to launch automatically on system startup, edit /etc/default/hostapd to read:
RUN_DAEMON="yes" DAEMON_CONF="/etc/hostapd/hostapd.conf"In case you still have trouble, you can try with IPv4 only by putting the ipv6 module in the modules blacklist to increase simplicity. Add in /etc/modprobe.d/blacklist
blacklist ipv6
ping -s 1016 www.latz.ccThis works perfectly fine and all packets arrive. However,
ping -s 1017 www.latz.cc(and any other packet size bigger than 1017 excluding the 8 byte ICMP information for that matter) fails. Packages are simply dropped (again: only on the Toshiba, the MacBook under XP does not exhibit this behaviour). Any suggestions and ideas are welcome!
Achim J. Latz, achim@latz.cc, 13.02.2021