Merge Mainline

This commit is contained in:
AmadeusGhost 2020-06-04 18:38:04 +08:00
commit db3b7c767b
60 changed files with 1916 additions and 124 deletions

View File

@ -15,7 +15,7 @@ Has access to both ChinaNet & Internet
```bash
sudo apt-get update -y
sudo apt-get full-upgrade -y
sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python python3 python-pip python3-pip python-ply python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf ecj fastjar
sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python python3 python-pip python3-pip python-ply python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool
```
#### For mainland China & Ubuntu(16.04+) user, you may run the following command to setup quickly:
```bash
@ -24,7 +24,7 @@ sudo bash -c "bash <(curl -s https://build-scripts.project-openwrt.eu.org/init_b
## Clone the source
```bash
git clone -b openwrt-18.06 --single-branch https://github.com/project-openwrt/openwrt && cd openwrt
git clone -b 18.06-kernel5.4 --single-branch https://github.com/project-openwrt/openwrt && cd openwrt
./scripts/feeds update -a && ./scripts/feeds install -a
```
#### For developer, you may use `openwrt-18.06-dev` branch instead of `openwrt-18.06`.

View File

@ -50,6 +50,7 @@ endef
dl_pack/bz2=bzip2 -c > $(1)
dl_pack/gz=gzip -nc > $(1)
dl_pack/xz=xz -zc -7e > $(1)
dl_pack/zst=zstd -T0 --ultra -20 -c > $(1)
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
define dl_pack
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))

View File

@ -70,7 +70,7 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG
$(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
$(TAR) c -C $(KERNEL_BUILD_DIR) debug \
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
| bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
| zstd -T0 -f -o $(BIN_DIR)/kernel-debug.tar.zst
endef
endif

View File

@ -6,14 +6,14 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-4.9 = .224
LINUX_VERSION-4.14 = .181
LINUX_VERSION-4.19 = .124
LINUX_VERSION-4.9 = .225
LINUX_VERSION-4.14 = .182
LINUX_VERSION-4.19 = .125
LINUX_VERSION-5.4 = .43
LINUX_KERNEL_HASH-4.9.224 = df6d07e99513f9afadd7d44c471f44c56fccc9e4c984a1ba4b988f053a13c949
LINUX_KERNEL_HASH-4.14.181 = ab9bea577cfe59fb2f502ce4d6130bfb49163ef969364adc3d36a65721d64a4d
LINUX_KERNEL_HASH-4.19.124 = d5d9001879d7a77309dca203656490326d26b068b7b0b9d8003548dba8fdad00
LINUX_KERNEL_HASH-4.9.225 = e547748c548b0f55f665bc78cfec322e7b96f41527b5e4b5d79430fdaa57c3e8
LINUX_KERNEL_HASH-4.14.182 = 671d1f1d5ad0ae74fb21ee70a5544400e7d6270098d3f8b134484ded2c3e5b90
LINUX_KERNEL_HASH-4.19.125 = 9843f40efb37491770688810d153d0779daed8eb097773a0de5abf2cb0d1bd7e
LINUX_KERNEL_HASH-5.4.43 = 2667b90a42d42557aca9e3d37bba1b4e71809b9523958e6870ada311c4790744
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))

View File

@ -51,10 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
$(TMP_DIR)/a.out))
ifndef IB
$(eval $(call TestHostCommand,ncurses, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
endif
ifeq ($(HOST_OS),Linux)
zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic
@ -62,6 +64,10 @@ else
zlib_link_flags := -lz
endif
$(eval $(call TestHostCommand,perl-data-dumper, \
Please install the Perl Data::Dumper module, \
perl -MData::Dumper -e 1))
$(eval $(call TestHostCommand,perl-thread-queue, \
Please install the Perl Thread::Queue module, \
perl -MThread::Queue -e 1))

View File

@ -31,6 +31,10 @@ ifeq ($(strip $(UNPACK_CMD)),)
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
endif
ifeq (zst,$(EXT))
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) |
endif
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
EXT:=tar
endif

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-plugin
PKG_VERSION:=1.3.0
PKG_VERSION:=1.3.1
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/shadowsocks/v2ray-plugin/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=dfb86cd8d9be86e665c4b86b68cd7037e4310de001656eef01ec9aeea71edd10
PKG_HASH:=86d37a8ecef82457b4750a1af9e8d093b25ae0d32ea7dcc2ad5c0068fe2d3d74
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

View File

@ -299,6 +299,24 @@ endef
$(eval $(call KernelPackage,gpio-pcf857x))
define KernelPackage/gpio-it87
SUBMENU:=$(OTHER_MENU)
DEPENDS:=@GPIO_SUPPORT @TARGET_x86
TITLE:=GPIO support for IT87xx Super I/O chips
KCONFIG:=CONFIG_GPIO_IT87
FILES:=$(LINUX_DIR)/drivers/gpio/gpio-it87.ko
AUTOLOAD:=$(call AutoLoad,25,gpio-it87,1)
endef
define KernelPackage/gpio-it87/description
This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and
supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as
well.
endef
$(eval $(call KernelPackage,gpio-it87))
define KernelPackage/ppdev
SUBMENU:=$(OTHER_MENU)
TITLE:=Parallel port support

View File

@ -1,8 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIDfTCCAmWgAwIBAgIJAKTlW9B59i1HMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
MIIDkjCCAnqgAwIBAgIJAK/bIUIlE36LMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
BAYTAkNOMSQwIgYDVQQDDBtVbmJsb2NrTmV0ZWFzZU11c2ljIFJvb3QgQ0ExHTAb
BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTE5MDUxODE2MDYxOFoXDTIw
MDUxNzE2MDYxOFowezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww
BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTIwMDUxNjE3MTIxM1oXDTIx
MDUxNjE3MTIxM1owezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww
KgYDVQQKDCNOZXRFYXNlIChIYW5nemhvdSkgTmV0d29yayBDby4sIEx0ZDERMA8G
A1UECwwISVQgRGVwdC4xGDAWBgNVBAMMDyoubXVzaWMuMTYzLmNvbTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBALobECypwEoe8VqM/FJvBRR3p2T+ZWdi
@ -10,12 +10,13 @@ MSPrwfiRJr5p7OMtWBlLveCBV85+R3feidYbQTXlvVTdToY+GN6mFE1x6zG2dvLD
s4UuRnipmvGcFYhIRTX8J4AJiN8VMtW0TNXscRMudpz/FAVtsRrggRaThYg4f/rI
oAPMqKMsS4JoYhxs9ED6E6/tpj3XmSg1ekaXhgacYSYHeyxizZwoOFVCLH3TG5sF
sD6CYNnukYol8bR+VRpvHftIYss5Yz+DyyhYEAMJm1CfQo+xoGR3D0ozbT3hUnzm
fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaMt
MCswKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNvbYIPKi5tdXNpYy4xNjMuY29tMA0G
CSqGSIb3DQEBCwUAA4IBAQB32SVz5jHUYv3ZG7SNF/LFJ904/LI8QlTe9R+Abb9z
bpXmQeo4pvNNOk3LgcTyuSIPQSHEFn32hk/MedB6Q2cKaGVKQq7Usne1jsV0JirG
wMx3PTcKPnX+XexRY8s6v6cNKSx5YlMQNFeH7p8MgKqdM/UX/dNCxT04X/ClmP1K
/rKqonXn4i3wmWprl7Q7Z1wqt0ygQRkNJKqdYKTu4oQcPON8/dRcseYdJzSoK2/G
H6cOJwKrRLzuUqQlphe6wyUsyTIbIJiFu1a1Gml6zB4lhLZhL89H2lYwdS8wWlc+
M+wYi+XTM/ylNHEIoKsOe2nscnwi/hTfHJOPPchHbEuM
fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaNC
MEAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNv
bYIPKi5tdXNpYy4xNjMuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQB+zW0o1169aGQI
7GA/8BQ769svpkpdy/lfvkokapFjzoxLTBQhjMo9rqzmGOwr9ksePwQqSDXn685W
mKnEl0CzhBrKnL5x3gHus8bg591xpW+01xAFXSyLITOfMJqMEdY7ylymkm0XZ3aN
vm+yFdP1fr/bZNw6Wrprg3i7eGhj7TdBXRA96usVgBcnCkC1SzEZfnDZsKl9o8Xx
TSOpvzIMSaD7++Bp7BdzA5oCCydv2c++zV/sgCPIr26Jq8UQac+qQP5SMlYyGbAl
vIQRRZyfQ4fPonYDnEPHWFCMyBkQIN39LMhDRsUgn8bT0rnP91xkNAd9S4VWbNDA
5TMiQy3F
-----END CERTIFICATE-----

View File

@ -9,31 +9,50 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autocore
PKG_VERSION:=1
PKG_RELEASE:=31
PKG_RELEASE:=32
include $(INCLUDE_DIR)/package.mk
define Package/autocore
define Package/autocore-raspberrypi
TITLE:=RaspberryPi auto core loadbalance script.
MAINTAINER:=CN_SZTL
DEPENDS:=@TARGET_bcm27xx +bcm27xx-userland
endef
define Package/autocore-x86
TITLE:=x86/x64 auto core loadbalance script.
MAINTAINER:=Lean
DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool
endef
define Package/autocore/description
A usb autoconfig hotplug script.
A usb autoconfig hotplug script.
endef
Package/autocore-x86/description = $(call Package/autocore/description)
Package/autocore-raspberrypi/description = $(call Package/autocore/description)
define Build/Compile
endef
define Package/autocore/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/autocore $(1)/etc/init.d/autocore
define Package/autocore-raspberrypi/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/index.htm $(1)/etc/index.htm
$(INSTALL_DATA) ./files/raspberrypi/index.htm $(1)/etc/index.htm
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/raspberrypi/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm
$(INSTALL_DIR) $(1)/sbin
$(CP) ./files/sbin/* $(1)/sbin
$(CP) ./files/raspberrypi/sbin/* $(1)/sbin
endef
$(eval $(call BuildPackage,autocore))
define Package/autocore-x86/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/autocore
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/x86/index.htm $(1)/etc/index.htm
$(INSTALL_DIR) $(1)/sbin
$(CP) ./files/x86/sbin/* $(1)/sbin
endef
$(eval $(call BuildPackage,autocore-raspberrypi))
$(eval $(call BuildPackage,autocore-x86))

View File

@ -0,0 +1,5 @@
#!/bin/sh
[ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm
exit 0

View File

@ -0,0 +1,811 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
-%>
<%
local fs = require "nixio.fs"
local util = require "luci.util"
local stat = require "luci.tools.status"
local ver = require "luci.version"
local has_ipv6 = fs.access("/usr/sbin/ip6tables")
local has_dhcp = fs.access("/etc/config/dhcp")
local has_wifi = ((fs.stat("/etc/config/wireless", "size") or 0) > 0)
local sysinfo = luci.util.ubus("system", "info") or { }
local boardinfo = luci.util.ubus("system", "board") or { }
local unameinfo = nixio.uname() or { }
local meminfo = sysinfo.memory or {
total = 0,
free = 0,
buffered = 0,
shared = 0
}
local mem_cached = luci.sys.exec("sed -e '/^Cached: /!d; s#Cached: *##; s# kB##g' /proc/meminfo")
local swapinfo = sysinfo.swap or {
total = 0,
free = 0
}
local has_dsl = fs.access("/etc/init.d/dsl_control")
if luci.http.formvalue("status") == "1" then
local ntm = require "luci.model.network".init()
local wan = ntm:get_wannet()
local wan6 = ntm:get_wan6net()
local conn_count = tonumber(
fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count") or "") or 0
local conn_max = tonumber(luci.sys.exec(
"sysctl -n -e net.nf_conntrack_max net.ipv4.netfilter.ip_conntrack_max"
):match("%d+")) or 4096
local user_info = luci.sys.exec("cat /proc/net/arp | grep 'br-lan' | grep '0x2' | wc -l")
local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}')") or "6") .. "%"
local rv = {
cpuusage = cpu_usage,
userinfo = user_info,
systemp = sys_temp,
uptime = sysinfo.uptime or 0,
localtime = os.date(),
loadavg = sysinfo.load or { 0, 0, 0 },
memory = meminfo,
memcached = mem_cached,
swap = swapinfo,
connmax = conn_max,
conncount = conn_count,
leases = stat.dhcp_leases(),
leases6 = stat.dhcp6_leases(),
wifinets = stat.wifi_networks()
}
if wan then
rv.wan = {
ipaddr = wan:ipaddr(),
gwaddr = wan:gwaddr(),
netmask = wan:netmask(),
dns = wan:dnsaddrs(),
expires = wan:expires(),
uptime = wan:uptime(),
proto = wan:proto(),
ifname = wan:ifname(),
link = wan:adminlink()
}
end
if wan6 then
rv.wan6 = {
ip6addr = wan6:ip6addr(),
gw6addr = wan6:gw6addr(),
dns = wan6:dns6addrs(),
ip6prefix = wan6:ip6prefix(),
uptime = wan6:uptime(),
proto = wan6:proto(),
ifname = wan6:ifname(),
link = wan6:adminlink()
}
end
if has_dsl then
local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
local dsl_func = loadstring(dsl_stat)
if dsl_func then
rv.dsl = dsl_func()
end
end
luci.http.prepare_content("application/json")
luci.http.write_json(rv)
return
elseif luci.http.formvalue("hosts") == "1" then
luci.http.prepare_content("application/json")
luci.http.write_json(luci.sys.net.host_hints())
return
end
-%>
<%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[
function progressbar(v, m)
{
var vn = parseInt(v) || 0;
var mn = parseInt(m) || 100;
var pc = Math.floor((100 / mn) * vn);
return String.format(
'<div style="width:200px; position:relative; border:1px solid #999999">' +
'<div style="background-color:#CCCCCC; width:%d%%; height:15px">' +
'<div style="position:absolute; left:0; top:0; text-align:center; width:100%%; color:#000000">' +
'<small>%s / %s (%d%%)</small>' +
'</div>' +
'</div>' +
'</div>', pc, v, m, pc
);
}
function wifirate(bss, rx) {
var p = rx ? 'rx_' : 'tx_',
s = '%.1f <%:Mbit/s%>, %d<%:MHz%>'
.format(bss[p+'rate'] / 1000, bss[p+'mhz']),
ht = bss[p+'ht'], vht = bss[p+'vht'],
mhz = bss[p+'mhz'], nss = bss[p+'nss'],
mcs = bss[p+'mcs'], sgi = bss[p+'short_gi'];
if (ht || vht) {
if (vht) s += ', VHT-MCS %d'.format(mcs);
if (nss) s += ', VHT-NSS %d'.format(nss);
if (ht) s += ', MCS %s'.format(mcs);
if (sgi) s += ', <%:Short GI%>';
}
return s;
}
function duid2mac(duid) {
// DUID-LLT / Ethernet
if (duid.length === 28 && duid.substr(0, 8) === '00010001')
return duid.substr(16).replace(/(..)(?=..)/g, '$1:').toUpperCase();
// DUID-LL / Ethernet
if (duid.length === 20 && duid.substr(0, 8) === '00030001')
return duid.substr(8).replace(/(..)(?=..)/g, '$1:').toUpperCase();
return null;
}
var npoll = 1;
var hosts = <%=luci.http.write_json(luci.sys.net.host_hints())%>;
function updateHosts() {
XHR.get('<%=REQUEST_URI%>', { hosts: 1 }, function(x, data) {
hosts = data;
});
}
XHR.poll(5, '<%=REQUEST_URI%>', { status: 1 },
function(x, info)
{
if (!(npoll++ % 5))
updateHosts();
var si = document.getElementById('wan4_i');
var ss = document.getElementById('wan4_s');
var ifc = info.wan;
if (ifc && ifc.ifname && ifc.proto != 'none')
{
var s = String.format(
'<strong><%:Type%>: </strong>%s<br />' +
'<strong><%:Address%>: </strong>%s<br />' +
'<strong><%:Netmask%>: </strong>%s<br />' +
'<strong><%:Gateway%>: </strong>%s<br />',
ifc.proto,
(ifc.ipaddr) ? ifc.ipaddr : '0.0.0.0',
(ifc.netmask && ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
(ifc.gwaddr) ? ifc.gwaddr : '0.0.0.0'
);
for (var i = 0; i < ifc.dns.length; i++)
{
s += String.format(
'<strong><%:DNS%> %d: </strong>%s<br />',
i + 1, ifc.dns[i]
);
}
if (ifc.expires > -1)
{
s += String.format(
'<strong><%:Expires%>: </strong>%t<br />',
ifc.expires
);
}
if (ifc.uptime > 0)
{
s += String.format(
'<strong><%:Connected%>: </strong>%t<br />',
ifc.uptime
);
}
ss.innerHTML = String.format('<small>%s</small>', s);
si.innerHTML = String.format(
'<img src="<%=resource%>/icons/ethernet.png" />' +
'<br /><small><a href="%s">%s</a></small>',
ifc.link, ifc.ifname
);
}
else
{
si.innerHTML = '<img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small>';
ss.innerHTML = '<em><%:Not connected%></em>';
}
<% if has_ipv6 then %>
var si6 = document.getElementById('wan6_i');
var ss6 = document.getElementById('wan6_s');
var ifc6 = info.wan6;
if (ifc6 && ifc6.ifname && ifc6.proto != 'none')
{
var s = String.format(
'<strong><%:Type%>: </strong>%s%s<br />',
ifc6.proto, (ifc6.ip6prefix) ? '-pd' : ''
);
if (!ifc6.ip6prefix)
{
s += String.format(
'<strong><%:Address%>: </strong>%s<br />',
(ifc6.ip6addr) ? ifc6.ip6addr : '::'
);
}
else
{
s += String.format(
'<strong><%:Prefix Delegated%>: </strong>%s<br />',
ifc6.ip6prefix
);
if (ifc6.ip6addr)
{
s += String.format(
'<strong><%:Address%>: </strong>%s<br />',
ifc6.ip6addr
);
}
}
s += String.format(
'<strong><%:Gateway%>: </strong>%s<br />',
(ifc6.gw6addr) ? ifc6.gw6addr : '::'
);
for (var i = 0; i < ifc6.dns.length; i++)
{
s += String.format(
'<strong><%:DNS%> %d: </strong>%s<br />',
i + 1, ifc6.dns[i]
);
}
if (ifc6.uptime > 0)
{
s += String.format(
'<strong><%:Connected%>: </strong>%t<br />',
ifc6.uptime
);
}
ss6.innerHTML = String.format('<small>%s</small>', s);
si6.innerHTML = String.format(
'<img src="<%=resource%>/icons/ethernet.png" />' +
'<br /><small><a href="%s">%s</a></small>',
ifc6.link, ifc6.ifname
);
}
else
{
si6.innerHTML = '<img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small>';
ss6.innerHTML = '<em><%:Not connected%></em>';
}
<% end %>
<% if has_dsl then %>
var dsl_i = document.getElementById('dsl_i');
var dsl_s = document.getElementById('dsl_s');
var s = String.format(
'<strong><%:Status%>: </strong>%s<br />' +
'<strong><%:Line State%>: </strong>%s [0x%x]<br />' +
'<strong><%:Line Mode%>: </strong>%s<br />' +
'<strong><%:Annex%>: </strong>%s<br />' +
'<strong><%:Profile%>: </strong>%s<br />' +
'<strong><%:Data Rate%>: </strong>%s/s / %s/s<br />' +
'<strong><%:Max. Attainable Data Rate (ATTNDR)%>: </strong>%s/s / %s/s<br />' +
'<strong><%:Latency%>: </strong>%s / %s<br />' +
'<strong><%:Line Attenuation (LATN)%>: </strong>%s dB / %s dB<br />' +
'<strong><%:Signal Attenuation (SATN)%>: </strong>%s dB / %s dB<br />' +
'<strong><%:Noise Margin (SNR)%>: </strong>%s dB / %s dB<br />' +
'<strong><%:Aggregate Transmit Power(ACTATP)%>: </strong>%s dB / %s dB<br />' +
'<strong><%:Forward Error Correction Seconds (FECS)%>: </strong>%s / %s<br />' +
'<strong><%:Errored seconds (ES)%>: </strong>%s / %s<br />' +
'<strong><%:Severely Errored Seconds (SES)%>: </strong>%s / %s<br />' +
'<strong><%:Loss of Signal Seconds (LOSS)%>: </strong>%s / %s<br />' +
'<strong><%:Unavailable Seconds (UAS)%>: </strong>%s / %s<br />' +
'<strong><%:Header Error Code Errors (HEC)%>: </strong>%s / %s<br />' +
'<strong><%:Non Pre-emtive CRC errors (CRC_P)%>: </strong>%s / %s<br />' +
'<strong><%:Pre-emtive CRC errors (CRCP_P)%>: </strong>%s / %s<br />' +
'<strong><%:Line Uptime%>: </strong>%s<br />' +
'<strong><%:ATU-C System Vendor ID%>: </strong>%s<br />' +
'<strong><%:Power Management Mode%>: </strong>%s<br />',
info.dsl.line_state, info.dsl.line_state_detail,
info.dsl.line_state_num,
info.dsl.line_mode_s,
info.dsl.annex_s,
info.dsl.profile_s,
info.dsl.data_rate_down_s, info.dsl.data_rate_up_s,
info.dsl.max_data_rate_down_s, info.dsl.max_data_rate_up_s,
info.dsl.latency_num_down, info.dsl.latency_num_up,
info.dsl.line_attenuation_down, info.dsl.line_attenuation_up,
info.dsl.signal_attenuation_down, info.dsl.signal_attenuation_up,
info.dsl.noise_margin_down, info.dsl.noise_margin_up,
info.dsl.actatp_down, info.dsl.actatp_up,
info.dsl.errors_fec_near, info.dsl.errors_fec_far,
info.dsl.errors_es_near, info.dsl.errors_es_far,
info.dsl.errors_ses_near, info.dsl.errors_ses_far,
info.dsl.errors_loss_near, info.dsl.errors_loss_far,
info.dsl.errors_uas_near, info.dsl.errors_uas_far,
info.dsl.errors_hec_near, info.dsl.errors_hec_far,
info.dsl.errors_crc_p_near, info.dsl.errors_crc_p_far,
info.dsl.errors_crcp_p_near, info.dsl.errors_crcp_p_far,
info.dsl.line_uptime_s,
info.dsl.atuc_vendor_id,
info.dsl.power_mode_s
);
dsl_s.innerHTML = String.format('<small>%s</small>', s);
dsl_i.innerHTML = String.format(
'<img src="<%=resource%>/icons/ethernet.png" />' +
'<br /><small>DSL</small>'
);
<% end %>
<% if has_dhcp then %>
var ls = document.getElementById('lease_status_table');
if (ls)
{
/* clear all rows */
while( ls.rows.length > 1 )
ls.rows[0].parentNode.deleteRow(1);
for( var i = 0; i < info.leases.length; i++ )
{
var timestr;
if (info.leases[i].expires === false)
timestr = '<em><%:unlimited%></em>';
else if (info.leases[i].expires <= 0)
timestr = '<em><%:expired%></em>';
else
timestr = String.format('%t', info.leases[i].expires);
var tr = ls.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
tr.insertCell(-1).innerHTML = info.leases[i].hostname ? info.leases[i].hostname : '?';
tr.insertCell(-1).innerHTML = info.leases[i].ipaddr;
tr.insertCell(-1).innerHTML = info.leases[i].macaddr;
tr.insertCell(-1).innerHTML = timestr;
}
if( ls.rows.length == 1 )
{
var tr = ls.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row';
var td = tr.insertCell(-1);
td.colSpan = 4;
td.innerHTML = '<em><br /><%:There are no active leases.%></em>';
}
}
var ls6 = document.getElementById('lease6_status_table');
if (ls6 && info.leases6)
{
ls6.parentNode.style.display = 'block';
/* clear all rows */
while( ls6.rows.length > 1 )
ls6.rows[0].parentNode.deleteRow(1);
for( var i = 0; i < info.leases6.length; i++ )
{
var timestr;
if (info.leases6[i].expires === false)
timestr = '<em><%:unlimited%></em>';
else if (info.leases6[i].expires <= 0)
timestr = '<em><%:expired%></em>';
else
timestr = String.format('%t', info.leases6[i].expires);
var tr = ls6.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
var host = hosts[duid2mac(info.leases6[i].duid)];
if (!info.leases6[i].hostname)
tr.insertCell(-1).innerHTML =
(host && (host.name || host.ipv4 || host.ipv6))
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">? (%h)</div>'.format(host.name || host.ipv4 || host.ipv6)
: '?';
else
tr.insertCell(-1).innerHTML =
(host && host.name && info.leases6[i].hostname != host.name)
? '<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap">%h (%h)</div>'.format(info.leases6[i].hostname, host.name)
: info.leases6[i].hostname;
tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr;
tr.insertCell(-1).innerHTML = info.leases6[i].duid;
tr.insertCell(-1).innerHTML = timestr;
}
if( ls6.rows.length == 1 )
{
var tr = ls6.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row';
var td = tr.insertCell(-1);
td.colSpan = 4;
td.innerHTML = '<em><br /><%:There are no active leases.%></em>';
}
}
<% end %>
<% if has_wifi then %>
var assoclist = [ ];
var ws = document.getElementById('wifi_status_table');
if (ws)
{
var wsbody = ws.rows[0].parentNode;
while (ws.rows.length > 0)
wsbody.deleteRow(0);
for (var didx = 0; didx < info.wifinets.length; didx++)
{
var dev = info.wifinets[didx];
var tr = wsbody.insertRow(-1);
var td;
td = tr.insertCell(-1);
td.width = "33%";
td.innerHTML = dev.name;
td.style.verticalAlign = "top";
td = tr.insertCell(-1);
var s = '';
for (var nidx = 0; nidx < dev.networks.length; nidx++)
{
var net = dev.networks[nidx];
var is_assoc = (net.bssid != '00:00:00:00:00:00' && net.channel && !net.disabled);
var icon;
if (!is_assoc)
icon = "<%=resource%>/icons/signal-none.png";
else if (net.quality == 0)
icon = "<%=resource%>/icons/signal-0.png";
else if (net.quality < 25)
icon = "<%=resource%>/icons/signal-0-25.png";
else if (net.quality < 50)
icon = "<%=resource%>/icons/signal-25-50.png";
else if (net.quality < 75)
icon = "<%=resource%>/icons/signal-50-75.png";
else
icon = "<%=resource%>/icons/signal-75-100.png";
s += String.format(
'<table><tr><td style="text-align:center; width:32px; padding:3px">' +
'<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" />' +
'<br /><small>%d%%</small>' +
'</td><td style="text-align:left; padding:3px"><small>' +
'<strong><%:SSID%>:</strong> <a href="%s">%h</a><br />' +
'<strong><%:Mode%>:</strong> %s<br />' +
'<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>)<br />' +
'<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%><br />',
icon, net.signal, net.noise,
net.quality,
net.link, net.ssid || '?',
net.mode,
net.channel, net.frequency,
net.bitrate || '?'
);
if (is_assoc)
{
s += String.format(
'<strong><%:BSSID%>:</strong> %s<br />' +
'<strong><%:Encryption%>:</strong> %s',
net.bssid || '?',
net.encryption
);
}
else
{
s += '<em><%:Wireless is disabled or not associated%></em>';
}
s += '</small></td></tr></table>';
for (var bssid in net.assoclist)
{
var bss = net.assoclist[bssid];
bss.bssid = bssid;
bss.link = net.link;
bss.name = net.name;
bss.ifname = net.ifname;
bss.radio = dev.name;
assoclist.push(bss);
}
}
if (!s)
s = '<em><%:No information available%></em>';
td.innerHTML = s;
}
}
var ac = document.getElementById('wifi_assoc_table');
if (ac)
{
/* clear all rows */
while( ac.rows.length > 1 )
ac.rows[0].parentNode.deleteRow(1);
assoclist.sort(function(a, b) {
return (a.name == b.name)
? (a.bssid < b.bssid)
: (a.name > b.name )
;
});
for( var i = 0; i < assoclist.length; i++ )
{
var tr = ac.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2));
var icon;
var q = (-1 * (assoclist[i].noise - assoclist[i].signal)) / 5;
if (q < 1)
icon = "<%=resource%>/icons/signal-0.png";
else if (q < 2)
icon = "<%=resource%>/icons/signal-0-25.png";
else if (q < 3)
icon = "<%=resource%>/icons/signal-25-50.png";
else if (q < 4)
icon = "<%=resource%>/icons/signal-50-75.png";
else
icon = "<%=resource%>/icons/signal-75-100.png";
tr.insertCell(-1).innerHTML = String.format(
'<span class="ifacebadge" title="%q"><img src="<%=resource%>/icons/wifi.png" /> %h</span>',
assoclist[i].radio, assoclist[i].ifname
);
tr.insertCell(-1).innerHTML = String.format(
'<a href="%s">%s</a>',
assoclist[i].link,
'%h'.format(assoclist[i].name).nobr()
);
tr.insertCell(-1).innerHTML = assoclist[i].bssid;
var host = hosts[assoclist[i].bssid];
if (host)
tr.insertCell(-1).innerHTML = String.format(
'<div style="max-width:200px;overflow:hidden;text-overflow:ellipsis">%s</div>',
((host.name && (host.ipv4 || host.ipv6))
? '%h (%s)'.format(host.name, host.ipv4 || host.ipv6)
: '%h'.format(host.name || host.ipv4 || host.ipv6)).nobr()
);
else
tr.insertCell(-1).innerHTML = '?';
tr.insertCell(-1).innerHTML = String.format(
'<span class="ifacebadge" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%> / <%:SNR%>: %d"><img src="%s" /> %d / %d <%:dBm%></span>',
assoclist[i].signal, assoclist[i].noise, assoclist[i].signal - assoclist[i].noise,
icon,
assoclist[i].signal, assoclist[i].noise
);
tr.insertCell(-1).innerHTML = wifirate(assoclist[i], true).nobr() + '<br />' + wifirate(assoclist[i], false).nobr();
}
if (ac.rows.length == 1)
{
var tr = ac.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row';
var td = tr.insertCell(-1);
td.colSpan = 7;
td.innerHTML = '<br /><em><%:No information available%></em>';
}
}
<% end %>
var e;
if (e = document.getElementById('localtime'))
e.innerHTML = info.localtime;
if (e = document.getElementById('uptime'))
e.innerHTML = String.format('%t', info.uptime);
if (e = document.getElementById('userinfo'))
e.innerHTML = info.userinfo;
if (e = document.getElementById('cpuusage'))
e.innerHTML = info.cpuusage;
if (e = document.getElementById('loadavg'))
e.innerHTML = String.format(
'%.02f, %.02f, %.02f',
info.loadavg[0] / 65535.0,
info.loadavg[1] / 65535.0,
info.loadavg[2] / 65535.0
);
if (e = document.getElementById('memtotal'))
e.innerHTML = progressbar(
Math.floor(((info.memory.free + info.memory.buffered) / 1048576) + (info.memcached / 1024)) + " <%:MB%>",
Math.floor(info.memory.total / 1048576) + " <%:MB%>"
);
if (e = document.getElementById('membuff'))
e.innerHTML = progressbar(
Math.floor(info.memory.buffered / 1048576) + " <%:MB%>",
Math.floor(info.memory.total / 1048576) + " <%:MB%>"
);
if (e = document.getElementById('swaptotal'))
e.innerHTML = progressbar(
Math.floor(info.swap.free / 1048576) + " <%:MB%>",
Math.floor(info.swap.total / 1048576) + " <%:MB%>"
);
if (e = document.getElementById('swapfree'))
e.innerHTML = progressbar(
Math.floor(info.swap.free / 1048576) + " <%:MB%>",
Math.floor(info.swap.total / 1048576) + " <%:MB%>"
);
if (e = document.getElementById('conns'))
e.innerHTML = progressbar(info.conncount, info.connmax);
}
);
//]]></script>
<h2 name="content"><%:Status%></h2>
<fieldset class="cbi-section">
<legend><%:System%></legend>
<table width="100%" cellspacing="10">
<tr><td width="33%"><%:Hostname%></td><td><%=luci.sys.hostname() or "?"%></td></tr>
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or ""%></td></tr>
<tr><td width="33%"><%:Architecture%></td><td><%=pcdata(boardinfo.system or "ARMv8 Processor")%> x <%=luci.sys.exec("cat /proc/cpuinfo | grep 'processor' | wc -l") or "1"%> <%=luci.sys.exec("cpuinfo") or ""%></td></tr>
<tr><td width="33%"><%:Firmware Version%></td><td>
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%><!-- /
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) !-->
</td></tr>
<tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></td></tr>
<tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
<tr><td width="33%"><%:Uptime%></td><td id="uptime">-</td></tr>
<tr><td width="33%"><%:Load Average%></td><td id="loadavg">-</td></tr>
<tr><td width="33%"><%:CPU usage (%)%></td><td id="cpuusage">-</td></tr>
</table>
</fieldset>
<fieldset class="cbi-section">
<legend><%:Memory%></legend>
<table width="100%" cellspacing="10">
<tr><td width="33%"><%:Total Available%></td><td id="memtotal">-</td></tr>
<tr><td width="33%"><%:Buffered%></td><td id="membuff">-</td></tr>
</table>
</fieldset>
<% if swapinfo.total > 0 then %>
<fieldset class="cbi-section">
<legend><%:Swap%></legend>
<table width="100%" cellspacing="10">
<tr><td width="33%"><%:Total Available%></td><td id="swaptotal">-</td></tr>
<tr><td width="33%"><%:Free%></td><td id="swapfree">-</td></tr>
</table>
</fieldset>
<% end %>
<fieldset class="cbi-section">
<legend><%:Network%></legend>
<table width="100%" cellspacing="10">
<tr><td width="33%" style="vertical-align:top"><%:IPv4 WAN Status%></td><td>
<table><tr>
<td id="wan4_i" style="width:16px; text-align:center; padding:3px"><img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small></td>
<td id="wan4_s" style="vertical-align:middle; padding: 3px"><em><%:Collecting data...%></em></td>
</tr></table>
</td></tr>
<% if has_ipv6 then %>
<tr><td width="33%" style="vertical-align:top"><%:IPv6 WAN Status%></td><td>
<table><tr>
<td id="wan6_i" style="width:16px; text-align:center; padding:3px"><img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small></td>
<td id="wan6_s" style="vertical-align:middle; padding: 3px"><em><%:Collecting data...%></em></td>
</tr></table>
</td></tr>
<% end %>
<tr><td width="33%"><%:Online Users%></td><td id="userinfo">0</td></tr>
<tr><td width="33%"><%:Active Connections%></td><td id="conns">-</td></tr>
</table>
</fieldset>
<% if has_dhcp then %>
<fieldset class="cbi-section">
<legend><%:DHCP Leases%></legend>
<table class="cbi-section-table" id="lease_status_table">
<tr class="cbi-section-table-titles">
<th class="cbi-section-table-cell"><%:Hostname%></th>
<th class="cbi-section-table-cell"><%:IPv4-Address%></th>
<th class="cbi-section-table-cell"><%:MAC-Address%></th>
<th class="cbi-section-table-cell"><%:Leasetime remaining%></th>
</tr>
<tr class="cbi-section-table-row">
<td colspan="4"><em><br /><%:Collecting data...%></em></td>
</tr>
</table>
</fieldset>
<% if has_ipv6 then %>
<fieldset class="cbi-section" style="display:none">
<legend><%:DHCPv6 Leases%></legend>
<table class="cbi-section-table" id="lease6_status_table">
<tr class="cbi-section-table-titles">
<th class="cbi-section-table-cell"><%:Host%></th>
<th class="cbi-section-table-cell"><%:IPv6-Address%></th>
<th class="cbi-section-table-cell"><%:DUID%></th>
<th class="cbi-section-table-cell"><%:Leasetime remaining%></th>
</tr>
<tr class="cbi-section-table-row">
<td colspan="4"><em><br /><%:Collecting data...%></em></td>
</tr>
</table>
</fieldset>
<% end %>
<% end %>
<% if has_dsl then %>
<fieldset class="cbi-section">
<legend><%:DSL%></legend>
<table width="100%" cellspacing="10">
<tr><td width="33%" style="vertical-align:top"><%:DSL Status%></td><td>
<table><tr>
<td id="dsl_i" style="width:16px; text-align:center; padding:3px"><img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small></td>
<td id="dsl_s" style="vertical-align:middle; padding: 3px"><em><%:Collecting data...%></em></td>
</tr></table>
</td></tr>
</table>
</fieldset>
<% end %>
<% if has_wifi then %>
<fieldset class="cbi-section">
<legend><%:Wireless%></legend>
<table id="wifi_status_table" width="100%" cellspacing="10">
<tr><td><em><%:Collecting data...%></em></td></tr>
</table>
</fieldset>
<% end %>
<%+footer%>

View File

@ -0,0 +1,11 @@
#!/bin/sh
if command -v vcgencmd >/dev/null; then
cpu_freq="$(vcgencmd get_config arm_freq | awk -F '=' '{print $2}')Mhz"
sys_temp="$(vcgencmd measure_temp | grep -Eo '[0-9.]+')°C"
else
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) / 1000)Mhz"
sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
fi
echo -n "(${cpu_freq}, ${sys_temp})"

View File

@ -0,0 +1,255 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Frp Setting"
msgstr "Frp 内网穿透"
msgid "Frp Status"
msgstr "Frp状态"
msgid "The Frp service is not running."
msgstr "Frp服务未运行"
msgid "The Frp service is running."
msgstr "Frp服务正在运行"
msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。"
msgid "Global Setting"
msgstr "全局设置"
msgid "Basic Settings"
msgstr "基本设置"
msgid "Other Settings"
msgstr "其他设置"
msgid "Client Log"
msgstr "日志"
msgid "Enabled"
msgstr "启用"
msgid "Server"
msgstr "服务器"
msgid "Port"
msgstr "端口"
msgid "Token"
msgstr "令牌"
msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes."
msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟"
msgid "Vhost HTTP Port"
msgstr "HTTP穿透服务端口"
msgid "Vhost HTTPS Port"
msgstr "HTTPS穿透服务端口"
msgid "Exit program when first login failed"
msgstr "初始登录失败即退出程序"
msgid "TCP Stream Multiplexing"
msgstr "TCP端口复用"
msgid "decide if exit program when first login failed, otherwise continuous relogin to frps."
msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。"
msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same."
msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。"
msgid "Protocol Type"
msgstr "协议类型"
msgid "Frp support kcp protocol since v0.12.0"
msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。"
msgid "TCP Protocol"
msgstr "TCP协议"
msgid "KCP Protocol"
msgstr "KCP协议"
msgid "Connect frps by HTTP PROXY"
msgstr "通过代理连接 frps"
msgid "frpc can connect frps using HTTP PROXY"
msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信"
msgid "HTTP PROXY"
msgstr "HTTP代理"
msgid "Enable Connection Pool"
msgstr "启用连接池功能"
msgid "This feature is fit for a large number of short connections."
msgstr "适合有大量短连接请求时开启"
msgid "Connection Pool"
msgstr "指定预创建连接的数量"
msgid "Connections will be established in advance."
msgstr "frpc 会预先和服务端建立起指定数量的连接。"
msgid "Service registration interval"
msgstr "服务注册间隔"
msgid "0 means disable this feature, unit: min"
msgstr "0表示禁用定时注册功能单位分钟"
msgid "Log Level"
msgstr "日志记录等级"
msgid "Trace"
msgstr "追踪"
msgid "Debug"
msgstr "调试"
msgid "Info"
msgstr "信息"
msgid "Warning"
msgstr "警告"
msgid "Error"
msgstr "错误"
msgid "Log Keepd Max Days"
msgstr "日志记录天数"
msgid "Services List"
msgstr "服务列表"
msgid "Service Remark Name"
msgstr "服务备注名"
msgid "Domain/Subdomain"
msgstr "域名/子域名"
msgid "Remote Port"
msgstr "远程主机端口"
msgid "Local Host Address"
msgstr "内网主机地址"
msgid "Local Host Port"
msgstr "内网主机端口"
msgid "Use Encryption"
msgstr "开启数据加密"
msgid "Use Compression"
msgstr "使用压缩"
msgid "Enable State"
msgstr "开启状态"
msgid "Frp Domain Config"
msgstr "Frp域名配置"
msgid "Config Frp Protocol"
msgstr "配置 Frp 协议参数"
msgid "Disable"
msgstr "关闭"
msgid "Frp Protocol Type"
msgstr "Frp 协议类型"
msgid "Domain Type"
msgstr "域名类型"
msgid "Custom Domains"
msgstr "自定义域名"
msgid "SubDomain"
msgstr "子域名"
msgid "Both the above two Domain types"
msgstr "同时使用2种域名"
msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)."
msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。"
msgid "subdomain_host must be configured in server: frps in advance."
msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。"
msgid "STCP Role"
msgstr "SFTP服务类型"
msgid "Use Plugin"
msgstr "使用插件"
msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."
msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。"
msgid "STCP Screct Key"
msgstr "SFTP密钥"
msgid "STCP Server Name"
msgstr "SFTP服务名称"
msgid "Enable URL routing"
msgstr "启用 URL 路由"
msgid "Frp support forward http requests to different backward web services by url routing."
msgstr "Frp支持通过url路由将http请求转发到不同的反向web服务。"
msgid "Choose Plugin"
msgstr "选择插件"
msgid "Proxy Authentication"
msgstr "代理认证"
msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin."
msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。"
msgid "HTTP Proxy UserName"
msgstr "HTTP 代理用户名"
msgid "HTTP Proxy Password"
msgstr "HTTP 代理密码"
msgid "Plugin Unix Sock Path"
msgstr "Unix Sock 插件路径"
msgid "Password protecting your web service"
msgstr "密码保护您的web服务"
msgid "HTTP UserName"
msgstr "HTTP 用户名"
msgid "HTTP PassWord"
msgstr "HTTP 密码"
msgid "Rewriting the Host Header"
msgstr "修改 Host Header"
msgid "Frp can rewrite http requests with a modified Host header."
msgstr "Frp可以用修改后的主机头重写http请求。"
msgid "Proxy-Protocol Version"
msgstr "Proxy-Protocol 版本"
msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted."
msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。"
msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources."
msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。"
msgid "Http username and password are safety certification for http protocol."
msgstr "Http用户名和密码是Http协议的安全认证。"
msgid "Proxy Protocol to send user's real IP to local services."
msgstr "将用户的真实IP发送到本地服务的代理协议。"
msgid "STCP Server Name is Service Remark Name of STCP Server"
msgstr "STCP服务器别名"
msgid "<font color=\"red\">Please ensure the remark name is unique.</font>"
msgstr "<font color=\"red\">确保备注名唯一</font>"

View File

@ -0,0 +1,55 @@
#
# Copyright (C) 2012-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ps3netsrv
PKG_VERSION:=20190630
PKG_GIT_COMMIT:=3107bba17870657c5bb3f7830657838d766a296c
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_GIT_COMMIT).tar.gz
PKG_SOURCE_URL:=https://github.com/jhonathanc/ps3netsrv/releases/download/$(PKG_VERSION)
PKG_HASH:=b1df52bab6496d3008019ff76660436c4b24d05c84fc71f293719dbd608f1511
PKG_INSTALL:=1
PKG_MAINTAINER:=JCorrea
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DEPENDS:=mbedtls
include $(INCLUDE_DIR)/package.mk
define Package/ps3netsrv
SECTION:=net
CATEGORY:=Network
SUBMENU:=File Transfer
TITLE:=PS3 Game Server
URL:=https://github.com/jhonathanc/ps3netsrv-openwrt/
DEPENDS:=+libpthread +libstdcpp
endef
define Package/ps3netsrv/description
ps3netsrv allows you to stream games and ISOs over the network to your CFW PlayStation(R) 3 system.
This may be useful if you have a modified PS3, and your router has storage options.
endef
define Build/Install
# Do nothing
endef
define Package/ps3netsrv/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ps3netsrv $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ps3netsrv.init $(1)/etc/init.d/ps3netsrv
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/ps3netsrv.config $(1)/etc/config/ps3netsrv
endef
$(eval $(call BuildPackage,ps3netsrv))

View File

@ -0,0 +1,5 @@
config ps3netsrv 'main'
option enabled '0'
option user 'root'
option dir '/root'
option port '38008'

View File

@ -0,0 +1,83 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
NAME=ps3netsrv
PROG=/usr/bin/ps3netsrv
_info() {
logger -p daemon.info -t "$NAME" "$*"
}
_err() {
logger -p daemon.err -t "$NAME" "$*"
}
_change_owner() {
local u="$1"; shift
local d
for d in "$@"; do
if [ -f "$d" ]; then
chown "$u" "$d" 2>/dev/null || return 1
elif [ -d "$d" ]; then
chown -R "$u" "$d" 2>/dev/null || return 1
fi
done
return 0
}
ps3netsrv_validate() {
uci_validate_section "$NAME" ps3netsrv "$1" \
'enabled:bool:0' \
'dir:string:/root' \
'user:string' \
'port:range(1024,65535)'
}
ps3netsrv_start() {
local section="$1"
ps3netsrv_validate "$section" || { _err "Validation failed."; return 1; }
[ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; }
[ -n "$dir" ] || { _err "Please set PS3 Game dir."; return 1; }
[ -n "$port" ] || { _err "Please set bind port."; return 1; }
[ -d "$dir" ] || { _err "Please create PS3 Game dir first."; return 1; }
if [ -n "$user" ]; then
if ( user_exists "$user" && _change_owner "$user" "$log" ); then
_info "ps3netsrv will run as user '${user}'."
if [ "$user" != "root" ]; then
_info "Please make sure user '${user}' has read access to directory: ${dir}"
fi
else
_info "Set run user to '${user}' failed, default user will be used."
user=
fi
fi
procd_open_instance "${NAME}.${section}"
procd_set_param command "$PROG" "$dir" "$port"
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
[ -n "$user" ] && \
procd_set_param user "$user"
procd_add_jail "${NAME}.${section}" log
procd_add_jail_mount "$dir"
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger "$NAME"
}
start_service() {
config_load "$NAME"
config_foreach ps3netsrv_start "ps3netsrv"
}

View File

@ -0,0 +1,20 @@
diff -Naur a/include/common.h b/include/common.h
--- a/include/common.h 2019-08-03 10:48:42.000000000 -0700
+++ b/include/common.h 2020-03-01 19:26:14.000000000 -0800
@@ -2,6 +2,7 @@
#define __COMMON_H__
#include <stdint.h>
+#include <endian.h>
#ifdef DEBUG
#include <stdio.h>
@@ -10,7 +11,7 @@
#define DPRINTF(...)
#endif
-#ifdef __BIG_ENDIAN__
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
static inline uint16_t BE16(uint16_t x)
{

View File

@ -0,0 +1,12 @@
diff -Naur a/include/compat.h b/include/compat.h
--- a/include/compat.h 2019-08-03 10:48:42.000000000 -0700
+++ b/include/compat.h 2020-03-01 19:26:14.000000000 -0800
@@ -57,7 +57,7 @@ typedef int socklen_t;
#else
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

View File

@ -0,0 +1,114 @@
diff -Naur a/Makefile b/Makefile
--- a/Makefile 2019-08-03 10:48:42.000000000 -0700
+++ b/Makefile 2020-03-01 19:26:14.000000000 -0800
@@ -1,21 +1,17 @@
-OS = windows
+OS = linux
BUILD_TYPE = release_static
OUTPUT := ps3netsrv
OBJS = src/main.o src/compat.o src/File.o src/VIsoFile.o
-CFLAGS = -Wall -I./include -I./polarssl-1.3.2/include -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL
-CPPFLAGS += -Wall -I./include -I./polarssl-1.3.2/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL
-
-#CFLAGS += -DNOSSL
-#CPPFLAGS +=-DNOSSL
-
-LDFLAGS = -L. -L./polarssl-1.3.2/library
-LIBS = -lstdc++ -lpolarssl
+CFLAGS = -Wall -I./include -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+CPPFLAGS = -Wall -I./include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+LDFLAGS = -L.
+LIBS = -lstdc++
ifeq ($(OS), linux)
-LIBS += -lpthread
+LIBS += -lpthread -lgcc_eh
endif
ifeq ($(OS), windows)
@@ -37,28 +33,82 @@ endif
ifeq ($(BUILD_TYPE), debug)
CFLAGS += -O0 -g3 -DDEBUG
CPPFLAGS += -O0 -g3 -DDEBUG
+LIBS += -lmbedtls -lmbedx509 -lmbedcrypto
+endif
+
+ifeq ($(BUILD_TYPE), debug_nossl)
+CFLAGS += -O0 -g3 -DDEBUG -DNOSSL
+CPPFLAGS += -O0 -g3 -DDEBUG -DNOSSL
+endif
+
+ifeq ($(BUILD_TYPE), debug_polar)
+CFLAGS += -O0 -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+CPPFLAGS += -O0 -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+LDFLAGS += -L./polarssl-1.3.2/library
+LIBS += -lpolarssl
endif
ifeq ($(BUILD_TYPE), debug_static)
CFLAGS += -O0 -static -g3 -DDEBUG
CPPFLAGS += -O0 -static -g3 -DDEBUG
+LIBS += -lmbedtls -lmbedx509 -lmbedcrypto
+endif
+
+ifeq ($(BUILD_TYPE), debug_static_nossl)
+CFLAGS += -O0 -static -g3 -DDEBUG -DNOSSL
+CPPFLAGS += -O0 -static -g3 -DDEBUG -DNOSSL
+endif
+
+ifeq ($(BUILD_TYPE), debug_static_polar)
+CFLAGS += -O0 -static -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+CPPFLAGS += -O0 -static -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+LDFLAGS += -L./polarssl-1.3.2/library
+LIBS += -lpolarssl
endif
ifeq ($(BUILD_TYPE), release)
CFLAGS += -O3 -s -DNDEBUG
CPPFLAGS += -O3 -s -DNDEBUG
+LIBS += -lmbedtls -lmbedx509 -lmbedcrypto
+endif
+
+ifeq ($(BUILD_TYPE), release_nossl)
+CFLAGS += -O3 -s -DNDEBUG -DNOSSL
+CPPFLAGS += -O3 -s -DNDEBUG -DNOSSL
+endif
+
+ifeq ($(BUILD_TYPE), release_polar)
+CFLAGS += -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+CPPFLAGS += -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+LDFLAGS += -L./polarssl-1.3.2/library
+LIBS += -lpolarssl
endif
ifeq ($(BUILD_TYPE), release_static)
CFLAGS += -static -O3 -s -DNDEBUG
CPPFLAGS += -static -O3 -s -DNDEBUG
+LIBS += -lmbedtls -lmbedx509 -lmbedcrypto
+endif
+
+ifeq ($(BUILD_TYPE), release_static_nossl)
+CFLAGS += -static -O3 -s -DNDEBUG -DNOSSL
+CPPFLAGS += -static -O3 -s -DNDEBUG -DNOSSL
+endif
+
+ifeq ($(BUILD_TYPE), release_static_polar)
+CFLAGS += -static -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+CPPFLAGS += -static -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL
+LDFLAGS += -L./polarssl-1.3.2/library
+LIBS += -lpolarssl
endif
all: $(OUTPUT)
rm -r -f src/*.o
+ rm -r -f polarssl-1.3.2/library/*.o
clean:
rm -r -f $(OUTPUT) src/*.o
+ rm -r -f polarssl-1.3.2/library/*.o
$(OUTPUT): $(OBJS)
$(LINK.c) $(LDFLAGS) -o $@ $^ $(LIBS)

View File

@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray
PKG_VERSION:=4.23.1
PKG_VERSION:=4.23.4
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION)
PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2ray/v2ray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=474b3aeed069d9867f7603a0544abcc0f31386cef9254423577ab752fc8d4dcc
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=726dd98d674bd73150158b1d4c8bc0d59dbb672ba10096ac61548d6278213c78
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=4.4.0-stable
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
@ -56,7 +56,7 @@ define Package/libwolfssl/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192
TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer
# --enable-stunnel needed for OpenSSL API compatibility bits
CONFIGURE_ARGS += \

View File

@ -13,7 +13,7 @@ function index()
local page = entry({"admin", "services", "clash"},alias("admin", "services", "clash", "overview"), _("Clash"), 5)
page.dependent = true
page.acl_depends = { "luci-app-oclash" }
page.acl_depends = { "luci-app-clash" }
entry({"admin", "services", "clash", "overview"},cbi("clash/overview"),_("Overview"), 10).leaf = true
entry({"admin", "services", "clash", "client"},cbi("clash/client"),_("Client"), 20).leaf = true

View File

@ -3,13 +3,13 @@
#
# 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:=mtd
PKG_RELEASE:=23
PKG_RELEASE:=25
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)

View File

@ -6,12 +6,15 @@ obj = mtd.o jffs2.o crc32.o md5.o
obj.seama = seama.o md5.o
obj.wrg = wrg.o md5.o
obj.wrgg = wrgg.o md5.o
obj.tpl = tpl_ramips_recoveryflag.o
obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg)
obj.ath79 = $(obj.seama)
obj.gemini = $(obj.wrgg)
obj.brcm = trx.o
obj.bcm47xx = $(obj.brcm)
obj.bcm53xx = $(obj.brcm) $(obj.seama)
obj.bcm63xx = imagetag.o
obj.ramips = $(obj.seama) $(obj.wrg) linksys_bootcount.o
obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg) linksys_bootcount.o
obj.mvebu = linksys_bootcount.o
obj.kirkwood = linksys_bootcount.o
obj.ipq806x = linksys_bootcount.o

View File

@ -139,8 +139,6 @@ done:
int
fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
{
struct fis_image_desc *fisdir = NULL;
struct fis_image_desc *redboot = NULL;
struct fis_image_desc *first = NULL;
struct fis_image_desc *last = NULL;
struct fis_image_desc *first_fb = NULL;
@ -164,12 +162,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
if (!desc->hdr.name[0] || (desc->hdr.name[0] == 0xff))
break;
if (!strcmp((char *) desc->hdr.name, "FIS directory"))
fisdir = desc;
if (!strcmp((char *) desc->hdr.name, "RedBoot"))
redboot = desc;
/* update max offset */
if (offset < desc->hdr.flash_base)
offset = desc->hdr.flash_base;
@ -210,18 +202,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
size = offset - first_fb->hdr.flash_base;
#ifdef notyet
desc = first - 1;
if (redboot && (desc >= redboot)) {
if (first->hdr.flash_base - desc->hdr.size > desc->hdr.flash_base) {
int delta = first->hdr.flash_base - desc->hdr.size - desc->hdr.flash_base;
offset -= delta;
size += delta;
}
}
#endif
last++;
desc = first + n_new;
offset = first_fb->hdr.flash_base;
@ -243,14 +223,14 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
memset(desc, 0, sizeof(struct fis_image_desc));
memcpy(desc->hdr.name, part->name, sizeof(desc->hdr.name));
desc->crc.desc = 0;
desc->crc.file = 0;
desc->crc.file = part->crc;
desc->hdr.flash_base = offset;
desc->hdr.mem_base = part->loadaddr;
desc->hdr.entry_point = part->loadaddr;
desc->hdr.size = (part->size > 0) ? part->size : size;
desc->hdr.data_length = desc->hdr.size;
desc->hdr.data_length = (part->length > 0) ? part->length :
desc->hdr.size;
offset += desc->hdr.size;
size -= desc->hdr.size;
}

View File

@ -6,6 +6,8 @@ struct fis_part {
uint32_t offset;
uint32_t loadaddr;
uint32_t size;
uint32_t length;
uint32_t crc;
};
int fis_validate(struct fis_part *old, int n_old, struct fis_part *new, int n_new);

View File

@ -2,6 +2,7 @@
* Linksys boot counter reset code for mtd
*
* Copyright (C) 2013 Jonas Gorski <jogo@openwrt.org>
* Portions Copyright (c) 2019, Jeff Kletsky
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License v2
@ -29,6 +30,7 @@
#include <string.h>
#include <errno.h>
#include <stdint.h>
#include <syslog.h>
#include <sys/ioctl.h>
#include <mtd/mtd-user.h>
@ -37,6 +39,30 @@
#define BOOTCOUNT_MAGIC 0x20110811
/*
* EA6350v3, and potentially other NOR-boot devices,
* use an offset increment of 16 between records,
* not mtd_info_user.writesize (often 1 on NOR devices).
*/
#define BC_OFFSET_INCREMENT_MIN 16
#define DLOG_OPEN()
#define DLOG_ERR(...) do { \
fprintf(stderr, "ERROR: " __VA_ARGS__); fprintf(stderr, "\n"); \
} while (0)
#define DLOG_NOTICE(...) do { \
fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); \
} while (0)
#define DLOG_DEBUG(...)
struct bootcounter {
uint32_t magic;
uint32_t count;
@ -50,25 +76,50 @@ int mtd_resetbc(const char *mtd)
struct mtd_info_user mtd_info;
struct bootcounter *curr = (struct bootcounter *)page;
unsigned int i;
unsigned int bc_offset_increment;
int last_count = 0;
int num_bc;
int fd;
int ret;
int retval = 0;
DLOG_OPEN();
fd = mtd_check_open(mtd);
if (ioctl(fd, MEMGETINFO, &mtd_info) < 0) {
fprintf(stderr, "failed to get mtd info!\n");
return -1;
DLOG_ERR("Unable to obtain mtd_info for given partition name.");
retval = -1;
goto out;
}
num_bc = mtd_info.size / mtd_info.writesize;
/* Detect need to override increment (for EA6350v3) */
if (mtd_info.writesize < BC_OFFSET_INCREMENT_MIN) {
bc_offset_increment = BC_OFFSET_INCREMENT_MIN;
DLOG_DEBUG("Offset increment set to %i for writesize of %i",
bc_offset_increment, mtd_info.writesize);
} else {
bc_offset_increment = mtd_info.writesize;
}
num_bc = mtd_info.size / bc_offset_increment;
for (i = 0; i < num_bc; i++) {
pread(fd, curr, sizeof(*curr), i * mtd_info.writesize);
pread(fd, curr, sizeof(*curr), i * bc_offset_increment);
if (curr->magic != BOOTCOUNT_MAGIC && curr->magic != 0xffffffff) {
fprintf(stderr, "unexpected magic %08x, bailing out\n", curr->magic);
/* Existing code assumes erase is to 0xff; left as-is (2019) */
if (curr->magic != BOOTCOUNT_MAGIC &&
curr->magic != 0xffffffff) {
DLOG_ERR("Unexpected magic %08x at offset %08x; aborting.",
curr->magic, i * bc_offset_increment);
retval = -2;
goto out;
}
@ -78,38 +129,59 @@ int mtd_resetbc(const char *mtd)
last_count = curr->count;
}
/* no need to do writes when last boot count is already 0 */
if (last_count == 0)
if (last_count == 0) { /* bootcount is already 0 */
retval = 0;
goto out;
}
if (i == num_bc) {
DLOG_NOTICE("Boot-count log full with %i entries; erasing (expected occasionally).",
i);
struct erase_info_user erase_info;
erase_info.start = 0;
erase_info.length = mtd_info.size;
/* erase block */
ret = ioctl(fd, MEMERASE, &erase_info);
if (ret < 0) {
fprintf(stderr, "failed to erase block: %i\n", ret);
return -1;
DLOG_ERR("Failed to erase boot-count log MTD; ioctl() MEMERASE returned %i",
ret);
retval = -3;
goto out;
}
i = 0;
}
memset(curr, 0xff, mtd_info.writesize);
memset(curr, 0xff, bc_offset_increment);
curr->magic = BOOTCOUNT_MAGIC;
curr->count = 0;
curr->checksum = BOOTCOUNT_MAGIC;
ret = pwrite(fd, curr, mtd_info.writesize, i * mtd_info.writesize);
if (ret < 0)
fprintf(stderr, "failed to write: %i\n", ret);
sync();
/* Assumes bc_offset_increment is a multiple of mtd_info.writesize */
ret = pwrite(fd, curr, bc_offset_increment, i * bc_offset_increment);
if (ret < 0) {
DLOG_ERR("Failed to write boot-count log entry; pwrite() returned %i",
errno);
retval = -4;
goto out;
} else {
sync();
DLOG_NOTICE("Boot count sucessfully reset to zero.");
retval = 0;
goto out;
}
out:
close(fd);
return 0;
return retval;
}

View File

@ -44,6 +44,7 @@
#include <sys/reboot.h>
#include <linux/reboot.h>
#include <mtd/mtd-user.h>
#include "crc32.h"
#include "fis.h"
#include "mtd.h"
@ -85,6 +86,7 @@ static char *buf = NULL;
static char *imagefile = NULL;
static enum mtd_image_format imageformat = MTD_IMAGE_FORMAT_UNKNOWN;
static char *jffs2file = NULL, *jffs2dir = JFFS2_DEFAULT_DIR;
static char *tpl_uboot_args_part;
static int buflen = 0;
int quiet;
int no_erase;
@ -472,12 +474,14 @@ mtd_write(int imagefd, const char *mtd, char *fis_layout, size_t part_offset)
ssize_t r, w, e;
ssize_t skip = 0;
uint32_t offset = 0;
int buflen_raw = 0;
int jffs2_replaced = 0;
int skip_bad_blocks = 0;
#ifdef FIS_SUPPORT
static struct fis_part new_parts[MAX_ARGS];
static struct fis_part old_parts[MAX_ARGS];
struct fis_part *cur_part = NULL;
int n_new = 0, n_old = 0;
if (fis_layout) {
@ -487,6 +491,8 @@ mtd_write(int imagefd, const char *mtd, char *fis_layout, size_t part_offset)
memset(&old_parts, 0, sizeof(old_parts));
memset(&new_parts, 0, sizeof(new_parts));
if (!part_offset)
cur_part = new_parts;
do {
next = strchr(tmp, ':');
@ -554,6 +560,17 @@ resume:
lseek(fd, part_offset, SEEK_SET);
}
/* Write TP-Link recovery flag */
if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) {
if (quiet < 2)
fprintf(stderr, "Writing recovery flag to %s\n", tpl_uboot_args_part);
result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, true);
if (result < 0) {
fprintf(stderr, "Could not write TP-Link recovery flag to %s: %i", mtd, result);
exit(1);
}
}
indicate_writing(mtd);
w = e = 0;
@ -576,6 +593,9 @@ resume:
buflen += r;
}
if (buflen_raw == 0)
buflen_raw = buflen;
if (buflen == 0)
break;
@ -587,6 +607,7 @@ resume:
if (skip > 0) {
skip -= buflen;
buflen_raw = 0;
buflen = 0;
if (skip <= 0)
indicate_writing(mtd);
@ -610,6 +631,7 @@ resume:
w += skip;
e += skip;
skip -= buflen;
buflen_raw = 0;
buflen = 0;
offset = 0;
continue;
@ -675,6 +697,17 @@ resume:
}
w += buflen;
#ifdef FIS_SUPPORT
if (cur_part && cur_part->size
&& cur_part < &new_parts[MAX_ARGS - 1]
&& cur_part->length + buflen_raw > cur_part->size)
cur_part++;
if (cur_part) {
cur_part->length += buflen_raw;
cur_part->crc = crc32(cur_part->crc, buf, buflen_raw);
}
#endif
buflen_raw = 0;
buflen = 0;
offset = 0;
}
@ -716,6 +749,18 @@ resume:
#endif
close(fd);
/* Clear TP-Link recovery flag */
if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) {
if (quiet < 2)
fprintf(stderr, "Removing recovery flag from %s\n", tpl_uboot_args_part);
result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, false);
if (result < 0) {
fprintf(stderr, "Could not clear TP-Link recovery flag to %s: %i", mtd, result);
exit(1);
}
}
return 0;
}
@ -771,6 +816,10 @@ static void usage(void)
fprintf(stderr,
" -c datasize amount of data to be used for checksum calculation (for fixtrx / fixseama / fixwrg / fixwrgg)\n");
}
if (mtd_tpl_recoverflag_write) {
fprintf(stderr,
" -t <partition> write TP-Link recovery-flag to <partition> (for write)\n");
}
fprintf(stderr,
#ifdef FIS_SUPPORT
" -F <part>[:<size>[:<entrypoint>]][,<part>...]\n"
@ -828,7 +877,7 @@ int main (int argc, char **argv)
#ifdef FIS_SUPPORT
"F:"
#endif
"frnqe:d:s:j:p:o:c:l:")) != -1)
"frnqe:d:s:j:p:o:c:t:l:")) != -1)
switch (ch) {
case 'f':
force = 1;
@ -896,6 +945,9 @@ int main (int argc, char **argv)
usage();
}
break;
case 't':
tpl_uboot_args_part = optarg;
break;
#ifdef FIS_SUPPORT
case 'F':
fis_layout = optarg;

View File

@ -30,4 +30,5 @@ extern int mtd_fixseama(const char *mtd, size_t offset, size_t data_size) __attr
extern int mtd_fixwrg(const char *mtd, size_t offset, size_t data_size) __attribute__ ((weak));
extern int mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size) __attribute__ ((weak));
extern int mtd_resetbc(const char *mtd) __attribute__ ((weak));
extern int mtd_tpl_recoverflag_write(const char *mtd, const bool recovery_active) __attribute__ ((weak));
#endif /* __mtd_h */

View File

@ -0,0 +1,94 @@
/*
* TP-Link recovery flag set and unset code for ramips target
*
* Copyright (C) 2018 David Bauer <mail@david-bauer.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License v2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
#include <stdint.h>
#include <mtd/mtd-user.h>
#include <sys/ioctl.h>
#include "mtd.h"
#define TPL_RECOVER_MAGIC 0x89abcdef
#define TPL_NO_RECOVER_MAGIC 0x00000000
struct uboot_args {
uint32_t magic;
};
int mtd_tpl_recoverflag_write(const char *mtd, const bool recovery_active)
{
struct erase_info_user erase_info;
struct uboot_args *args;
uint32_t magic;
int ret = 0;
int fd;
args = malloc(erasesize);
if (!args) {
fprintf(stderr, "Could not allocate memory!\n");
return -1;
}
fd = mtd_check_open(mtd);
if (fd < 0) {
fprintf(stderr, "Could not open mtd device: %s\n", mtd);
ret = -1;
goto out;
}
/* read first block (containing the magic) */
pread(fd, args, erasesize, 0);
/* set magic to desired value */
magic = TPL_RECOVER_MAGIC;
if (!recovery_active)
magic = TPL_NO_RECOVER_MAGIC;
/* no need to write when magic is already set correctly */
if (magic == args->magic)
goto out;
/* erase first block (containing the magic) */
erase_info.start = 0;
erase_info.length = erasesize;
ret = ioctl(fd, MEMERASE, &erase_info);
if (ret < 0) {
fprintf(stderr, "failed to erase block: %i\n", ret);
goto out;
}
/* write magic to flash */
args->magic = magic;
ret = pwrite(fd, args, erasesize, 0);
if (ret < 0)
fprintf(stderr, "failed to write: %i\n", ret);
sync();
out:
free(args);
close(fd);
return ret;
}

View File

@ -39,13 +39,10 @@
#include "wrgg.h"
#include "md5.h"
#if __BYTE_ORDER == __BIG_ENDIAN
#define STORE32_LE(X) ((((X) & 0x000000FF) << 24) | (((X) & 0x0000FF00) << 8) | (((X) & 0x00FF0000) >> 8) | (((X) & 0xFF000000) >> 24))
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define STORE32_LE(X) (X)
#else
#error unknown endianness!
#endif
static inline uint32_t le32_to_cpu(uint8_t *buf)
{
return buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24;
}
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
@ -94,7 +91,7 @@ wrgg_fix_md5(struct wrgg03_header *shdr, int fd, size_t data_offset, size_t data
}
/* update the size in the image */
shdr->size = htonl(data_size);
shdr->size = data_size;
/* update the checksum in the image */
memcpy(shdr->digest, digest, sizeof(digest));
@ -147,12 +144,14 @@ mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size)
}
shdr = (struct wrgg03_header *)(first_block + offset);
if (shdr->magic1 != htonl(STORE32_LE(WRGG03_MAGIC))) {
fprintf(stderr, "magic1 %x\n", shdr->magic1);
fprintf(stderr, "htonl(WRGG03_MAGIC) %x\n", WRGG03_MAGIC);
/* The magic is always stored in little-endian byte order */
if (le32_to_cpu((uint8_t *)&shdr->magic1) != WRGG03_MAGIC) {
fprintf(stderr, "magic1 = %x\n", shdr->magic1);
fprintf(stderr, "WRGG03_MAGIC = %x\n", WRGG03_MAGIC);
fprintf(stderr, "No WRGG header found\n");
exit(1);
} else if (!ntohl(shdr->size)) {
} else if (!shdr->size) {
fprintf(stderr, "WRGG entity with empty image\n");
exit(1);
}
@ -160,8 +159,8 @@ mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size)
data_offset = offset + sizeof(struct wrgg03_header);
if (!data_size)
data_size = mtdsize - data_offset;
if (data_size > ntohl(shdr->size))
data_size = ntohl(shdr->size);
if (data_size > shdr->size)
data_size = shdr->size;
if (wrgg_fix_md5(shdr, fd, data_offset, data_size))
goto out;

View File

@ -0,0 +1,69 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=exfat-utils
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_VERSION)?
PKG_HASH:=7d4e95c3042b58601a581dc02f55eb4a726a2fb8db2e74a9619dbf3083997e06
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--enable-shared \
--disable-static
define Package/exfat-utils/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
DEPENDS:=+libexfat
URL:=https://github.com/exfat-utils/exfat-utils
endef
define Package/exfat-mkfs
$(Package/exfat-utils/Default)
TITLE:=Utility for creating an exFAT File System
endef
define Package/exfat-fsck
$(Package/exfat-utils/Default)
TITLE:=Utility for checking/repairing an exFAT File System
endef
define Package/libexfat
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for exFAT File System tools
DEPENDS:=+libuuid
ABI_VERSION:=1
endef
define Package/libexfat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libexfat.so.* $(1)/usr/lib/
endef
define Package/exfat-mkfs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.exfat $(1)/usr/sbin
endef
define Package/exfat-fsck/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.exfat $(1)/usr/sbin
endef
$(eval $(call BuildPackage,libexfat))
$(eval $(call BuildPackage,exfat-mkfs))
$(eval $(call BuildPackage,exfat-fsck))

View File

@ -79,7 +79,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
},
{
.desc = "sw1",
.type = EV_KEY,
.type = EV_SW,
.code = BTN_0,
.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_MR3020_GPIO_BTN_SW1,
@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
},
{
.desc = "sw2",
.type = EV_KEY,
.type = EV_SW,
.code = BTN_1,
.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_MR3020_GPIO_BTN_SW2,

View File

@ -24,7 +24,7 @@
#include "machtypes.h"
#define TL_WR802N_GPIO_LED_SYSTEM 13
#define TL_WR802N_GPIO_BTN_RESET 11
#define TL_WR802N_GPIO_BTN_RESET 12
#define TL_WR802N_KEYS_POLL_INTERVAL 20 /* msecs */
#define TL_WR802N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR802N_KEYS_POLL_INTERVAL)
@ -61,7 +61,7 @@ static struct gpio_keys_button tl_wr802n_gpio_keys[] __initdata = {
.code = KEY_RESTART,
.debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_WR802N_GPIO_BTN_RESET,
.active_low = 0,
.active_low = 1,
}
};

View File

@ -12,29 +12,31 @@
aliases {
serial0 = &uart;
led-boot = &led_wlan;
led-failsafe = &led_wlan;
led-upgrade = &led_wlan;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &eth0;
};
leds {
compatible = "gpio-leds";
led_wlan: wlan {
wlan {
label = "gl-ar150:orange:wlan";
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
lan {
label = "gl-ar150:green:lan";
configurable {
label = "gl-ar150:green:configurable";
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
wan {
label = "gl-ar150:green:wan";
led_power: power {
label = "gl-ar150:green:power";
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};

View File

@ -116,10 +116,6 @@ glinet,6408|\
glinet,6416)
ucidef_set_led_netdev "lan" "LAN" "gl-inet:green:lan" "eth0"
;;
glinet,gl-ar150)
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02"
;;
glinet,gl-ar300m-lite)
ucidef_set_led_netdev "lan" "LAN" "gl-ar300m-lite:green:lan" "eth0"
;;

View File

@ -27,7 +27,8 @@ DEFAULT_PACKAGES += \
kmod-usb-hid \
kmod-sound-core kmod-sound-arm-bcm2835 \
kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
partx-utils mkf2fs e2fsprogs
partx-utils mkf2fs e2fsprogs \
htop autocore-raspberrypi
KERNELNAME:=Image dtbs

View File

@ -533,6 +533,7 @@ CONFIG_RESET_CONTROLLER=y
CONFIG_RESET_SIMPLE=y
CONFIG_RFS_ACCEL=y
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
# CONFIG_RPI_AXIPERF is not set
# CONFIG_RPIVID_MEM is not set
CONFIG_RPS=y
CONFIG_RWSEM_SPIN_ON_OWNER=y

View File

@ -10,5 +10,14 @@
# OpenWrt config
include distroconfig.txt
[pi2]
dtparam=i2c_arm=on,audio=on
[pi3]
dtparam=i2c_arm=on,audio=on
[pi4]
dtparam=i2c_arm=on,audio=on
[all]
# Place your custom settings here.

View File

@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
@@ -1197,6 +1200,9 @@
@@ -1202,6 +1205,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220
@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
@@ -175,6 +176,7 @@ static const struct hid_device_id hid_qu
@@ -176,6 +177,7 @@ static const struct hid_device_id hid_qu
{ HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },

View File

@ -286,6 +286,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
# CONFIG_ARC_IRQ_NO_AUTOSAVE is not set
# CONFIG_ARM64_ERRATUM_1024718 is not set
# CONFIG_ARM64_ERRATUM_1463225 is not set
# CONFIG_ARM64_ERRATUM_1542419 is not set
# CONFIG_ARM64_ERRATUM_819472 is not set
# CONFIG_ARM64_ERRATUM_824069 is not set
# CONFIG_ARM64_ERRATUM_826319 is not set

View File

@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/Makefile
+++ b/Makefile
@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/s
@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE = -T $(srctree)/sc
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5924,7 +5924,7 @@ static void __ref alloc_node_mem_map(str
@@ -5925,7 +5925,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)

View File

@ -1,6 +1,6 @@
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -56,6 +56,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/
@@ -57,6 +57,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o

View File

@ -148,7 +148,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y

View File

@ -154,7 +154,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y

View File

@ -149,7 +149,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y

View File

@ -192,7 +192,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y

View File

@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs wpad kmod-usb-hid \
kmod-ath5k kmod-ath9k kmod-ath9k-htc kmod-ath10k kmod-rt2800-usb kmod-e1000e kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-i40e kmod-i40evf kmod-r8125 kmod-8139cp kmod-8139too kmod-fs-f2fs \
htop lm-sensors autocore automount autosamba luci-app-ipsec-vpnd luci-proto-bonding luci-app-unblockmusic luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ddns-scripts_dnspod ca-certificates \
htop lm-sensors autocore-x86 automount autosamba luci-app-ipsec-vpnd luci-proto-bonding luci-app-unblockmusic luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ddns-scripts_dnspod ca-certificates \
luci-app-airplay2 luci-app-music-remote-center luci-app-qbittorrent luci-app-amule luci-app-openvpn-server \
ath10k-firmware-qca988x ath10k-firmware-qca9888 ath10k-firmware-qca9984 brcmfmac-firmware-43602a1-pcie \
kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi kmod-sound-i8x0 kmod-usb-audio \

View File

@ -34,7 +34,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
tools-$(CONFIG_TARGET_ar71xx) += lzma-old
tools-$(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79) += squashfs
tools-$(CONFIG_USES_MINOR) += kernel2minor
tools-y += lzma squashfskit4 zip
tools-y += lzma squashfskit4 zip zstd
tools-$(BUILD_B43_TOOLS) += b43-tools
tools-$(BUILD_ISL) += isl
tools-$(CONFIG_USE_SPARSE) += sparse

View File

@ -137,6 +137,15 @@ struct fw_info fw_info[] = {
},
.sign = true,
},
{
.name = "XC",
.fw_layout = {
.kern_start = 0x9f050000,
.kern_entry = 0x80002000,
.firmware_max_length= 0x00F60000,
},
.sign = true,
},
{
.name = "ACB-ISP",
.fw_layout = {

20
tools/zstd/Makefile Normal file
View File

@ -0,0 +1,20 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=zstd
PKG_VERSION:=1.4.4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GITHUB/facebook/zstd/releases/download/v$(PKG_VERSION)
PKG_HASH:=a364f5162c7d1a455cc915e8e3cf5f4bd8b75d09bc0f53965b0c9ca1383c52c8
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:facebook:zstandard
HOST_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/host-build.mk
HOST_MAKE_FLAGS = PREFIX=$(HOST_BUILD_PREFIX) HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0
$(eval $(call HostBuild))

View File

@ -0,0 +1,61 @@
From 06a57cf57e3c4e887cadcf688e3081154f3f6db4 Mon Sep 17 00:00:00 2001
Message-Id: <06a57cf57e3c4e887cadcf688e3081154f3f6db4.1589392463.git.mschiffer@universe-factory.net>
From: Bimba Shrestha <bimbashrestha@fb.com>
Date: Thu, 6 Feb 2020 14:10:51 -0800
Subject: [PATCH] [build-issue] More portable header prefix usage (#) (#1987)
* make 4.3 build issue fix
* Changing header name and adding comment
---
programs/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/programs/Makefile b/programs/Makefile
index b75314a83f43..a9ee3cb5311b 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -94,9 +94,12 @@ endif
VOID = /dev/null
+# Make 4.3 doesn't support '\#' anymore (https://lwn.net/Articles/810071/)
+NUM_SYMBOL := \#
+
# thread detection
NO_THREAD_MSG := ==> no threads, building without multithreading support
-HAVE_PTHREAD := $(shell printf '\#include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
+HAVE_PTHREAD := $(shell printf '$(NUM_SYMBOL)include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || echo 0)
ifeq ($(HAVE_THREAD), 1)
THREAD_MSG := ==> building with threading support
@@ -108,7 +111,7 @@ endif
# zlib detection
NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support
-HAVE_ZLIB := $(shell printf '\#include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
+HAVE_ZLIB := $(shell printf '$(NUM_SYMBOL)include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
ifeq ($(HAVE_ZLIB), 1)
ZLIB_MSG := ==> building zstd with .gz compression support
ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
@@ -119,7 +122,7 @@ endif
# lzma detection
NO_LZMA_MSG := ==> no liblzma, building zstd without .xz/.lzma support
-HAVE_LZMA := $(shell printf '\#include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
+HAVE_LZMA := $(shell printf '$(NUM_SYMBOL)include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
ifeq ($(HAVE_LZMA), 1)
LZMA_MSG := ==> building zstd with .xz/.lzma compression support
LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS
@@ -130,7 +133,7 @@ endif
# lz4 detection
NO_LZ4_MSG := ==> no liblz4, building zstd without .lz4 support
-HAVE_LZ4 := $(shell printf '\#include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
+HAVE_LZ4 := $(shell printf '$(NUM_SYMBOL)include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
ifeq ($(HAVE_LZ4), 1)
LZ4_MSG := ==> building zstd with .lz4 compression support
LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS
--
2.26.2