Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Apr 11, 2021
1 parent 40922f6 commit fcfa381
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 26 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ jobs:
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
--data '{"event_type": "update"}'
sleep 12
fi
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
sudo -E apt-get -qq purge azure-cli ghc* zulu* hhvm llvm* firefox powershell openjdk*
( sudo -E apt-get -qq purge dotnet* google* mysql* php* android*
( sudo -E apt-get -qq purge azure-cli ghc* zulu* hhvm llvm* firefox powershell openjdk* dotnet* google* mysql* php* android*
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq update
sudo -E apt-get -qq install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler ccache xsltproc rename antlr3 gperf wget curl swig rsync upx
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Build OpenWrt using GitHub Actions
- [CTCGFW's Team](https://github.com/immortalwrt/immortalwrt)
- [Lienol](https://github.com/Lienol/openwrt)
- [P3TERX](https://github.com/P3TERX/Actions-OpenWrt/blob/master/LICENSE)
- [X-WRT](https://github.com/x-wrt/x-wrt)
- [upload-release-action](https://github.com/svenstaro/upload-release-action)
- [Microsoft](https://www.microsoft.com)
- [Microsoft Azure](https://azure.microsoft.com)
Expand Down
19 changes: 19 additions & 0 deletions devices/XY-C5/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
2 changes: 0 additions & 2 deletions devices/common/default-settings
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ test $version -lt 1 && {

uci set uhttpd.main.rfc1918_filter=0
uci set uhttpd.main.redirect_https=0
uci set uhttpd.main.max_connections='200'
uci set uhttpd.main.max_requests='100'
uci commit uhttpd

SUBFIX=`echo -n $MACADDR | sed 's/://g' | tr a-z A-Z | tail -c4`
Expand Down
2 changes: 1 addition & 1 deletion devices/common/diy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#=================================================
rm -Rf feeds/custom/diy
rm -Rf feeds/packages/net/{smartdns,mwan3,miniupnpd,aria2,https-dns-proxy,shadowsocks-libev,frp,openvpn} feeds/luci/applications/luci-app-{dockerman,smartdns,frpc,frps,https-dns-proxy}
rm -Rf feeds/packages/net/{smartdns,mwan3,miniupnpd,aria2,nft-qos,https-dns-proxy,shadowsocks-libev,frp,openvpn} feeds/luci/applications/luci-app-{dockerman,nft-qos,smartdns,frpc,frps,https-dns-proxy}
rm -Rf feeds/packages/utils/cgroupfs-mount
./scripts/feeds update luci packages custom
./scripts/feeds install -a
Expand Down
19 changes: 19 additions & 0 deletions devices/k2p-32m-usb/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
3 changes: 1 addition & 2 deletions devices/nanopi-r4s/files/etc/config/cpufreq
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

config settings 'cpufreq'
option governor0 'schedutil'
option minfreq0 '816000'
option maxfreq0 '1800000'
option governor4 'schedutil'
option minfreq4 '816000'
option maxfreq4 '2208000'
option minfreq0 '816000'
19 changes: 19 additions & 0 deletions devices/newifi-d2/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
19 changes: 19 additions & 0 deletions devices/phicomm-k2p/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
19 changes: 19 additions & 0 deletions devices/redmi-ac2100/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
19 changes: 19 additions & 0 deletions devices/xiaomi-r3p/patches/tblsection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
+++ b/package/feeds/luci/luci-compat/luasrc/view/cbi/tblsection.htm
@@ -123,6 +123,7 @@ <h3><%=self.title%></h3>

local isempty, section, i, k = true, nil, nil
for i, k in ipairs(self:cfgsections()) do
+ if i <= 100 then
isempty = false
section = k

@@ -165,6 +166,8 @@ <h3><%=self.title%></h3>
</td>
<%- end -%>
</tr>
+ <%- i=i+1 -%>
+ <%- end -%>
<%- end -%>

<%- if isempty then -%>
46 changes: 29 additions & 17 deletions onekey/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,26 @@ fi


rm -Rf openwrt
git clone -b openwrt-21.02 --depth 1 https://github.com/openwrt/openwrt
svn co https://github.com/garypang13/Actions-OpenWrt/trunk/devices openwrt/devices
cd openwrt

echo "
1. X86_64
2. K2p
3. RedMi_AC2100
3. K2p 32M
4. r2s
4. RedMi_AC2100
5. r4s
5. r2s
6. newifi-d2
6. r4s
7. XY-C5
7. newifi-d2
8. Exit
8. XY-C5
9. Exit
"

Expand All @@ -78,37 +77,50 @@ case $CHOOSE in
break
;;
3)
firmware="redmi-ac2100"
firmware="k2p-32m-usb"
break
;;
4)
firmware="nanopi-r2s"
firmware="redmi-ac2100"
break
;;
5)
firmware="nanopi-r4s"
firmware="nanopi-r2s"
break
;;
6)
firmware="newifi-d2"
firmware="nanopi-r4s"
break
;;
7)
firmware="newifi-d2"
break
;;
8)
firmware="XY-C5"
break
;;
8) exit 0
9) exit 0
;;

esac
done

if [[ $firmware =~ (redmi-ac2100|phicomm-k2p|newifi-d2|k2p-32m-usb|XY-C5|xiaomi-r3p) ]]; then
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/ramips/mt7621/openwrt-sdk-21.02-SNAPSHOT-ramips-mt7621_gcc-8.4.0_musl.Linux-x86_64.tar.xz
git clone -b master --depth 1 https://github.com/x-wrt/x-wrt openwrt
svn co https://github.com/garypang13/Actions-OpenWrt/trunk/devices openwrt/devices
cd openwrt
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/ramips/mt7621/openwrt-sdk-21.02-SNAPSHOT-ramips-mt7621_gcc-8.4.0_musl.Linux-x86_64.tar.xz &
elif [[ $firmware =~ (nanopi-r2s|nanopi-r4s) ]]; then
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/rockchip/armv8/openwrt-sdk-21.02-SNAPSHOT-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64.tar.xz
git clone -b openwrt-21.02 --depth 1 https://github.com/openwrt/openwrt
svn co https://github.com/garypang13/Actions-OpenWrt/trunk/devices openwrt/devices
cd openwrt
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/rockchip/armv8/openwrt-sdk-21.02-SNAPSHOT-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64.tar.xz &
elif [[ $firmware == "x86_64" ]]; then
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/x86/64/openwrt-sdk-21.02-SNAPSHOT-x86-64_gcc-8.4.0_musl.Linux-x86_64.tar.xz
git clone -b openwrt-21.02 --depth 1 https://github.com/openwrt/openwrt
svn co https://github.com/garypang13/Actions-OpenWrt/trunk/devices openwrt/devices
cd openwrt
wget -cO sdk1.tar.xz https://mirrors.cloud.tencent.com/openwrt/releases/21.02-SNAPSHOT/targets/x86/64/openwrt-sdk-21.02-SNAPSHOT-x86-64_gcc-8.4.0_musl.Linux-x86_64.tar.xz &
fi


Expand Down
2 changes: 1 addition & 1 deletion onekey/recompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ echo
sleep 3s

if [ -f sdk1.tar.xz ]; then
mkdir sdk
mkdir sdk build_dir
tar -xJf sdk1.tar.xz -C sdk
cp -rf sdk/*/staging_dir/* ./staging_dir/
rm -rf sdk sdk1.tar.xz
Expand Down

0 comments on commit fcfa381

Please sign in to comment.