+#
+# This is free software, licensed under the Apache License, Version 2.0 .
+#
+
+include $(TOPDIR)/rules.mk
+
+LUCI_TITLE:=LuCI Support for Xware downloading app.
+LUCI_DEPENDS:=@arm +wget
+PKG_VERSION:=1.0
+PKG_RELEASE:=2
+
+include $(TOPDIR)/feeds/luci/luci.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/package/zxlhhyccc/luci-app-xunlei/luasrc/controller/xunlei.lua b/package/zxlhhyccc/luci-app-xunlei/luasrc/controller/xunlei.lua
new file mode 100644
index 0000000000..b0d15cd136
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/luasrc/controller/xunlei.lua
@@ -0,0 +1,13 @@
+
+module("luci.controller.xunlei", package.seeall)
+
+function index()
+ if not nixio.fs.access("/etc/config/xunlei") then
+ return
+ end
+
+ local page
+ page = entry({"admin", "services", "xunlei"}, cbi("xunlei"), _("迅雷远程下载"), 199)
+ page.i18n = "xunlei"
+ page.dependent = true
+end
diff --git a/package/zxlhhyccc/luci-app-xunlei/luasrc/model/cbi/xunlei.lua b/package/zxlhhyccc/luci-app-xunlei/luasrc/model/cbi/xunlei.lua
new file mode 100644
index 0000000000..fd3bec29a0
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/luasrc/model/cbi/xunlei.lua
@@ -0,0 +1,106 @@
+local fs = require "nixio.fs"
+local util = require "nixio.util"
+
+local running=(luci.sys.call("pidof EmbedThunderManager > /dev/null") == 0)
+local button=""
+local xunleiinfo=""
+local tblXLInfo={}
+local detailInfo = "
启动后会看到类似如下信息:
[ 0, 1, 1, 0, “7DHS94”,1, “201_2.1.3.121”, “shdixang”, 1 ]
其中有用的几项为:
第一项: 0表示返回结果成功;
第二项: 1表示检测网络正常,0表示检测网络异常;
第四项: 1表示已绑定成功,0表示未绑定;
第五项: 未绑定的情况下,为绑定的需要的激活码;
第六项: 1表示磁盘挂载检测成功,0表示磁盘挂载检测失败。"
+
+if running then
+ xunleiinfo = luci.sys.exec("wget-ssl http://127.0.0.1:9000/getsysinfo -O - 2>/dev/null")
+ m = Map("xunlei", translate("Xware"), translate("迅雷远程下载 运行中"))
+ string.gsub(string.sub(xunleiinfo, 2, -2),'[^,]+',function(w) table.insert(tblXLInfo, w) end)
+
+ detailInfo = [[启动信息:]] .. xunleiinfo .. [[
]]
+ if tonumber(tblXLInfo[1]) == 0 then
+ detailInfo = detailInfo .. [[状态正常
]]
+ else
+ detailInfo = detailInfo .. [[执行异常
]]
+ end
+
+ if tonumber(tblXLInfo[2]) == 0 then
+ detailInfo = detailInfo .. [[网络异常
]]
+ else
+ detailInfo = detailInfo .. [[网络正常
]]
+ end
+
+ if tonumber(tblXLInfo[4]) == 0 then
+ detailInfo = detailInfo .. [[未绑定]].. [[ 激活码:]].. tblXLInfo[5] ..[[
]]
+ else
+ detailInfo = detailInfo .. [[已绑定
]]
+ end
+
+ if tonumber(tblXLInfo[6]) == 0 then
+ detailInfo = detailInfo .. [[磁盘挂载检测失败
]]
+ else
+ detailInfo = detailInfo .. [[磁盘挂载检测成功
]]
+ end
+else
+ m = Map("xunlei", translate("Xware"), translate("迅雷远程下载 未运行"))
+end
+
+-----------
+--Xware--
+-----------
+
+s = m:section(TypedSection, "xunlei","Xware 设置")
+s.anonymous = true
+
+s:tab("basic", translate("Settings"))
+
+enable = s:taboption("basic", Flag, "enable", "启用 迅雷远程下载")
+enable.rmempty = false
+
+vod = s:taboption("basic", Flag, "vod", "删除迅雷VOD服务器", "删除迅雷VOD服务器,减少上传流量。")
+vod.rmempty = false
+
+s:taboption("basic", DummyValue,"opennewwindow" ,"
", detailInfo)
+
+s:taboption("basic", DummyValue,"opennewwindow" ,"
", "
打开迅雷远程下载页面。首次运行将激活码填进网页即可绑定。")
+
+
+s:tab("editconf_etm", translate("Xware 配置"))
+editconf_etm = s:taboption("editconf_etm", Value, "_editconf_etm",
+ translate("Xware 配置:"),
+ translate("注释用“ ; ”"))
+editconf_etm.template = "cbi/tvalue"
+editconf_etm.rows = 20
+editconf_etm.wrap = "off"
+
+function editconf_etm.cfgvalue(self, section)
+ return fs.readfile("/tmp/etc/etm.cfg") or ""
+end
+function editconf_etm.write(self, section, value2)
+ if value2 then
+ value2 = value2:gsub("\r\n?", "\n")
+ fs.writefile("/tmp/etm.cfg", value2)
+ if (luci.sys.call("cmp -s /tmp/etm.cfg /tmp/etc/etm.cfg") == 1) then
+ fs.writefile("/tmp/etc/etm.cfg", value2)
+ end
+ fs.remove("/tmp/etm.cfg")
+ end
+end
+
+s:tab("editconf_download", translate("下载配置"))
+editconf_download = s:taboption("editconf_download", Value, "_editconf_download",
+ translate("下载配置"),
+ translate("注释用“ ; ”"))
+editconf_download.template = "cbi/tvalue"
+editconf_download.rows = 20
+editconf_download.wrap = "off"
+
+function editconf_download.cfgvalue(self, section)
+ return fs.readfile("/tmp/etc/download.cfg") or ""
+end
+function editconf_download.write(self, section, value3)
+ if value3 then
+ value3 = value3:gsub("\r\n?", "\n")
+ fs.writefile("/tmp/download.cfg", value3)
+ if (luci.sys.call("cmp -s /tmp/download.cfg /tmp/etc/download.cfg") == 1) then
+ fs.writefile("/tmp/etc/download.cfg", value3)
+ end
+ fs.remove("/tmp/download.cfg")
+ end
+end
+return m
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/ETMDaemon b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/ETMDaemon
new file mode 100644
index 0000000000..fe0d100a01
Binary files /dev/null and b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/ETMDaemon differ
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/EmbedThunderManager b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/EmbedThunderManager
new file mode 100644
index 0000000000..743a412a71
Binary files /dev/null and b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/EmbedThunderManager differ
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/portal b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/portal
new file mode 100644
index 0000000000..7651b1a927
Binary files /dev/null and b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/portal differ
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/vod_httpserver b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/vod_httpserver
new file mode 100644
index 0000000000..72f3c22904
Binary files /dev/null and b/package/zxlhhyccc/luci-app-xunlei/root/app/xunlei/vod_httpserver differ
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/config/xunlei b/package/zxlhhyccc/luci-app-xunlei/root/etc/config/xunlei
new file mode 100644
index 0000000000..181ed73b60
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/config/xunlei
@@ -0,0 +1,10 @@
+
+config xunlei 'config'
+ option device '/mnt/sda1'
+ option up '0'
+ option xware 'Xware_mipseb_32_uclibc.tar.gz'
+ option url 'http://dl.lazyzhu.com/file/Thunder/Xware'
+ option file '/app'
+ option vod '1'
+ option enable '0'
+
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/init.d/xunlei b/package/zxlhhyccc/luci-app-xunlei/root/etc/init.d/xunlei
new file mode 100644
index 0000000000..b0aa473a59
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/init.d/xunlei
@@ -0,0 +1,49 @@
+#!/bin/sh /etc/rc.common
+START=99
+
+start() {
+ config_load "xunlei"
+
+ config_get enable config enable 0
+ config_get device config device
+ config_get up config up 0
+ config_get file config file
+
+ device=$(uci get xunlei.config.device)
+ file=$(uci get xunlei.config.file)
+ vod=$(uci get xunlei.config.vod)
+ mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
+
+ rm -f /tmp/etc/thunder_mounts.cfg
+ rm -f /tmp/etc/etm.cfg
+ rm -f /tmp/etc/download.cfg
+
+ path1="$file/xunlei/cfg/thunder_mounts.cfg"
+ path2="$file/xunlei/cfg/etm.cfg"
+ path3="$file/xunlei/cfg/download.cfg"
+
+ [ "$up" -eq 1 ] && /etc/xware/xlup && /etc/xware/cfg
+ [ "$vod" -eq 1 ] && rm -f $file/xunlei/lib/vod_httpserver
+ [ "$vod" -eq 1 ] && rm -f $file/xunlei/vod_httpserver
+
+ [ "$enable" -eq 0 ] && exit 0
+
+ ln -s "$path1" /tmp/etc/thunder_mounts.cfg
+ ln -s "$path2" /tmp/etc/etm.cfg
+ ln -s "$path3" /tmp/etc/download.cfg
+
+ $file/xunlei/portal
+ sleep 3
+ renice -n 19 $(pidof EmbedThunderManager)
+}
+
+stop() {
+ file=$(uci get xunlei.config.file)
+ $file/xunlei/portal -s
+}
+
+restart() {
+ stop
+ sleep 1
+ start
+}
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/uci-defaults/luci-xunlei b/package/zxlhhyccc/luci-app-xunlei/root/etc/uci-defaults/luci-xunlei
new file mode 100644
index 0000000000..3d2c0c992c
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/uci-defaults/luci-xunlei
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@xunlei[-1]
+ add ucitrack xunlei
+ set ucitrack.@xunlei[-1].init=xunlei
+ commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcahe
+exit 0
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/cfg b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/cfg
new file mode 100644
index 0000000000..9b76849061
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/cfg
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+
+device=$(uci get xunlei.config.device)
+file=$(uci get xunlei.config.file)
+mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
+
+[ -f "$file/xunlei/cfg/thunder_mounts.cfg" ] && cfg="$file/xunlei/cfg/thunder_mounts.cfg"
+[ ! -f "$cfg" ] && {
+ cfg="/$file/xunlei/cfg/thunder_mounts.cfg"
+
+cat > "$cfg" << EOF
+avaliable_mount_path_pattern
+{
+$mountpoint
+}
+
+EOF
+ }
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlatest b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlatest
new file mode 100644
index 0000000000..9c76c5876f
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlatest
@@ -0,0 +1,10 @@
+#!/bin/sh /etc/rc.common
+
+VERSION=`wget -qO- http://dl.lazyzhu.com/file/Thunder/Xware/latest`
+sleep 3 && killall wget
+xl_configfile="/tmp/etc/xlver"
+[ ! -f "$xl_configfile" ] && touch "$xl_configfile"
+cat > "$xl_configfile" << EOF
+$VERSION
+EOF
+
diff --git a/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlup b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlup
new file mode 100644
index 0000000000..ca2745539f
--- /dev/null
+++ b/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/xlup
@@ -0,0 +1,43 @@
+#!/bin/sh /etc/rc.common
+
+device=$(uci get xunlei.config.device)
+file=$(uci get xunlei.config.file)
+mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
+DIR=$file/xunlei
+$DIR/portal -s
+sleep 1
+mkdir -p ${DIR}/cfg
+cd ${DIR}
+FILES=$(uci get xunlei.config.xware)
+ver=$(uci get xunlei.config.ver)
+url=$(uci get xunlei.config.url)
+zversion=$(uci get xunlei.config.zversion)
+VERSION=$(wget --no-check-certificate -O- ${url}/latest)
+
+{
+ if [ "$zversion" -eq 1 ];then
+ wget --no-check-certificate ${url}/${ver}/${FILES}
+ else
+ wget --no-check-certificate ${url}/${VERSION}/${FILES}
+ fi
+}
+
+{
+xl_configfile="/tmp/etc/xlver"
+[ ! -f "$xl_configfile" ] && touch "$xl_configfile"
+
+cat > "$xl_configfile" << EOF
+$VERSION
+EOF
+}
+
+rm -rf $DIR/portal && rm -rf $DIR/lib && tar zxvf ${FILES}
+chmod +x $DIR/* && chmod +x $DIR/lib/*
+rm -rf ${FILES}
+rm -rf $file/xunlei/cfg/thunder_mounts.cfg>> /dev/null 2>&1
+uci set xunlei.config.up=0>> /dev/null 2>&1
+uci commit 2>&1 > /dev/null
+vod=$(uci get xunlei.config.vod)
+[ "$vod" -eq 1 ] && rm -f "$file"/xunlei/vod_httpserver
+[ "$vod" -eq 1 ] && rm -f "$file"/xunlei/lib/vod_httpserver
+sleep 3 && killall wget
diff --git a/package/zxlhhyccc/pfring/Makefile b/package/zxlhhyccc/pfring/Makefile
new file mode 100644
index 0000000000..7eae390f8d
--- /dev/null
+++ b/package/zxlhhyccc/pfring/Makefile
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2017 Banglang Huang
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=pf-ring
+PKG_VERSION:=7.4.0
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Banglang Huang
+PKG_LICENSE:=GPL-2.0-only
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=kernel
+MAKE_PATH:=kernel
+
+define KernelPackage/pf-ring
+ SUBMENU:=Network Support
+ TITLE:=PF_RING Kernel driver
+ FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
+ AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
+endef
+
+define KernelPackage/pf-ring/description
+ Kernel module for libpf-ring package
+endef
+
+EXTRA_CFLAGS += \
+ -I$(PKG_BUILD_DIR)/kernel
+
+MAKE_OPTS := \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/linux
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
+endef
+
+define Build/Compile
+ +$(MAKE) -C "$(LINUX_DIR)" \
+ $(MAKE_OPTS) \
+ modules
+endef
+
+$(eval $(call KernelPackage,pf-ring))
diff --git a/package/zxlhhyccc/phicomm-k3screenctrl/Makefile b/package/zxlhhyccc/phicomm-k3screenctrl/Makefile
new file mode 100644
index 0000000000..974748184d
--- /dev/null
+++ b/package/zxlhhyccc/phicomm-k3screenctrl/Makefile
@@ -0,0 +1,63 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=phicomm-k3screenctrl
+PKG_VERSION:=1.0
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+#PKG_SOURCE_URL:=https://github.com/Hill-98/k3screenctrl
+#PKG_SOURCE_VERSION:=3257090decf7de1e70ef6e7bf28d0491ffe78854
+PKG_SOURCE_URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl.git
+PKG_SOURCE_VERSION:=81c1cb35022082262c28e87b5b0d7141d0d2432b
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+
+PKG_MAINTAINER:=Hamster Tian
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS+= -D_GNU_SOURCE
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash
+ TITLE:=LCD screen controller on PHICOMM K3
+ URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl
+endef
+
+define Package/$(PKG_NAME)/description
+ K3 Screen Controller (k3screenctrl) is a program utilizing
+the LCD screen on PHICOMM K3 to display some stats.
+endef
+
+define Package/$(PKG_NAME)/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ if [ -f /etc/uci-defaults/k3screenctrl ]; then
+ ( . /etc/uci-defaults/k3screenctrl ) && \
+ rm -f /etc/uci-defaults/k3screenctrl
+ fi
+ rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
+fi
+exit 0
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/lib/k3screenctrl
+ $(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/update_oui.sh $(1)/lib/k3screenctrl/oui/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
+ $(INSTALL_DATA) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
+ $(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
+ $(INSTALL_BIN) ./files/k3screenctrl.uci $(1)/etc/uci-defaults/k3screenctrl
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.config b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.config
new file mode 100644
index 0000000000..aed7ad72d1
--- /dev/null
+++ b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.config
@@ -0,0 +1,11 @@
+config general
+ option screen_time '10'
+ option refresh_time '5'
+ option pawd_hide '1'
+ option disp_cputemp '1'
+ option psk_hide '1'
+ option cputemp '1'
+ option city_checkip '1'
+ option update_time '3600'
+
+
diff --git a/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.init b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.init
new file mode 100644
index 0000000000..e56e4a5a2e
--- /dev/null
+++ b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.init
@@ -0,0 +1,27 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=99
+
+SCRIPTS_BASE=/lib/k3screenctrl/
+TEMP_DIR=/tmp/k3screenctrl
+
+start() {
+ [ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
+ mkdir -p $TEMP_DIR
+ mkdir -p $TEMP_DIR/device_speed
+ [ -z "$(iptables --list | grep K3_SEREEN_U)" ] && iptables -N K3_SEREEN_U
+ [ -z "$(iptables --list | grep K3_SEREEN_D)" ] && iptables -N K3_SEREEN_D
+ $SCRIPTS_BASE"device_custom.sh"
+ $SCRIPTS_BASE"device_online.sh" &
+ # [ -z "$(grep "/lib/k3screenctrl/device_online.sh" /etc/crontabs/root)" ] && echo "*/5 * * * * /lib/k3screenctrl/device_online.sh" >> /etc/crontabs/root
+ m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
+ d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 2 ] && d=2
+ /usr/bin/k3screenctrl -m $m -d $d &
+}
+
+stop() {
+ killall k3screenctrl device_online.sh
+ kill -9 $(pidof device_online.sh) >/dev/null 2>&1
+ rm -rf $TEMP_DIR
+}
diff --git a/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.uci b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.uci
new file mode 100644
index 0000000000..73da7aadcc
--- /dev/null
+++ b/package/zxlhhyccc/phicomm-k3screenctrl/files/k3screenctrl.uci
@@ -0,0 +1,8 @@
+#!/bin/sh
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@k3screenctrl[-1]
+ add ucitrack k3screenctrl
+ set ucitrack.@k3screenctrl[-1].init=k3screenctrl
+ commit ucitrack
+EOF
+exit 0
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/Makefile b/package/zxlhhyccc/phicommk3-screenctrl/Makefile
new file mode 100644
index 0000000000..d6adb7672b
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/Makefile
@@ -0,0 +1,61 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=phicommk3-screenctrl
+PKG_VERSION:=1.0
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/zxlhhyccc/k3screenctrl-6.git
+PKG_SOURCE_VERSION:=6bbb319f74567f58122ec14227c0147be5da4cc0
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+
+PKG_MAINTAINER:=Hamster Tian
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS+= -D_GNU_SOURCE
+
+define Package/$(PKG_NAME)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash
+ TITLE:=LCD screen controller on PHICOMM K3
+ URL:=https://github.com/zxlhhyccc/PHICOMM-K3
+endef
+
+define Package/$(PKG_NAME)/description
+ K3 Screen Controller (k3screenctrl) is a program utilizing
+the LCD screen on PHICOMM K3 to display some stats.
+endef
+
+define Package/$(PKG_NAME)/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ if [ -f /etc/uci-defaults/k3screenctrl ]; then
+ ( . /etc/uci-defaults/k3screenctrl ) && \
+ rm -f /etc/uci-defaults/k3screenctrl
+ fi
+ rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
+fi
+exit 0
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/lib/k3screenctrl
+ $(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/update_oui.sh $(1)/lib/k3screenctrl/oui/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
+ $(INSTALL_DATA) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
+ $(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
+ $(INSTALL_BIN) ./files/k3screenctrl.uci $(1)/etc/uci-defaults/k3screenctrl
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.config b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.config
new file mode 100644
index 0000000000..aed7ad72d1
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.config
@@ -0,0 +1,11 @@
+config general
+ option screen_time '10'
+ option refresh_time '5'
+ option pawd_hide '1'
+ option disp_cputemp '1'
+ option psk_hide '1'
+ option cputemp '1'
+ option city_checkip '1'
+ option update_time '3600'
+
+
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.init b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.init
new file mode 100644
index 0000000000..f4300ffc1e
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.init
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=99
+
+SCRIPTS_BASE=/lib/k3screenctrl/
+TEMP_DIR=/tmp/k3screenctrl
+
+start() {
+ [ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
+ mkdir -p $TEMP_DIR
+ mkdir -p $TEMP_DIR/device_speed
+ m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
+ d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 2 ] && d=2
+ /usr/bin/k3screenctrl -m $m -d $d &
+}
+
+stop() {
+ killall k3screenctrl
+}
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.uci b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.uci
new file mode 100644
index 0000000000..73da7aadcc
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/files/k3screenctrl.uci
@@ -0,0 +1,8 @@
+#!/bin/sh
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@k3screenctrl[-1]
+ add ucitrack k3screenctrl
+ set ucitrack.@k3screenctrl[-1].init=k3screenctrl
+ commit ucitrack
+EOF
+exit 0
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.config b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.config
new file mode 100644
index 0000000000..2a88ab3601
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.config
@@ -0,0 +1,6 @@
+
+config general 'general'
+ option screen_time '10'
+ option refresh_time '2'
+ option psk_hide '0'
+ option cputemp '0'
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.init b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.init
new file mode 100644
index 0000000000..70a92a6998
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.init
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=99
+
+SCRIPTS_BASE=/lib/k3screenctrl/
+
+start() {
+ [ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
+ /usr/bin/k3screenctrl &
+}
+
+stop() {
+ killall k3screenctrl
+}
diff --git a/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.uci b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.uci
new file mode 100644
index 0000000000..73da7aadcc
--- /dev/null
+++ b/package/zxlhhyccc/phicommk3-screenctrl/k3screenctrl.uci
@@ -0,0 +1,8 @@
+#!/bin/sh
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@k3screenctrl[-1]
+ add ucitrack k3screenctrl
+ set ucitrack.@k3screenctrl[-1].init=k3screenctrl
+ commit ucitrack
+EOF
+exit 0
diff --git a/package/zxlhhyccc/syncthing/Makefile b/package/zxlhhyccc/syncthing/Makefile
new file mode 100644
index 0000000000..dd5dcdbfc1
--- /dev/null
+++ b/package/zxlhhyccc/syncthing/Makefile
@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2015-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v3.
+#
+
+include $(TOPDIR)/rules.mk
+
+ifeq ($(ARCH),x86_64)
+ PKG_ARCH_SYNCTHING:=amd64
+endif
+ifeq ($(ARCH),mipsel)
+ PKG_ARCH_SYNCTHING:=mipsle
+endif
+ifeq ($(ARCH),mips)
+ PKG_ARCH_SYNCTHING:=mips
+endif
+ifeq ($(ARCH),i386)
+ PKG_ARCH_SYNCTHING:=386
+endif
+ifeq ($(ARCH),arm)
+ PKG_ARCH_SYNCTHING:=arm
+endif
+ifeq ($(ARCH),aarch64)
+ PKG_ARCH_SYNCTHING:=arm64
+endif
+
+PKG_NAME:=syncthing
+PKG_VERSION:=v1.2.0
+PKG_RELEASE:=2
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_SYNCTHING)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/$(PKG_VERSION)
+PKG_HASH:=skip
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=A continuous file synchronization program
+ DEPENDS:=
+ URL:=https://github.com/syncthing/syncthing
+endef
+
+define Package/$(PKG_NAME)/description
+ Syncthing is a continuous file synchronization program.
+endef
+
+define Build/Prepare
+ tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-linux-$(PKG_ARCH_SYNCTHING)-$(PKG_VERSION)/syncthing $(1)/usr/bin/syncthing
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/package/zxlhhyccc/transmission-web-control/Makefile b/package/zxlhhyccc/transmission-web-control/Makefile
new file mode 100644
index 0000000000..c9c490f92f
--- /dev/null
+++ b/package/zxlhhyccc/transmission-web-control/Makefile
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2018 OpenWrt-dist
+# Copyright (C) 2018 dz
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=transmission-web-control
+PKG_VERSION:=1.6.0-alpha
+PKG_REV:=bade4d9
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control.git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+PKG_LICENSE:=GPLv3
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=ronggang
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/transmission-web-control
+ SUBMENU:=BitTorrent
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=transmission-web-control
+ URL:=https://github.com/ronggang/transmission-web-control
+ DEPENDS:=
+endef
+
+define Package/$(PKG_NAME)/description
+transmission-web-control
+endef
+
+
+
+define Build/Compile
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/share/transmission
+ $(CP) -r $(PKG_BUILD_DIR)/src $(1)/usr/share/transmission/web
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/package/zxlhhyccc/verysync/Makefile b/package/zxlhhyccc/verysync/Makefile
new file mode 100644
index 0000000000..1173e37c44
--- /dev/null
+++ b/package/zxlhhyccc/verysync/Makefile
@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2015-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v3.
+#
+
+include $(TOPDIR)/rules.mk
+
+ifeq ($(ARCH),x86_64)
+ PKG_ARCH_VERYSYNC:=amd64
+endif
+ifeq ($(ARCH),mipsel)
+ PKG_ARCH_VERYSYNC:=mipsle
+endif
+ifeq ($(ARCH),mips)
+ PKG_ARCH_VERYSYNC:=mips
+endif
+ifeq ($(ARCH),i386)
+ PKG_ARCH_VERYSYNC:=386
+endif
+ifeq ($(ARCH),arm)
+ PKG_ARCH_VERYSYNC:=arm
+endif
+ifeq ($(ARCH),aarch64)
+ PKG_ARCH_VERYSYNC:=arm64
+endif
+
+PKG_NAME:=verysync
+PKG_VERSION:=v1.0.10
+PKG_RELEASE:=2
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://releases-cdn.verysync.com/releases/$(PKG_VERSION)/
+PKG_HASH:=skip
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=A efficient data transmission tool
+ DEPENDS:=
+ URL:=http://www.verysync.com
+endef
+
+define Package/$(PKG_NAME)/description
+ Verysync is a efficient data transmission tool.
+endef
+
+define Build/Prepare
+ tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION)/verysync $(1)/usr/bin/verysync
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))