Guest User

TL-WR841N 8.x OpenWRT build.sh

a guest
Jan 8th, 2014
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Prepare build enviroment
  4. mkdir openwrt_build
  5. cd openwrt_build
  6. git clone --depth=1 git://git.openwrt.org/openwrt.git
  7. cd openwrt
  8.  
  9. # Download and install package feeds
  10. ./scripts/feeds update -a
  11. ./scripts/feeds install -a
  12.  
  13. # Download and apply patches in build directory
  14. wget -q http://paste.debian.net/downloadh/6b8d7dd6 -O ../add_74kc_optimizations.patch
  15. wget -q http://paste.debian.net/downloadh/60229a8d -O ../miniupnpd-1.8.20131216.patch
  16. for f in ../*.patch; do
  17.     patch -p1 < $f;
  18. done
  19.  
  20. # Download and update .config
  21. wget -q http://paste.debian.net/downloadh/4cba9b4a -O .config
  22. make defconfig
  23.  
  24. # Make
  25. make -j 2
  26.  
  27. # Create sha256sums
  28. cd bin/ar71xx
  29. sha256sum openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-sysupgrade.bin > sha256sum
  30. cd ../..
  31.  
  32. # Create zip archive containing firmware images
  33. zip -9j ../openwrt-tl-wr841n-v8-squashfs-$(date +"%Y-%m-%d-%H-%M").zip bin/ar71xx/sha256sum bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-sysupgrade.bin
RAW Paste Data