dimecres, 10 de setembre del 2014

Script per compilar el driver rtl8188eu modificicat.

La última vegada que vaig intentar compilar el driver wifi pel TP-Link TL-WN725N vaig fer uns canvis a l'script de Eneko Chan.

Passo a posar la modificació de l'script, bàsicament agafo el fitxer Modules.symvers d'una altre manera:

#!/bin/bash

# Get linux source code, prepare config files and create symlinks
VERSION=`uname -r | awk -F'.' '{print $1"."$2}'`
cd ~
wget https://codeload.github.com/raspberrypi/linux/tar.gz/rpi-${VERSION}.y -O rpi-${VERSION}.y.tar.gz
sudo tar zxf rpi-${VERSION}.y.tar.gz -C /usr/src/
cd /usr/src/linux-rpi-${VERSION}.y/
sudo bash -c "zcat /proc/config.gz > /usr/src/linux-rpi-${VERSION}.y/.config"
# In the next step you may be prompted questions about the configuration
# if your /proc/config.gz does not answer them (new features for example)
sudo make oldconfig
sudo make modules_prepare
#sudo wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep ‘* firmware as of’ | head -n 1 | sed -e ‘s/\ \*\ firmware as of \(.*\)$/\1/’`
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/Module.symvers
sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/source
sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/build
# Optional
#sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/linux-`uname -r`
#sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/linux

# Get driver source, compile, install and load it
cd ~
git clone https://github.com/lwfinger/rtl8188eu.git
cd rtl8188eu
# This wil take around 20 minutes
make all
sudo make install
# After this step you should have those new files installed:
# /lib/modules/`uname -r`/kernel/drivers/net/wireless/8188eu.ko
# /lib/firmware/rtlwifi/rtl8188eufw.bin
sudo modprobe 8188eu

# Remove driver and linux source code to recover some space (around 700MB)
# Leave those lines commented if you want to keep the code for future compilations
#sudo rm /lib/modules/`uname -r`/source
#sudo rm /lib/modules/`uname -r`/build
#sudo rm /usr/src/linux-`uname -r`
#sudo rm /usr/src/linux
#sudo rm -R /usr/src/linux-rpi-${VERSION}.y
#cd ~
#rm rpi-${VERSION}.y.tar.gz
#rm -R rtl8188eu

Així deixem constància de la modiicació feta per la posterior recuperació, ja fa mesos que ho vaig fer però va funcionar.

Cap comentari:

Publica un comentari a l'entrada