Add OpenWrt support for NanoPi R1

@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

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 https://downloads.openwrt.org/snapshots/targets/sunxi/cortexa7/

4 Likes

hello,
now sd card image working fine with tc
i had check with eflasher tool.
but its based on 4.14.111
again tc not work.
i need help to build emmc image

Is wireless working?

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

Sorry I have only little knowledge about this, so could you tell me how to get UART logs in detail?

hello,
i need to build emmc image,
please help me.
friendlywrt has tool to create emmc image.
but it's kernel is 4.14.111

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.