Setup an Odroid H2+ with OpenWrt

Hello :slight_smile:

I've recently planned to change my actual router for a more powerfull one (should be handle to support a VPN, Seedbox and eventually an IDS), I was interested about using the OdroidH2+ to build my new router. But before buying all the part, I was wondering :

  • How can I build the image for the Odroid ? Is there any tutorial/ressource that could be helpfull ?
  • Do you think it could be able to handle an IDS like Snort (I'll never had more than 2 or 3 devices connected at the same time) ?
  • Do you think that SSD would be better for setting up a seedbox on this device (since they are more expensive than internal HDD) ?

Thanks in advance :smiley: and have a nice day !

1 Like

Just an x86 efi image as far I know, but the RTL8125B driver will probably still present an issue; there are a couple of threads here. Personally I would be inclined to just an eMMC and put the 2.5Gb pipe to use to a device down the wire.

https://lkml.kernel.org/r/1cf79621-63ab-0886-3a23-2c9b3625c23f@gmail.com

Just two reasonably concise patches (plus firmware), shouldn't be too hard to backport to OpenWrt's kernel 5.4 in master (and contrary to a full-on switch to Realtek's vendor driver this would very probably be acceptable to be merged to master and ideally also in time for openwrt-2020.xy)

3 Likes

Thanks, so I guess the best thing to do would be to wait for the next OpenWrt release ? :slight_smile: In case of, do you know any alternative hardware with similar specs and fully compatible with OpenWrt ?

Yes, things are reported as working correctly with 5.9.rc1 on the Hardkernel forum, should not take much to backport and test on a 5.4 OpenWrt image.

Firmware for RTL8125B is already in master .https://github.com/openwrt/openwrt/commit/18aca6b17dd22791741645a84a9ca543ec2ef124

3 Likes

The next OpenWrt release (20.xy.0) will ship with kernel 5.4, which does not yet contain those patches. If you want to see RTL8125B supported, "someone" (--> you) will have to provide a tested backport for master soon, now.

I would love to help and see it supported, but I have absolutely no idea how to do it :frowning:

My Odroid H2+ board arrived today, first intent to backport the driver fail, then tried with the Realtek driver and the good news is that the vendor driver is working well.
OpenWrt makefile for the rtl8125 can be found here:https://github.com/coolsnowwolf/lede/blob/master/package/lean/r8125/Makefile
Iperf test:

 OpenWrt SNAPSHOT, r14358-76368a5c0a
 -----------------------------------------------------
root@OpenWrt:/# dmesg | grep DMI:
[    0.000000] DMI: HARDKERNEL ODROID-H2/ODROID-H2, BIOS 5.13 04/27/2020
root@OpenWrt:/# dmesg | grep r8125
[   13.367760] r8125 2.5Gigabit Ethernet driver 9.003.05-NAPI loaded
[   13.728908] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[   13.744719] r8125  Copyright (C) 2020  Realtek NIC software team <nicfae@realtek.com> 
[   13.781962] r8125 2.5Gigabit Ethernet driver 9.003.05-NAPI loaded
[   14.144365] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[   14.160130] r8125  Copyright (C) 2020  Realtek NIC software team <nicfae@realtek.com> 
[   22.608450] r8125: eth1: link up
[   23.045707] r8125: eth0: link up
root@OpenWrt:/# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.1.227, port 55950
[  5] local 192.168.1.1 port 5201 connected to 192.168.1.227 port 55951
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   268 MBytes  2.25 Gbits/sec                  
[  5]   1.00-2.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   2.00-3.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   3.00-4.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   4.00-5.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   5.00-6.00   sec   282 MBytes  2.36 Gbits/sec                  
[  5]   6.00-7.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   7.00-8.00   sec   282 MBytes  2.37 Gbits/sec                  
[  5]   8.00-9.00   sec   282 MBytes  2.36 Gbits/sec                  
[  5]   9.00-10.00  sec   283 MBytes  2.37 Gbits/sec                  
[  5]  10.00-10.05  sec  14.7 MBytes  2.34 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.05  sec  2.76 GBytes  2.36 Gbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
3 Likes

Could you share the snapshot file for the h2+?. I'd like to try some experiments on it.
Alternatively, could you explain how to build one myself?
Thanks.

Yes, for testing purposes only:https://github.com/mj22226/openwrt/blob/odroid-h2%2B/r14358/openwrt-x86-64-generic-squashfs-combined-efi.img.gz

Thank you.
I'm getting 2.4Gbps up and down from speedtest.net (over my 10G link), so it's working very well.
Will this driver be integrated into the next major release (or in dev snapshots?)
Thanks again.
Mike

1 Like

I re-tested the Odroid h2+ using your snapshot and now I'm getting different results than my first test.
Using speedtest.net over a 10Gbps link, I originally got 2.4Gbps up and down, but now I'm getting 1.05 down and 2.4 Gbps up. It's reproducible and I've tried two different h2's, using the same USB drive with the snapshot.
So, either I screwed up the config, or there's some other problem. Do you have any later snapshots that I can try? Is anyone going to put this driver into the main OpenWRT tree so I can test the dev builds?
Thanks.

Some additional debug info.
I tried your build (same config, same USB drive) on a Dell 3050 (i3 6100) with two PCI 2.5g NICs (2.5GBase-T PCIe Network Adapter with 1 Port, which use the same Realtek RTL8125 chip).
Your build works well, and I get about 2.1 Gbps up and down, so the problem seems specific to the Odroid H2+. I'm happy to upload the logs if anyone can help look at them.
Also, the latest dev build almost works, it seems to recognize the 8125 cards, but only talks to one of them (the full length PCI slot works, the x1 slot doesn't.)

Any updates? Is anyone putting this into the main codebase?
Thanks.

1 Like

The snapshot worked for me on a 128gb emmc (only 1 I had compatible laying around). I can't say anything about speeds since the wan maxes out my old modem at 2MBps. Just here to say I too would like to see this in the main codebase.

1 Like

What is the status of this board currently ? If I compile the latest commit for x86 will the H2+ NICs work OOB or with a kmod that supports 8125B? I'm thinking of ordering this one today as my main router and hoping until I get anything beyond 2.5Gbps (unlikely for 5 years at least) I will run this thing 24x7. Of course there will be an official 20.x release at some point but Im fine with running snapshots as long as its usable. My main concern is the 2.5G driver status ...

The image above works OOB for me.

When I use image builder, I use the x86_64 squashfs efi.img file produced (sometimes the .gz doesn't extract right for me) as well as adding repository at https://github.com/coolsnowwolf/lede.git and installing the kmod-r8125 package. My last good build was early Dec. but I haven't tried recently.