openwrt for the rock64
#11
(05-14-2021, 11:16 PM)helpmerock Wrote: Hi Wilson,
How to install this? There are three files - which file to use in Etcher?

rootfs - file - no boot partition <- a message in Eatcher
The other two files - rock64 does not boot.
Go for the sysupgrade with ext. The other sysupgrade would also work, but that filesystem is generally targeted for constrained devices
  Reply
#12
(05-15-2021, 02:20 PM)gechu Wrote:
(05-14-2021, 11:16 PM)helpmerock Wrote: Hi Wilson,
How to install this? There are three files - which file to use in Etcher?

rootfs - file - no boot partition <- a message in Eatcher
The other two files - rock64 does not boot.
Go for the sysupgrade with ext. The other sysupgrade would also work, but that filesystem is generally targeted for constrained devices
Thanks, Gechu,
I will try with an alternate image burner & post the result
  Reply
#13
used :openwrt-rockchip-armv8-pine64_rock64-ext4-sysupgrade.img.gz - extracted & burn image using Win32DiskImager - worked.

Booted & web interface on 192.168.1.1 - was conflicting with the existing router.

In setting changed OpenWrt to 192.168.2.1 & good to go.

Thanks Wilson & Gechu
  Reply
#14
Thank you, it works. Unfortunately, there aren't compiled modules for some very popular USB wifi adapters. In particular, I use MT7601AN and RTL8811AU. Do you think it's possible to compile support for those? I know they are well supported in mainline kernels, and both work fine in the Armbian version for Rock64.
Thanks!
  Reply
