Skip to content

Commit 94fe59e

Browse files
committed
2021-05-07 Always get latest version of vpn-policy-routing package
Remove watchdog (does not work)
1 parent b64dd9a commit 94fe59e

8 files changed

Lines changed: 107 additions & 22 deletions

File tree

.github/workflows/NanoPi-r2s-21.02.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ jobs:
128128
run: |
129129
echo "TZ=Europe/Paris" >>$GITHUB_ENV
130130
echo "Build_Date=$(date +%Y-%m-%d %H:%M)" >> $GITHUB_ENV
131-
echo "RELTAG=v$(date +'%Y%m%d.%H%M')" >> $GITHUB_ENV
131+
echo "RELTAG=$(date +'%Y%m%d.%H%M')" >> $GITHUB_ENV
132+
echo "RELDATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
132133
133134
- name: Organize files
134135
id: organize
@@ -138,15 +139,17 @@ jobs:
138139
mv build/openwrt/bin/targets/rockchip/armv8/*sysupgrade.img* ./artifact/
139140
cd ./artifact/
140141
ls -Ahl
142+
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-ext4-sysupgrade.img.gz OpenWrt-AO-21.02-$RELTAG-NanoPi-r2s-ext4.img.gz
143+
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-squashfs-sysupgrade.img.gz OpenWrt-AO-21.02-$RELTAG-NanoPi-r2s-squashfs.img.gz
144+
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz OpenWrt-AO-21.02-$RELTAG-NanoPi-r4s-ext4.img.gz
145+
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz OpenWrt-AO-21.02-$RELTAG-NanoPi-r4s-squashfs.img.gz
141146
gzip -d *.gz && exit 0
142147
gzip --best *.img
143148
ls -Ahl
144-
sha256sum openwrt*r2s* | tee NanoPI-R2S-AO-$RELTAG-21.02.sha256sum
145-
sha256sum openwrt*r4s* | tee NanoPI-R4S-AO-$RELTAG-21.02.sha256sum
146-
zip NanoPI-R2S-AO-$RELTAG-21.02-ext4.zip *r2s*ext4*
147-
zip NanoPI-R2S-AO-$RELTAG-21.02-sfs.zip *r2s*squashfs*
148-
zip NanoPI-R4S-AO-$RELTAG-21.02-ext4.zip *r4s*ext4*
149-
zip NanoPI-R4S-AO-$RELTAG-21.02-sfs.zip *r4s*squashfs*
149+
zip OpenWrt-AO-21.02-$RELTAG-NanoPi-r2s-ext4.zip *r2s*ext4*
150+
zip OpenWrt-AO-21.02-$RELTAG-NanoPi-r2s-squashfs.zip *r2s*squashfs*
151+
zip OpenWrt-AO-21.02-$RELTAG-NanoPi-r4s-ext4.zip *r4s*ext4*
152+
zip OpenWrt-AO-21.02-$RELTAG-NanoPi-r4s-squashfs.zip *r4s*squashfs*
150153
cp ../build/openwrt/*.config ./
151154
ls -Ahl
152155
- name: Upload artifact
@@ -161,11 +164,11 @@ jobs:
161164
uses: ncipollo/release-action@v1.8.4
162165
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
163166
with:
164-
name: OpenWrt 21.02
167+
name: OpenWrt 21.02 ${{ env.RELDATE }}
165168
allowUpdates: true
166-
tag: r2s-21.02
169+
tag: r2s-21.02-${{ env.RELDATE }}
167170
commit: main
168171
replacesArtifacts: true
169172
token: ${{ secrets.GITHUB_TOKEN }}
170173
bodyFile: "release-info-r2s-21.02.md"
171-
artifacts: ./artifact/*.zip,./artifact/*.config,./artifact/*.sha256sum
174+
artifacts: ./artifact/*.zip

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
2021-05-07 Always get latest version of vpn-policy-routing package
4+
Remove watchdog (does not work)
5+
2021-04-29 Add more packages, add snd-usb-caiaq module

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44

55
##### Download: [Releases](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/releases) or [Actions](https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/actions) \(Login Needed\)
66
- - -
7-
## Introduction
8-
- ### Config
9-
OpenWRT 21.02 / Kernel 5.4 / NanoPi r2s/r4s patches / r8168 ethernet driver<br/>
7+
### Introduction
8+
Those are my customized builds of OpenWrt for FriendlyARM NanoPi R2S / R4S
9+
10+
### Config
11+
- OpenWRT 21.02 Vanilla / Kernel 5.4
12+
- Some ImmortalWRT patches for Rockchip target NanoPi R2S (rk3328) / NanoPi R4S support (rk3399) (avoiding the ones creating kernel oopses)
13+
- NanoPi R2S : r8152 driver v1.11.11 backport from kernel 5.10 + realtek r8169 firmwares package
14+
- NanoPi R4S : r8168 driver for R4S (realtek) instead of kernel r8169 + r8169 firmwares package
15+
16+
### Applications
17+
- A useful set of applications from official OpenWrt package feed
18+
- vpn-routing-policy latest version from https://github.com/stangri/source.openwrt.melmac.net
1019

11-
- ### Applications
12-
Only applications from official OpenWrt package feed
13-
- - -
1420

1521
### Thanks to Original Project:
1622
- [quintus-lab](https://github.com/quintus-lab/OpenWRT-Rockchip)

local-scripts/build_r2s.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
#!/bin/bash
4+
ROOTDIR=$(pwd)
5+
echo $ROOTDIR
6+
if [ ! -e "$ROOTDIR/build" ]; then
7+
echo "Please run from root / no build dir"
8+
exit 1
9+
fi
10+
11+
BUILDDIR="$ROOTDIR/build"
12+
cd $BUILDDIR
13+
14+
# update instead of cloning
15+
cd $BUILDDIR/openwrt-fresh-2102
16+
git pull
17+
cd $BUILDDIR/immortal-fresh-2102
18+
git pull
19+
20+
cd $ROOTDIR
21+
echo -n "Step 02...\n------------------------------"
22+
./steps/02_prepare_openwrt_folder_2102.sh
23+
echo -n "Step 03...\n------------------------------"
24+
./steps/r2s/03_patch_openwrt_2102.sh
25+
echo -n "Step 04...\n------------------------------"
26+
./steps/04-prepare_package.sh
27+
echo -n "Step 05...\n------------------------------"
28+
./steps/05-create_luci_acl.sh
29+
echo -n "Step 06...\n------------------------------"
30+
./steps/06-create_config_from_seed.sh
31+
32+
cd $BUILDDIR/openwrt
33+
make -j 12
34+
35+

patches/kernel-5.4/995-watchdog-rk3328.patch

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,22 @@ index bbdb19a3e..1e3e1086e 100644
2626
reg = <0x0 0xff1a0000 0x0 0x100>;
2727
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
2828
clocks = <&cru PCLK_WDT>;
29+
+ status = "disabled";
30+
};
2931
--
30-
2.11.0
32+
2.11.0
33+
34+
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
35+
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
36+
@@ -416,6 +416,10 @@
37+
status = "okay";
38+
};
39+
40+
+&wdt {
41+
+ status = "okay";
42+
+};
43+
+
44+
&usbdrd3 {
45+
status = "okay";
46+
};
47+
--

seed/ao.seed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ CONFIG_PACKAGE_tinyproxy=y
389389
CONFIG_PACKAGE_uclibcxx=y
390390
CONFIG_PACKAGE_uhttpd=y
391391
CONFIG_PACKAGE_uhttpd-mod-ubus=y
392+
CONFIG_PACKAGE_vpn-policy-routing=y
392393
CONFIG_PACKAGE_wget-ssl=y
393394
CONFIG_PACKAGE_wireguard-tools=y
394395
CONFIG_PACKAGE_wireless-regdb=y

steps/04-prepare_package.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,24 @@ cd "$ROOTDIR/build"
1010

1111
# install feeds
1212
cd openwrt
13-
./scripts/feeds update -a && ./scripts/feeds install -a
13+
14+
# add stangri repo source from github
15+
sed -i '/stangri_repo/d' feeds.conf.default
16+
! grep -q 'stangri_repo' feeds.conf.default && sed -i '5 i\src-git stangri_repo https://github.com/stangri/source.openwrt.melmac.net' feeds.conf.default
17+
18+
./scripts/feeds update -a
19+
./scripts/feeds install -a -p packages
20+
./scripts/feeds install -a -p luci
21+
./scripts/feeds install -a -p routing
22+
./scripts/feeds install -a -p telephony
23+
24+
# replace vpn routing packages
25+
./scripts/feeds uninstall vpn-policy-routing
26+
./scripts/feeds install -p stangri_repo vpn-policy-routing
27+
28+
# this does not work
29+
#./scripts/feeds uninstall luci-app-vpn-policy-routing
30+
#./scripts/feeds install -p stangri_repo luci-app-vpn-policy-routing
1431

1532
# Time stamp with $Build_Date=$(date +%Y.%m.%d)
1633
echo -e '\nAO Build@'$(date "+%Y.%m.%d")'\n' >> package/base-files/files/etc/banner

steps/r2s/03_patch_openwrt_2102.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ cp $BUILDDIR/immortal-fresh-$IMMORTAL_SUFFIX/package/libs/mbedtls/patches/100-Im
9494
package/libs/mbedtls/patches/
9595

9696
# enable watchdog
97-
sed -i 's/# CONFIG_WATCHDOG is not set/CONFIG_WATCHDOG=y/' target/linux/rockchip/armv8/config-5.4
98-
sed -i '/CONFIG_WATCHDOG=y/a CONFIG_DW_WATCHDOG=y' target/linux/rockchip/armv8/config-5.4
99-
cp $ROOTDIR/patches/kernel-5.4/995-watchdog-rk3328.patch target/linux/rockchip/patches-5.4/
100-
cp $ROOTDIR/patches/kernel-5.4/996-watchdog-rk3399.patch target/linux/rockchip/patches-5.4/
97+
#sed -i 's/# CONFIG_WATCHDOG is not set/CONFIG_WATCHDOG=y/' target/linux/rockchip/armv8/config-5.4
98+
#sed -i '/CONFIG_WATCHDOG=y/a CONFIG_DW_WATCHDOG=y' target/linux/rockchip/armv8/config-5.4
99+
#cp $ROOTDIR/patches/kernel-5.4/995-watchdog-rk3328.patch target/linux/rockchip/patches-5.4/
100+
#cp $ROOTDIR/patches/kernel-5.4/996-watchdog-rk3399.patch target/linux/rockchip/patches-5.4/
101+
#cp $ROOTDIR/patches/kernel-5.4/997-clk-rk3328.patch target/linux/rockchip/patches-5.4/
101102

102103
# enable crypto
103104
if ! grep -q "0002-kernel-crypto.addon" target/linux/rockchip/armv8/config-5.4; then

0 commit comments

Comments
 (0)