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
#20
(11-26-2021, 08:01 PM)helpmerock Wrote: @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.

Hiya, there is a semi-active fork of openwrt at https://github.com/lucize/openwrt/tree/rk3328 which supports building for the rock64.

I recently rebased it on openwrt/master so my fork is more up to date and should support up-to-date packages.
https://github.com/CanadianBaconBoi/openwrt/tree/rk3328

Here it is in the Target Profile screen.
[Image: 2PniRYy.png]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgrading ancient Rock64 timxjr1300 1 71 Yesterday, 09:47 AM
Last Post: dmitrymyadzelets
  irradium (based on crux linux) Rock64 riscv64, aarch64 mara 7 1,015 11-19-2024, 02:54 PM
Last Post: mara
  arch rock64 does not boot nemnob 1 962 09-20-2024, 11:18 AM
Last Post: AwU2HBg
  DietPi OS for ROCK64 MichaIng 42 43,701 09-01-2024, 06:43 AM
Last Post: RaymondDay
Smile First Lakka image for Rock64! Luke 47 81,343 09-01-2024, 06:05 AM
Last Post: RaymondDay
  Rock64 v2 - did not work song / audio sqw200zu 2 1,866 03-14-2024, 03:09 AM
Last Post: dmitrymyadzelets
  Rock64 won't boot dstallmo 0 636 12-27-2023, 10:34 AM
Last Post: dstallmo
  HDMI doesn't work on rock64 Noung1991 1 1,078 11-21-2023, 08:33 AM
Last Post: as365n4
  Rock64 + Klipper + KlipperScreen Instructions godzilla62 0 1,084 10-22-2023, 01:52 AM
Last Post: godzilla62
  Rock64 Debian 11 (Bullseye) install problem jbize 15 11,253 10-12-2023, 05:14 PM
Last Post: tpaul

Forum Jump:


Users browsing this thread: 3 Guest(s)