Add OpenWrt support for NanoPi R1

I found it, digging around.

I suggest that you do a git reset --hard HEAD^, git push -f to get rid of the merge commit (this just discards the last commit), and then your branch should be rebasable on the OpenWrt master, and your PR will be accepted.

Thanks for your work!

1 Like

one file at openwrt/master was modified. it is creating a conflict and still shows even after resolving the conflicts.

I will try to rebase again.


1 Like

Hello, I tried to modify the patch inoremap so that will for latest openwrt git but somehow the dts-Makefile wont be patched and a few steps before the build is finished I get an error ....

@balou1974 Try with this patch

from the PR here:

1 Like

.... uuuuh, looks like I missed a few words in my last post

@jayanta525: Thank you! I will try the new patch and will reply here :wink:

Hello, jayanta525!

I found a few errors in the last section of the patch,
-TABS- before the lines have been exchanged with -SPACES- and this leads to rejects while patching:

+@@ -78,6 +78,7 @@
+			clock-names = "cpu";
+			operating-points-v2 = <&cpu0_opp_table>;
+ 			#cooling-cells = <2>;
++			clock-frequency = <1296000000>;
+		};
+ 		cpu1: cpu@1 {
+@@ -88,6 +89,7 @@
+ 			clock-names = "cpu";
+ 			operating-points-v2 = <&cpu0_opp_table>;
+ 			#cooling-cells = <2>;
++			clock-frequency = <1296000000>;
+ 		};
+		cpu2: cpu@2 {
+@@ -98,6 +100,7 @@
+ 			clock-names = "cpu";
+ 			operating-points-v2 = <&cpu0_opp_table>;
+ 			#cooling-cells = <2>;
++			clock-frequency = <1296000000>;
+ 		};
+ 		cpu3: cpu@3 {
+@@ -108,6 +111,7 @@
+ 			clock-names = "cpu";
+ 			operating-points-v2 = <&cpu0_opp_table>;
+ 			#cooling-cells = <2>;
++			clock-frequency = <1296000000>;
+ 		};
+ 	};

... I will report if the fixed patch worked out fine!


Hello, jayanta525!

The resulting sdcard-image is working - Thanks a lot !!!

Link to the fixed patch:


Link to an working image:


patch -p1 < ~/Downloads/nanopi-r1/add-nano-pi-r1-new.patch
patching file package/boot/uboot-sunxi/Makefile
Hunk #1 succeeded at 144 with fuzz 1 (offset -22 lines).
Hunk #2 succeeded at 276 with fuzz 1 (offset -33 lines).
patching file package/boot/uboot-sunxi/patches/250-sun8i-h3-Nano-Pi-R1-add-device-tree.patch
patching file package/boot/uboot-sunxi/patches/251-sun8i-h3-Nano-Pi-R1-defconfig.patch
patching file target/linux/sunxi/base-files/etc/board.d/02_network
Hunk #1 FAILED at 8.
1 out of 1 hunk FAILED -- saving rejects to file target/linux/sunxi/base-files/etc/board.d/02_network.rej
can't find file to patch at input line 207
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|diff --git a/target/linux/sunxi/image/ b/target/linux/sunxi/image/
|index 8fa648176fb8..9b06628c18bd 100644
|--- a/target/linux/sunxi/image/
|+++ b/target/linux/sunxi/image/
File to patch: target/linux/sunxi/image/
patching file target/linux/sunxi/image/
Hunk #1 FAILED at 47.
1 out of 1 hunk FAILED -- saving rejects to file target/linux/sunxi/image/
patching file target/linux/sunxi/patches-5.4/062-ARM-dts-sun8i-add-support-for-Nano-Pi-R1.patch

$ git branch
* (HEAD detached at v19.07.2)

mismatch in patch

Wrong Version of openwrt ...

Please start a complete new checkout:

git clone openwrt_test
cd ./openwrt_test
patch -p1 < ~/Downloads/nanopi-r1/add-nano-pi-r1-new.patch
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
-choose the right target:
Target System (Allwinner A1x/A20/A3x/H3/H5/R40)
Subtarget (Allwinner A20/A3x/H3/R40)
Target Profile (FriendlyARM NanoPi R1)
-choose your packages
-Save and exit-
make defconfig
make menuconfig
-check if all is right

its working.

how can i make image for emmc?


please check FriendlyARM Wiki for that.
There is a tool called EFlasher but
I think you need to modify the SD-card-image.

Would you be able to help me set up a GitHub actions for this NanoPi R1? I have used your openwrt and it works but everytime i try myself it doesnt.

Sure, just give me a while.`

Thank you! That would be amazing. Is there a way to private message or email?

Could you take a look on NanoPi R1S? :slight_smile:

1 Like

Sure, I will need someone to provide me the UART logs.

1 Like

Support for NanoPi R1 has been merged into mainline OpenWrt.

Commit: e6d9f6fdffc6730cfa2019788afa411828eac816

Downloads will soon be available at