OpenWRT on the Rock64
#1
I have started the process of getting OpenWRT working on the Rock64.

I have a working image alongside a custom repo for packages which can be found here, download links for the SD Card images are front and centre: https://openwrt.cdnbcn.net/

When installing the SD Card image, you will have to manually configure /etc/opkg/distfeeds.conf with my custom repo, however I'll fix this in a later build.

The main issues currently are as follows:
    - USB3 port isn't working
    - Onboard Ethernet doesn't reset correctly 100% of the time

The source code can be found at https://github.com/CanadianBaconBoi/openwrt/tree/rock64.
It is based on the work of lucize however it has been updated for a modern version of OpenWRT.

There is a thread with some fixes for the aforementioned issues below, however I have been short on time recently and haven't been able to get around to implementing them yet.
https://forum.pine64.org/showthread.php?tid=11012

Any help would be greatly appreciated in pulling these in, I'll continue to host the package repo for free until this is pulled into upstream.
  Reply
#2
Thanks, CanadianBacon,

Used win32diskimager - did not work. Used Linux - dd method did not work.

mine Rock64 is V2 - No USB boot enable. (https://github.com/ayufan-rock64/linux-b...ash-spi.md)

What's your version? Did you enable USB boot in past? If yes, it sometimes does not boot with regular images.
  Reply
#3
(03-14-2022, 08:18 AM)helpmerock Wrote: Thanks, CanadianBacon,

Used win32diskimager - did not work. Used Linux - dd method did not work.

mine Rock64 is V2 - No USB boot enable. (https://github.com/ayufan-rock64/linux-b...ash-spi.md)

What's your version? Did you enable USB boot in past? If yes, it sometimes does not boot with regular images.

I have a Rock64 V2 also and I haven't enabled USB boot.

I'll outline the exact steps I took;
1. Download SD card image from here
2. Open CMD and run gzip -d `openwrt-snapshot-r19092-7abce5da96-rockchip-armv8-pine64_rock64-ext4-sysupgrade.img.gz` to decompress in place
3. Open Win32DiskImager, select image, and burn to SD card.
4. Connect Ethernet on rock64 to laptop
5. ssh into root@192.168.1.1
  Reply
#4
Thanks CanadianBacon,

First Bad news: I tried all as well as another SD card but did not boot.
Now, Good News: I installed old OpenWrt then for the firmware update - used your image. It worked.

Now, I have to play & let you know.

I could not update file: distfeeds.conf. When I inserted the SD card in Linux & try to edit - it says read ONLY.

Can I update in GUI in OpenWRT?
  Reply
#5
(03-15-2022, 09:41 AM)helpmerock Wrote: Thanks CanadianBacon,

First Bad news: I tried all as well as another SD card but did not boot.
Now, Good News:  I installed old OpenWrt then for the firmware update - used your image. It worked.

Now, I have to play & let you know.

I could not update file: distfeeds.conf. When I inserted the SD card in Linux & try to edit - it says read ONLY.

Can I update in GUI in OpenWRT?

On my image distfeeds.conf is editable, it's possible the old image you have mounts it as readonly, you could try to modify the image you have.
You should also make sure you are root when you edit the file.
  Reply
#6
(03-14-2022, 01:44 PM)CanadianBacon Wrote:
(03-14-2022, 08:18 AM)helpmerock Wrote: Thanks, CanadianBacon,

Used win32diskimager - did not work. Used Linux - dd method did not work.

mine Rock64 is V2 - No USB boot enable. (https://github.com/ayufan-rock64/linux-b...ash-spi.md)

What's your version? Did you enable USB boot in past? If yes, it sometimes does not boot with regular images.

I have a Rock64 V2 also and I haven't enabled USB boot.

I'll outline the exact steps I took;
1. Download SD card image from here
2. Open CMD and run gzip -d `openwrt-snapshot-r19092-7abce5da96-rockchip-armv8-pine64_rock64-ext4-sysupgrade.img.gz` to decompress in place
3. Open Win32DiskImager, select image, and burn to SD card.
4. Connect Ethernet on rock64 to laptop
5. ssh into root@192.168.1.1

worked for me Smile
big thanks

for second ethernet I connected TP-Link UE300 (kmod-usb-net-rtl8152) with USB2 port, USB3 not functioning like you said

opkg update not working with custom repo!

Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://openwrt.cdnbcn.net/targets/rockc...ckages.sig
Signature check failed.
Remove wrong Signature file.
  Reply
#7
(03-14-2022, 08:18 AM)helpmerock Wrote: Thanks, CanadianBacon,

Used win32diskimager - did not work. Used Linux - dd method did not work.

mine Rock64 is V2 - No USB boot enable. (https://github.com/ayufan-rock64/linux-b...ash-spi.md)

What's your version? Did you enable USB boot in past? If yes, it sometimes does not boot with regular images.

I had the same issue, but after hooking up a serial cable it turns out the issue is that I flashed ayufans spi-boot image a long time ago and that version of u-boot was incapable of decompressing the kernel used in this openwrt image.  The fix was erasing the spi, so the uboot version on the sdcard could handle the kernel decompression.
  Reply
#8
Is it possible to flash and boot this from SPI?
  Reply
#9
i've finally got around to doing a new build of openwrt for the rock64 (sdcard) (it's headless no hdmi)

Using latest glibc / linux kernel 5.15.77 / switched to firewall4  / added bridger / watchcat / basic samba4 network sharing


https://disk.yandex.com/d/K4d4knF7iBqkHw                  ext4    (just use this one if you don't know)
https://disk.yandex.com/d/IG8mO4kMOPetwQ               squashfs
https://disk.yandex.com/d/Bh6bzY-V76XqPQ                   rootfs

NOTES :
* for some reason mount points don't seem super solid so you'll have to edit fstab manually perhaps or add a mount command in the startup or /etc/rc.local
* using samba4 because ksmbd runs out of memory on large files, but samba4 also runs out of memory unless you tick "force syncronous i/o"
* I decided to try dropping dropbear in favor of sshd, this might mean you have to set a root password  via the web interface before you can ssh in (it might not)
* included patches to enable usb3.0 phy/dmc/rng drivers from here
* USB3 port might actually be stable, this image tries enabling a couple of dwc3 quirks normally on other socs

EDIT:
Just did one last update to incorporate https://github.com/openwrt/openwrt/pull/11163 (but for all targets). the ax88179, seems to benefit from using the performance governor or increasing the minimum scaling frequency.
eg. "echo performance > /sys/bus/cpu/devices/cpu0/cpufreq/scaling_governor"
You can have this setting go through on bootup by putting the line in the "system -> startup -> local startup" section.
If you use software flow offload for the firewall you can also add "nft add flowtable inet fw4 ft { counter }" to make traffic counting work.
That's the last one from me for a while.
  Reply
#10
Did a final refresh today and plan on leaving it for a while. Added a few more things like nload and btop (works nicely with kde konsole)

Anyway, this build appears to be definitely usable as a basic firewall when connected to a switch with vlan support or using usb adapters, the wireguard functionality also works, I haven't tested any wireless. The only major annoyance with it is the USB3 port may be limited bi-directionally to 1gbps or so BUT it is reliable with a rtl8153 adapter; which I can confirm can send and recieve simultaneously over 950 mbits/s on iperf3. So I assume it is then capable of routing a 1gb/s internet connection since the onboard nic also is capable of those speeds.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 No Audio @ Debian 12 dmitrymyadzelets 2 1,111 04-08-2024, 06:47 AM
Last Post: dmitrymyadzelets
  Rock64 bricked shawwwn 7 7,015 03-17-2024, 12:22 PM
Last Post: dmitrymyadzelets
  Rock64 won't boot luminosity7 10 6,013 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 741 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  How well does Rock64 deal with HDR and Atmos on Kodi? drvlikhell 3 2,706 04-29-2023, 04:24 AM
Last Post: newestssd
  Rock64 board not working, no HDMI no Ethernet. EDited 3 4,284 01-17-2023, 02:31 PM
Last Post: Flagtrax
  ROCK64 v3 can it boot from USB? Tsagualsa 4 2,963 11-29-2022, 11:31 AM
Last Post: Macgyver
  rock64 v3 spiflash Macgyver 0 1,054 11-28-2022, 02:18 PM
Last Post: Macgyver
  my rock64 dosen't work rookie_267 0 1,248 10-07-2022, 07:50 PM
Last Post: rookie_267
  Rock64 u-boot for eMMC Build Error mexicanflyer 0 1,395 09-18-2022, 02:29 PM
Last Post: mexicanflyer

Forum Jump:


Users browsing this thread: 2 Guest(s)