The first problem we encounter when attempting to assemble a cross-compilation toolchain for the RealTek 8186 is the Lexra core. Lexra was a semiconductor company that developed and licensed semiconductor intellectual property (SIP) cores that implemented the MIPS-I instruction set. Due to patent issues, the four unaligned load and store (lwl, lwr, swl, swr) instructions are not present. This incompatibility is the problem in an otherwise well supported R3000 big-endian code base.
GCC must be patched to permit proper compilation on Lexra MIPS cores. It must not emit the four missing op codes. The Linux kernel contains MIPS assembly routines with these instructions that must also be patched.
Unfortunately, public beta patches are only available for v3.3.3 of GCC (RealTek provides a modified GCC v3.3.3 binary only). The nonmips project patch alters GCC to remove the patented instructions. A series of patches available from the Linux on RTL8181 project goes further, by replacing kernel code utilizing the unaligned load and store instructions with unoptimized bit manipulations. Much of the code seems to be inspired or modified from Lexra kernel patches not included in mainline, perhaps due to the earlier mentioned patent concerns.
If I can't find any more information, I'll have to diff the files patched to see what's going on. Then, maybe, I can get those public patches updated to the point where they work on a currently supported version of GCC in buildroot. That's the plan, anyway .