Advertisement
nekonojita

compile_8188eu.sh

Jun 14th, 2014
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Get linux source code, prepare config files and create symlinks
  4. VERSION=`uname -r | awk -F'.' '{print $1"."$2}'`
  5. cd /usr/src
  6. wget https://codeload.github.com/raspberrypi/linux/tar.gz/rpi-${VERSION}.y -O rpi-${VERSION}.y.tar.gz
  7. sudo tar zxf rpi-${VERSION}.y.tar.gz -C /usr/src/
  8. cd /usr/src/rpi-dev/linux-rpi-${VERSION}.y/
  9. sudo bash -c "zcat /proc/config.gz > /usr/src/rpi-dev/linux-rpi-${VERSION}.y/.config"
  10. # In the next step you may be prompted questions about the configuration
  11. # if your /proc/config.gz does not answer them (new features for example)
  12. sudo make oldconfig
  13. sudo make modules_prepare
  14. sudo wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
  15. sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/source
  16. sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/build
  17. # Optional
  18. sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/rpi-dev/linux-`uname -r`
  19. sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/rpi-dev/linux
  20.  
  21. # Get driver source, compile, install and load it
  22. cd /usr/src/
  23. git clone https://github.com/lwfinger/rtl8188eu.git
  24. cd rtl8188eu
  25. # This wil take around 20 minutes
  26. make all
  27. sudo make install
  28. # After this step you should have those new files installed:
  29. # /lib/modules/`uname -r`/kernel/drivers/net/wireless/8188eu.ko
  30. # /lib/firmware/rtlwifi/rtl8188eufw.bin
  31. sudo modprobe 8188eu
  32.  
  33. # Remove driver and linux source code to recover some space (around 700MB)
  34. # Leave those lines commented if you want to keep the code for future compilations
  35. sudo rm /lib/modules/`uname -r`/source
  36. sudo rm /lib/modules/`uname -r`/build
  37. sudo rm /usr/src/linux-`uname -r`
  38. sudo rm /usr/src/linux
  39. sudo rm -rf /usr/src/linux-rpi-${VERSION}.y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement