LEDE(OPENWRT)编译ADBYBY

2017-4-20 hale 技术

以前一直都是使用OPENWRT自带的adblock进行广告过滤,但是总觉得不好用。搜索发现网上牛人都是添加adbyby进行广告过滤,所以我也研究编译了下,并记录了过程。


下载adbyby

hale@ubuntu16:~/lede-v17.01.1$ wget https://github.com/kuoruan/luci-app-adbyby/archive/master.zip
--2017-04-20 15:59:33--  https://github.com/kuoruan/luci-app-adbyby/archive/master.zip
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/kuoruan/luci-app-adbyby/zip/master [following]
--2017-04-20 15:59:35--  https://codeload.github.com/kuoruan/luci-app-adbyby/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’

master.zip                      [                     <=>                 ]   2.63M   204KB/s    in 12s     

2017-04-20 15:59:47 (234 KB/s) - ‘master.zip’ saved [2759671]

hale@ubuntu16:~/lede-v17.01.1$ 

解压
hale@ubuntu16:~/lede-v17.01.1$ unzip master.zip 
Archive:  master.zip
c433fb64611ff09a685ea5c195dbd78ef7e38e10
   creating: luci-app-adbyby-master/
  inflating: luci-app-adbyby-master/README.md  
   creating: luci-app-adbyby-master/adbyby/
  inflating: luci-app-adbyby-master/adbyby/Makefile  
   creating: luci-app-adbyby-master/adbyby/files/
   creating: luci-app-adbyby-master/adbyby/files/7620n/
  inflating: luci-app-adbyby-master/adbyby/files/7620n/adbyby  
  inflating: luci-app-adbyby-master/adbyby/files/adbyby.sh  
  inflating: luci-app-adbyby-master/adbyby/files/adbybyfirst.sh  
  inflating: luci-app-adbyby-master/adbyby/files/adbybyupdate.sh  
  inflating: luci-app-adbyby-master/adbyby/files/adhook.ini  
   creating: luci-app-adbyby-master/adbyby/files/ar71xx/
  inflating: luci-app-adbyby-master/adbyby/files/ar71xx/adbyby  
   creating: luci-app-adbyby-master/adbyby/files/arm/
  inflating: luci-app-adbyby-master/adbyby/files/arm/adbyby  
   creating: luci-app-adbyby-master/adbyby/files/armv7/
  inflating: luci-app-adbyby-master/adbyby/files/armv7/adbyby  
   creating: luci-app-adbyby-master/adbyby/files/data/
  inflating: luci-app-adbyby-master/adbyby/files/data/clean.ini  
  inflating: luci-app-adbyby-master/adbyby/files/data/lazy.txt  
  inflating: luci-app-adbyby-master/adbyby/files/data/rules.txt  
 extracting: luci-app-adbyby-master/adbyby/files/data/user.txt  
  inflating: luci-app-adbyby-master/adbyby/files/data/video.txt  
   creating: luci-app-adbyby-master/adbyby/files/doc/
  inflating: luci-app-adbyby-master/adbyby/files/doc/hidecss.js  
 extracting: luci-app-adbyby-master/adbyby/files/user.action  
   creating: luci-app-adbyby-master/adbyby/files/x86/
  inflating: luci-app-adbyby-master/adbyby/files/x86/adbyby  
   creating: luci-app-adbyby-master/adbyby/files/x86_64/
  inflating: luci-app-adbyby-master/adbyby/files/x86_64/adbyby  
   creating: luci-app-adbyby-master/luci-app-adbyby/
  inflating: luci-app-adbyby-master/luci-app-adbyby/Makefile  
   creating: luci-app-adbyby-master/luci-app-adbyby/luasrc/
   creating: luci-app-adbyby-master/luci-app-adbyby/luasrc/controller/
  inflating: luci-app-adbyby-master/luci-app-adbyby/luasrc/controller/adbyby.lua  
   creating: luci-app-adbyby-master/luci-app-adbyby/luasrc/model/
   creating: luci-app-adbyby-master/luci-app-adbyby/luasrc/model/cbi/
  inflating: luci-app-adbyby-master/luci-app-adbyby/luasrc/model/cbi/adbyby.lua  
   creating: luci-app-adbyby-master/luci-app-adbyby/root/
   creating: luci-app-adbyby-master/luci-app-adbyby/root/etc/
   creating: luci-app-adbyby-master/luci-app-adbyby/root/etc/config/
  inflating: luci-app-adbyby-master/luci-app-adbyby/root/etc/config/adbyby  
   creating: luci-app-adbyby-master/luci-app-adbyby/root/etc/init.d/
  inflating: luci-app-adbyby-master/luci-app-adbyby/root/etc/init.d/adbyby  
   creating: luci-app-adbyby-master/luci-app-adbyby/root/etc/uci-defaults/
  inflating: luci-app-adbyby-master/luci-app-adbyby/root/etc/uci-defaults/40_luci-adbyby  
hale@ubuntu16:~/lede-v17.01.1$ 
hale@ubuntu16:~/lede-v17.01.1$ cd luci-app-adbyby-master/

将adbyby放入源码的package目录下
hale@ubuntu16:~/lede-v17.01.1/luci-app-adbyby-master$ cp adbyby/ ../source/package/ -R
hale@ubuntu16:~/lede-v17.01.1/luci-app-adbyby-master$ ll ../source/package/adbyby/
total 16
drwxrwxr-x  3 hale hale 4096 Apr 20 16:01 ./
drwxrwxr-x 14 hale hale 4096 Apr 20 16:01 ../
drwxrwxr-x 10 hale hale 4096 Apr 20 16:01 files/
-rw-rw-r--  1 hale hale 1749 Apr 20 16:01 Makefile
hale@ubuntu16:~/lede-v17.01.1/luci-app-adbyby-master$ 

luci-app-adbyby放入/feeds/luci/applications目录下
hale@ubuntu16:~/lede-v17.01.1/luci-app-adbyby-master$ cp luci-app-adbyby/ ../source/feeds/luci/applications/ -R
hale@ubuntu16:~/lede-v17.01.1/luci-app-adbyby-master$ cd ../source/

更新并安装feeds
hale@ubuntu16:~/lede-v17.01.1/source$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.lede-project.org/feed/packages.git^f9e99848182fc7bc554e541ca133c22079d4041b' ...
Create index file './feeds/packages.index' 
Updating feed 'luci' from 'https://git.lede-project.org/project/luci.git^29fabe26399fbaecf9231e24f9ac1ee5773cafa6' ...
Create index file './feeds/luci.index' 
Collecting package info: done
Updating feed 'routing' from 'https://git.lede-project.org/feed/routing.git^04a37ef4309c2b67c64901eb8fbf3800b4c7bb35' ...
Create index file './feeds/routing.index' 
Updating feed 'telephony' from 'https://git.lede-project.org/feed/telephony.git^1f0fb2538ba6fc306198fe2a9a4b976d63adb304' ...
Create index file './feeds/telephony.index' 
hale@ubuntu16:~/lede-v17.01.1/source$ ./scripts/feeds install -a
Installing all packages from feed packages.
Installing all packages from feed luci.
Installing package 'luci-app-adbyby' from luci
Installing all packages from feed routing.
Installing all packages from feed telephony.
hale@ubuntu16:~/lede-v17.01.1/source$ 

选择luci-->app-->luci-app-adbyby
hale@ubuntu16:~/lede-v17.01.1/source$make menuconfig

编译
hale@ubuntu16:~/lede-v17.01.1/source$make

然后进行刷机

sysupgrade -F /tmp/lede-ar71xx-nand-wndr3700v4-squashfs-sysupgrade.tar 


下面是效果图:

2017-04-20

2017-04-20

本文原创,转载说明。


标签: OpenWRT LEDE

发表评论:

Powered by emlog 苏ICP备11083054号-1