Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:techref:hardware:soc:soc.realtek [2019/08/15 08:21] – [Lexra] links to Lexra devices in oldwiki added tmomasdocs:techref:hardware:soc:soc.realtek [2022/09/10 10:58] (current) – [Adding support for Lexra] forum link added tmomas
Line 1: Line 1:
 ====== Realtek ====== ====== Realtek ======
- +  * For Realtek 802.11 "wireless" chipsets and Realtek SoCs see [[hwinfo>Realtek|Realtek]]
-  * For Realtek 802.11 "wireless" chipsets and Realtek SoCs see [[http://wikidevi.com/wiki/Realtek]]+
   * For Linux drivers for Realtek 802.11 chipsets, see [[wp>Comparison of open-source wireless drivers]] and also [[http://wireless.kernel.org/en/users/Drivers]]   * For Linux drivers for Realtek 802.11 chipsets, see [[wp>Comparison of open-source wireless drivers]] and also [[http://wireless.kernel.org/en/users/Drivers]]
  
 ===== Lexra ===== ===== Lexra =====
-  * About the Lexra CPUs, see  [[wp>Lexra]] / [[http://www.linux-mips.org/wiki/Lexra|Lexra]] and [[toh/sagem/livebox.2]] +  * About the Lexra CPUs, see  [[wp>Lexra]] / [[http://www.linux-mips.org/wiki/Lexra|Lexra]] and [[toh:sagemcom:livebox.2]]
-  * [[https://forum.openwrt.org/t/zte-zxhn-h118na-hw-ver-2-3-possible-openwrt-flash/31245/2?u=tmomas|Status (Feb 2019) and info collection regarding OpenWrt support for Lexra]] +
- +
-Devices with Lexra SoC:+
  
 +==== Devices with Lexra SoC ====
   * [[https://oldwiki.archive.openwrt.org/toh/alfa.network/ac1200r]]   * [[https://oldwiki.archive.openwrt.org/toh/alfa.network/ac1200r]]
   * [[https://oldwiki.archive.openwrt.org/toh/cc_c/wa-6202]]   * [[https://oldwiki.archive.openwrt.org/toh/cc_c/wa-6202]]
Line 20: Line 17:
   * [[https://oldwiki.archive.openwrt.org/toh/zte/h298n]]   * [[https://oldwiki.archive.openwrt.org/toh/zte/h298n]]
  
 +==== Support status ====
 +
 +SoCs of the Lexra Architecture are not supported by OpenWrt since years. It is unlikely that this status changes anytime soon. 
 +
 +==== Adding support for Lexra ====
 +
 +If you want OpenWrt support for a device with a Lexra SoC, you have to add it yourself. See below how to do that.
 +
 +=== OpenWrt documentation ===
 +
 +  * [[https://openwrt.org/docs/guide-developer/start]]
 +  * [[https://openwrt.org/docs/guide-developer/build-system/use-buildsystem]]
 +  * [[https://openwrt.org/docs/guide-developer/add.new.platform]]
 +  * [[https://openwrt.org/docs/guide-developer/add.new.device]]
 +  * [[https://openwrt.org/docs/guide-developer/adding_new_device]]
 +
 +=== External sources ===
 +
 +  * [[https://github.com/AlexeySofree/openwrt-rtl819x]]
 +  * [[https://github.com/hackpascal/lede-rtl8196c]]
 +  * [[https://sourceforge.net/projects/rtl819x/files/|RTL819x SDK]]
 +  * [[https://sourceforge.net/projects/rtl8197xd-v2-5-pkg/files/]]
 +  * [[https://wikileaks.org/wiki/Lexra_CPU_core_documentation]]
 +  * [[http://wlstorage.net/file/lexra-cpu-core-documentation.zip]]
 +
 +=== Forum discussions ===
 +
 +
 +[[https://forum.openwrt.org/search?q=lexra|Search the OpenWrt forum for Lexra support status]]
 +
 +  * [[https://forum.archive.openwrt.org/viewtopic.php?id=31551|RTL8196C port status]]
 +  * [[https://forum.archive.openwrt.org/viewtopic.php?id=46606|Realtek SoC support in OpenWrt]]
 +  * [[https://forum.openwrt.org/t/any-plans-for-realtek-soc-support/15727|Any plans for Realtek SOC support?]]
 +  * [[https://forum.openwrt.org/t/need-to-compile-wrt-for-rtl819x/28338|Need to compile WRT for rtl819x]]
 +  * [[https://forum.openwrt.org/t/zte-zxhn-h118na-hw-ver-2-3-possible-openwrt-flash/31245/2?u=tmomas|Status (Feb 2019) and info collection regarding OpenWrt support for Lexra]]
 +  * [[https://forum.openwrt.org/t/working-realtek-soc-rtl8196e-97d-97f-in-last-master/70975?u=tmomas|Working Realtek SoC RTL8196E 97D 97F in last master]]
 +
 +=== Quotes ===
 +
 +From [[https://forum.openwrt.org/t/programing-for-new-device/17062/14?u=tmomas]]:
 +
 +> 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 [[https://forum.openwrt.org/t/building-openwrt-for-rtl8196c/1379/4?u=tmomas]]:
 +
 +> 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 [[https://forum.archive.openwrt.org/viewtopic.php?id=46606&p=13#p371989|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 [[https://forum.openwrt.org/t/can-rtl8196c-be-incorporated-into-the-lede/1381]]:
 +
 +> 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 [[https://forum.openwrt.org/t/can-rtl8196c-be-incorporated-into-the-lede/1381/4?u=tmomas]]: 
 +> 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 [[https://forum.openwrt.org/t/unsupported-belkin/17252/3?u=tmomas]]:
 +> 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.
  • Last modified: 2019/08/15 08:21
  • by tmomas