forked from WikiHacker/WikiHacker-R4S-FriendlyWRT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6fe10ef
Showing
14 changed files
with
9,410 additions
and
0 deletions.
There are no files selected for viewing
211 changes: 211 additions & 0 deletions
211
.github/workflows/NanoPi-R4S RK3399 OpenWrt 19.07 Build.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
name: NanoPi-R4S RK3399 OpenWrt 19.07 Build | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
# schedule: | ||
# - cron: 0 17 * * * | ||
# watch: | ||
# types: started | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
ref: main | ||
|
||
- name: Initialize Environment | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
sudo apt-get update | ||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android/sdk | ||
sudo docker image prune -a -f | ||
sudo apt-get -y install upx-ucl unzip subversion | ||
sudo apt-get -y purge dotnet* ghc* google* llvm* mysql* php* zulu* firefox hhvm | ||
sudo apt-get -y autoremove --purge | ||
wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash | ||
#- name: Setup Debug Session | ||
# uses: P3TERX/debugger-action@master | ||
|
||
- name: Install Repo | ||
run: | | ||
git clone https://github.com/friendlyarm/repo | ||
sudo cp repo/repo /usr/bin/ | ||
- name: Download Source | ||
run: | | ||
rm -rf code | ||
mkdir code | ||
cd code | ||
repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v19.07.5 -m rk3399.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle | ||
repo sync -c --no-clone-bundle -j8 | ||
- name: Merge LEDE | ||
run: | | ||
cd code | ||
git clone https://github.com/coolsnowwolf/lede | ||
cd friendlywrt | ||
cp -r ../lede/package/lean package/ | ||
cp -r ../lede/package/libs/pcre package/libs/ | ||
sed -i 's/^src-git luci.*/src-git luci https:\/\/github.com\/coolsnowwolf\/luci/' feeds.conf.default | ||
sed -i 's/^src-git packages.*/src-git packages https:\/\/github.com\/coolsnowwolf\/packages;openwrt-19.07/' feeds.conf.default | ||
echo 'src-git node https://github.com/nxhack/openwrt-node-packages.git' >> feeds.conf.default | ||
- name: Install Extra Packages | ||
run: | | ||
cd code/friendlywrt/package | ||
git clone https://github.com/rufengsuixing/luci-app-adguardhome | ||
git clone https://github.com/jerrykuku/lua-maxminddb.git | ||
git clone https://github.com/jerrykuku/luci-app-vssr.git | ||
rm -rf lean/luci-theme-argon | ||
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git | ||
svn co https://github.com/vernesong/OpenClash/trunk/luci-app-openclash | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/luci-app-passwall | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/tcping | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/ssocks | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/trojan-plus | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/trojan-go | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/naiveproxy | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/brook | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/chinadns-ng | ||
svn co https://github.com/xiaorouji/openwrt-passwall/trunk/xray-core | ||
# svn co https://github.com/songchenwen/nanopi-r2s/trunk/luci-app-r2sflasher | ||
svn co https://github.com/pymumu/smartdns/trunk/package/openwrt smartdns | ||
svn co https://github.com/pymumu/luci-app-smartdns/branches/lede luci-app-smartdns | ||
git clone https://github.com/jerrykuku/luci-app-jd-dailybonus.git | ||
git clone https://github.com/NateLol/luci-app-oled | ||
- name: Install Clash Binaries | ||
run: | | ||
cd code/friendlywrt/package/base-files/files | ||
mkdir -p etc/openclash/core | ||
# for updates, go to: https://github.com/Dreamacro/clash/releases | ||
wget -qO- https://github.com/Dreamacro/clash/releases/download/v1.3.5/clash-linux-armv8-v1.3.5.gz | gunzip -c > etc/openclash/core/clash | ||
# for updates, go to: https://github.com/vernesong/OpenClash/releases/tag/TUN-Premium | ||
wget -qO- https://github.com/vernesong/OpenClash/releases/download/TUN-Premium/clash-linux-armv8-2021.01.01.g0ab75c5.gz | gunzip -c > etc/openclash/core/clash_tun | ||
# for updates, go to: https://github.com/vernesong/OpenClash/releases/tag/TUN | ||
wget -qO- https://github.com/vernesong/OpenClash/releases/download/TUN/clash-linux-armv8.tar.gz | tar xOvz > etc/openclash/core/clash_game | ||
chmod +x etc/openclash/core/clash* | ||
- name: Update Target.mk | ||
run: | | ||
cd code/friendlywrt/include | ||
sed -i 's/dnsmasq /dnsmasq-full default-settings luci /' target.mk | ||
- name: Update Feeds | ||
run: | | ||
cd code/friendlywrt | ||
./scripts/feeds update -a | ||
./scripts/feeds install -a | ||
- name: Install Mods | ||
run: | | ||
cd code | ||
rm -rf friendlywrt/feeds/packages/libs/libcap | ||
svn co https://github.com/openwrt/packages/trunk/libs/libcap friendlywrt/feeds/packages/libs/libcap | ||
rm -rf friendlywrt/package/feeds/packages/netdata | ||
svn co https://github.com/openwrt/packages/trunk/admin/netdata friendlywrt/package/feeds/packages/netdata | ||
rm -rf friendlywrt/feeds/packages/libs/libnatpmp | ||
svn co https://github.com/coolsnowwolf/packages/trunk/libs/libnatpmp friendlywrt/feeds/packages/libs/libnatpmp | ||
rm -rf friendlywrt/feeds/packages/lang/luasec | ||
svn co https://github.com/coolsnowwolf/packages/trunk/lang/luasec friendlywrt/feeds/packages/lang/luasec | ||
sed -i '/STAMP_BUILT/d' friendlywrt/feeds/packages/utils/runc/Makefile | ||
sed -i '/STAMP_BUILT/d' friendlywrt/feeds/packages/utils/containerd/Makefile | ||
sed -i '/upx/d' friendlywrt/package/lean/frp/Makefile | ||
wget -O friendlywrt/package/kernel/kmod-sched-cake/Makefile https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/kmod-sched-cake-oot/Makefile | ||
wget -O friendlywrt/feeds/packages/libs/libxml2/Makefile https://raw.githubusercontent.com/coolsnowwolf/packages/master/libs/libxml2/Makefile | ||
sed -i "/redirect_https/d" friendlywrt/package/network/services/uhttpd/files/uhttpd.config | ||
sed -i '/Load Average/i\\t\t<tr><td width="33%"><%:CPU Temperature%></td><td><%=luci.sys.exec("cut -c1-2 /sys/class/thermal/thermal_zone0/temp")%><span>℃</span></td></tr>' friendlywrt/feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm | ||
sed -i 's/pcdata(boardinfo.system or "?")/"ARMv8"/' friendlywrt/feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm | ||
sed -i 's/services/vpn/g' friendlywrt/package/feeds/luci/luci-app-openvpn/luasrc/controller/openvpn.lua | ||
sed -i 's/resolv.conf.d\/resolv.conf.auto/resolv.conf.auto/g' friendlywrt/package/lean/luci-app-flowoffload/root/etc/init.d/flowoffload | ||
sed -i '/done/imkfs.ext4 \/dev\/mmcblk0p2 && mkdir \/mnt\/mmcblk0p2 && mount \/dev\/mmcblk0p2 \/mnt\/mmcblk0p2 && mount \/dev\/mmcblk0p2 \/opt\n' ./friendlywrt/package/base-files/files/root/setup.sh | ||
# sed -i 's/\/root/\/mnt\/mmcblk0p2/g' ./friendlywrt/package/luci-app-r2sflasher/root/usr/bin/rom_flash | ||
- name: Patch Kernel | ||
run: | | ||
cd code/kernel/ | ||
#git apply ../../patches/001-add-full_cone_nat.patch | ||
- name: Custom Configure Files | ||
run: | | ||
rm -f code/friendlywrt/.config* | ||
cp r4s-rk3399-config code/configs/config_rk3399 | ||
- name: Set Default Values | ||
run: | | ||
cd code/friendlywrt | ||
sed -i '/uci commit luci/i\uci set luci.main.mediaurlbase=/luci-static/argon' package/lean/default-settings/files/zzz-default-settings | ||
- name: Install UPX | ||
run: | | ||
ln -s /usr/bin/upx-ucl code/friendlywrt/staging_dir/host/bin/upx | ||
- name: Build OpenWrt | ||
run: | | ||
cd code | ||
sed -i 's/set -eu/set -u/' scripts/mk-friendlywrt.sh | ||
./build.sh nanopi_r4s.mk | ||
- name: Fix Rootfs Owner and Group | ||
run: | | ||
lodev=$(sudo losetup -P -f --show code/out/*.img) | ||
sudo rm -rf /mnt/friendlywrt-tmp | ||
sudo mkdir -p /mnt/friendlywrt-tmp | ||
sudo mount "$lodev""p8" /mnt/friendlywrt-tmp | ||
sudo chown -R root:root /mnt/friendlywrt-tmp | ||
sudo umount /mnt/friendlywrt-tmp | ||
sudo losetup -d $lodev | ||
- name: Assemble Artifact | ||
run: | | ||
rm -rf ./artifact/ | ||
mkdir -p ./artifact/ | ||
#find code/out/ -name "FriendlyWrt_*img" | xargs -I{} sh -c 'f=$(basename $1); zip -r -j "./artifact/${f}.zip" $1' sh {} \; | ||
cp code/out/*.img.zip ./artifact/ | ||
cp code/friendlywrt/.config ./artifact/ | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: FriendlyWrt_NanoPi-R4S RK3399 v19.07 | ||
path: ./artifact/ | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: ncipollo/[email protected] | ||
with: | ||
name: FriendlyWrt_NanoPi-R4S RK3399 v19.07 | ||
allowUpdates: true | ||
tag: 202102 | ||
commit: main | ||
replacesArtifacts: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: ./artifact/*.zip,./artifact/*.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# NanoPi R4S FriendlyWRT Firmware | ||
|
||
## Tips | ||
* Default Gateway: 192.168.2.1 | ||
* Default Password: password | ||
|
||
## Join Telegram: https://t.me/wikimao | ||
|
||
## Features | ||
* [SuLingGG/OpenWrt-Rpi/README.md](https://github.com/SuLingGG/OpenWrt-Rpi/blob/main/README.md) | ||
|
||
## References | ||
* https://github.com/SuLingGG/OpenWrt-Rpi | ||
* https://github.com/P3TERX/Actions-OpenWrt | ||
![Alt text](images/nanopir4s.jpg?raw=true "Title") |
Oops, something went wrong.