#15
Alternately, an even better solution @wilsonYan would be to have access to your toolchain/SDK, this way we could compile our own modules and packages without pestering you. Even a patch against the openwrt tree would work because I could then generate my own toolchain (I've done it frequently). Any help much appreciated.
  Reply
#16
Hello,

https://yadi.sk/d/TfX6-MYy3RTf5h?w=1

I've updated the build again, this one is more plain but hopefully more stable, unfortunately for the r8156 it's defaulting to the in-tree cdc_ncm driver and openwrt doesn't have the easy way of copying the udev rule file over. I hear you guys, i'll put the patches out. It's just that they aren't very clean.


Have a go enabling threading perhaps, some drivers seem to allow it e.g:

echo 1 > /sys/class/net/eth0/threaded
echo 1 > /sys/class/net/eth1/threaded


Also note that when initially setting up interfaces you may need to reboot for everything to take effect. It seems like the ongoing persistent problem is when you try to use two usb nics off the usb3.0 port, especially if you are bridging / bridging vlans etc.
  Reply
#17
for anyone interested these are the basic kernel patches:
the change to the ethernet node could probably go upstream

Code:
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 95ab6928cfd4..13385bf3daa6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -45,7 +45,8 @@ vcc_host_5v: vcc-host-5v-regulator {

    vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
        compatible = "regulator-fixed";
-        gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
+        enable-active-high;
+        gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&usb20_host_drv>;
        regulator-name = "vcc_host1_5v";
@@ -87,7 +88,8 @@ standby_led: led-1 {
    sound {
        compatible = "audio-graph-card";
        label = "rockchip,rk3328";
-        dais = <&i2s1_p0
+        dais = <&i2s0_p0
+            &i2s1_p0
            &spdif_p0>;
    };

@@ -161,12 +163,30 @@ &gmac2io {

&hdmi {
    status = "okay";
+
+    port@0 {
+        hdmi_p0_0: endpoint {
+            remote-endpoint = <&i2s0_p0_0>;
+        };
+    };
};

&hdmiphy {
    status = "okay";
};

+&i2s0 {
+    status = "okay";
+
+    i2s0_p0: port {
+        i2s0_p0_0: endpoint {
+            dai-format = "i2s";
+            mclk-fs = <256>;
+            remote-endpoint = <&hdmi_p0_0>;
+        };
+    };
+};
+
&i2c1 {
    status = "okay";

@@ -365,6 +385,9 @@ &tsadc {

&uart2 {
    status = "okay";
+
+    /delete-property/ dmas;
+    /delete-property/ dma-names;
};

&u2phy {
@@ -397,6 +420,15 @@ &usb_host0_ohci {
    status = "okay";
};

+&usbdrd3 {
+    status = "okay";
+};
+
+&usbdrd_dwc3 {
+    dr_mode = "host";
+    status = "okay";
+};
+
&vop {
    status = "okay";
};

Code:
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 13385bf3daa6..7711efd856a8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -148,17 +148,30 @@ &gmac2io {
    assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
    assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
    clock_in_out = "input";
-    phy-supply = <&vcc_io>;
+    phy-handle = <&rtl8211f>;
    phy-mode = "rgmii";
-    pinctrl-names = "default";
+    phy-supply = <&vcc_io>;
    pinctrl-0 = <&rgmiim1_pins>;
-    snps,force_thresh_dma_mode;
-    snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-    snps,reset-active-low;
-    snps,reset-delays-us = <0 10000 50000>;
-    tx_delay = <0x24>;
+    pinctrl-names = "default";
+    snps,aal;
    rx_delay = <0x18>;
+    tx_delay = <0x24>;
    status = "okay";
+
+    mdio {
+        compatible = "snps,dwmac-mdio";
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        rtl8211f: ethernet-phy@1 {
+            reg = <1>;
+            pinctrl-0 = <&eth_phy_reset_pin>;
+            pinctrl-names = "default";
+            reset-assert-us = <10000>;
+            reset-deassert-us = <50000>;
+            reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+        };
+    };
};

&hdmi {
@@ -323,6 +336,12 @@ &io_domains {
};

&pinctrl {
+    gmac2io {
+        eth_phy_reset_pin: eth-phy-reset-pin {
+            rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+        };
+    };
+
    ir {
        ir_int: ir-int {
            rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;

Hello again ! I've recently put together a new build.

CHANGES OF NOTE:

* Latest glibc / 5.10 kernel / openwrt packages
* Reworked the ethernet node in the DTS file ! (no more weird load problem and network restarts are possible without issue !)
* Led functionality is now enabled and configurable from GUI
* Small change copied from ayufan for power.
Small xhci change lifted from git.kernel.org


DOWNLOAD LINKS:

EXT4 Filesystem:
https://disk.yandex.com/d/K4d4knF7iBqkHw

SQUASHFS Filesystem:
https://disk.yandex.com/d/IG8mO4kMOPetwQ

TODO: 

* Release the patches I have that make this build  (see above post for the main kernel patches)
* Possibly get sound and display working
* Possibly add more packages/support for things like qos

OUTSTANDING:

* Asix ax88179 adapter is still unreliable for me  when plugged directly into the usb3 port. It appears to be much better when plugged into a usb3 hub (I haven't been able to crash it yet though i'm not sure this driver has ever been reliable when using bridging vendor or no vendor)

* I've switched the realtek r8152 driver to the vendor driver. The rtl8156 (2.5gbps) may stil be unreliable or only operate in 1gbps mode though.
  Reply
#18
I've just done one last update to latest mainline because it had a mac80211 update.
Sorry to people that already downloaded from the old links the above post has been edited to contain the latest links.
  Reply
#19
@wilsonYan ,  How to update this:

Details for package kmod-usb-net-rtl8152
Version: 5.10.80-1
Size: ~29.4 KB installed
Dependencies:
kernel VERSION INCOMPATIBLE
librt INSTALLED
libpthread INSTALLED
libgcc1 INSTALLED
kmod-usb-net INSTALLED
kmod-mii INSTALLED
kmod-usb-core INSTALLED
kmod-nls-base INSTALLED
kmod-crypto-hash INSTALLED
Description
Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors

The installed version of package kernel is not compatible, require 5.10.80-1-e591d70d… while 5.10.67-1-b9373165… is installed.


Attached Files Thumbnail(s)
   
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DietPi OS for ROCK64 MichaIng 33 6,103 11-28-2021, 02:37 PM
Last Post: MichaIng
  Armbian for Rock64 pineadmin 36 29,327 11-27-2021, 08:06 AM
Last Post: Wizzard
  slarm64 (unofficial slackware) Rock64 RK3328 (aarch64) mara 118 83,650 11-20-2021, 05:01 PM
Last Post: mara
  rock64-debian-mrfixit-190531.img.xz : missing /usr/lib/dri/rockchip_dri.so popi 5 1,170 08-12-2021, 04:55 AM
Last Post: igorp
  Centos 8 Stream on Rock64 ayoungdukie 1 904 06-07-2021, 11:50 AM
Last Post: zer0sig
  Talos on ROCK64 cjyar 2 1,030 06-04-2021, 11:50 AM
Last Post: cjyar
  CentOS 7 for Rock64 pineadmin 3 4,200 05-30-2021, 08:20 AM
Last Post: ayoungdukie
  Rock64 CRUX-ARM (aarch64) mara 0 665 05-27-2021, 02:22 PM
Last Post: mara
  RETRO-GAMING: UPDATED RELEASE OF RECALBOX FOR THE ROCK64 Mrfixit2001 32 29,365 05-22-2021, 07:01 AM
Last Post: fartadeadrian
  Setting a MAC on Rock64 U-Boot kiriakos 2 1,416 03-23-2021, 04:51 AM
Last Post: kiriakos

Forum Jump:


Users browsing this thread: 1 Guest(s)