Add OpenWrt support for NanoPi R1

Do you have the patches that you are using to build these images available somewhere?

i created a PR at openwrt, its still hasn't gone through because of some conflicts.
you can find the fork here:

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.

2 Likes

https://www.friendlyarm.com/index.php?route=product/product&product_id=282

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

https://github.com/openwrt/openwrt/commit/f98cbe4256b6250c4a8b9731ca19440252771a16.patch

from the PR here: https://github.com/openwrt/openwrt/pull/2990

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!

THANKS A LOT FOR YOUR HELP!

Hello, jayanta525!

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

Link to the fixed patch:

[https://mega.nz/file/zrhR0ARZ#6OzurZf9GQeCD3kUV4q1i--HrgjcIDYz4M4WSKpo4OY]

Link to an working image:

[https://mega.nz/file/C2pWFArZ#AEygMcsIuVnk-oXx4fjLcWiuVVqWUBhGT0-r2rCKmeY]

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/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk
|index 8fa648176fb8..9b06628c18bd 100644
|--- a/target/linux/sunxi/image/cortexa7.mk
|+++ b/target/linux/sunxi/image/cortexa7.mk
--------------------------
File to patch: target/linux/sunxi/image/cortex-a7.mk
patching file target/linux/sunxi/image/cortex-a7.mk
Hunk #1 FAILED at 47.
1 out of 1 hunk FAILED -- saving rejects to file target/linux/sunxi/image/cortex-a7.mk.rej
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)
  master

mismatch in patch

Wrong Version of openwrt ...

Please start a complete new checkout:

git clone https://github.com/openwrt/openwrt.git 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
make

its working.
thanks

how can i make image for emmc?

Hello,

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