ZTE ZXHN H118Na (HW ver 2.3) - Possible OpenWrt flash

RTL8676S = Lexra LX5280 architecture

SoCs of the Lexra Architecture are not supported by OpenWrt since years. If you want OpenWrt support for a device with such a SoC, you have to add it yourself. See below how to do that.

OpenWrt documentation

External sources

Forum discussions

Search the OpenWrt forum for Lexra support status

From Programing for new device - #14 by mk24 :

Lexra is not supported directly by gcc like MIPS, ARM, x86 etc. are. This means that even compiling the first line of C code requires a lot of modification to the system.

Also Realtek does not have good open wifi drivers.

From Building OpenWRT for RTL8196C - #4 by mk24 :

The first big problem is that the Lexra CPU core found in these chips isn't one of the platforms directly selectable in gcc. So these third-party projects use a hacked up old version of gcc. And everything kind of falls apart from there. Also open-source drivers for Realtek wifi chips are limited.

From https://openwrt.org/toh/sagem/livebox.2 :

It is possible to compile software for Lexra processors using the gnu gcc tools for the MIPS-I R3000 processor. This can be done either by writing an exception trap handler for reserved instructions that detects unaligned load and store instructions and emulates their functionality with shifts and aligned loads and stores or else modifying the compiler so that it does not generate lwl, lwr, swl, and swr instructions. With either of those changes, any C code can run on Lexra processors. Advanced hobbyists might even choose to accelerate their critical inner loops by coding them in assembly code using digital signal processing (DSP) instructions that Lexra implemented as extensions to the MIPS-I instruction set.

From Realtek SoC support in OpenWrt:

In terms of lexra (Realtek's reduced mips ISA) support, there is none - nor anyone actively pushing for it (as in providing patches/ pull requests against current master); chances for this to change are non-zero, but extremely low (once you'd have hypothetical lexra arch/ SOC support, there would still be the problem of the wlan drivers and current hostapd/ nl80211, to drive them reliably in AP mode).

[Disclaimer: I can't speak for the LEDE/ OpenWrt developers]
Personally I don't think lexra will 'ever' be supported in LEDE/ OpenWrt (too different from normal mips, no upstream/ toolchain support at all, very low-end devices, the wlan situation (drivers, AP mode reliability, nl80211 support) is difficult). But effectively all it would need, is someone pushing for it - to provide a (long-term-) manageable pull request with lexra support against OpenWrt/ master, kernel 4.14, musl, hostapd/ nl80211 for the wlan drivers and not too many arch specific changes (so it can be reasonably updated with the rest of OpenWrt and not stay behind).

From Can RTL8196C be incorporated into the LEDE? :

Afaik there's no upstream support whatsoever towards OpenWrt/LEDE, which is why Realtek devices aren't supported.

Realtek inherited a reduced mips ISA via Lexra, given that this differs from the normal mips ISA, it is quite a bit harder to support - especially lacking active (or any-) upstream development.

From Can RTL8196C be incorporated into the LEDE? - #4 by hackpascal :

I've ported RTL8196C support to LEDE, without wireless support.
All source codes (SPI driver/ethernet driver) were written myself.
https://github.com/hackpascal/lede-rtl8196c 240 (with branch realtek)

But I probably have no time to develop it later.

From Unsupported Belkin? - #3 by slh

The whole target SOC isn't supported at all (search this forum for 'lexra', if you want more details), neither in OpenWrt, nor upstream linux, binutils, gcc, musl, … Adding support for this arch is of course 'possible', but a lot of work - and once there you'd have to deal with getting the wlan drivers to work in AP mode and using contemporary hotapd version, neither will be easy.

1 Like