OpenWrt Forum Archive

Topic: Realtek SoC support in OpenWrt

The content of this topic has been archived between 22 Sep 2016 and 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all,
i don't understand how to work with kernel config.
My goal is to build x86_64 img with support of RTL_CARDS. (15.05 Openwrt)
I made build for atheros card and wifi is working perfect, but i need also to build img for rtl8821AE.
How to make it correct?
i tried in such way:
make kernel_menuconfig ->  Networking support ->  Wireless ->
cfg80211 - wireless configuration API -> Y
Generic IEEE 802.11 Networking Stack (mac80211) -> Y
Device Drivers -> Network device support -> Wireless LAN -> Realtek rtlwifi family of devices -> Y
Realtek RTL8821AE/RTL8812AE Wireless Network Adapter (NEW) -> Y
Than i've got many such messages during the boot:
[   15.022840] aead: exports duplicate symbol aead_geniv_alloc (owned by kernel)
[   15.054111] cfg80211: exports duplicate symbol __cfg80211_alloc_event_skb (owned by kernel)
[   15.083102] crypto_blkcipher: exports duplicate symbol __ablkcipher_walk_complete (owned by kernel)
And such message:
rtlwifi: Firmware rtlwifi/rtl8821aefw.bin not available

So, my card is not working.
What i do wrong?

Hello taobaoDog,
I hope it is not misleading.
There is a patch "100-remove-cryptoapi-dependencies.patch", which implements
aes functionality in the compat-wireless drivers (the crypto modules in the kernel can be left disabled making the kernel smaller in the end.).
"compat-wireless" for enabling the newer wireless drivers from kernel 4.x for kernel 3.18 i.e.
And openwrt is using compat-wireless, except for some platforms, where a relatively new kernel is used. And there is a rtlwifi in compat-wireless.
So it could be an idea to disable the rtlwifi in kernel_menuconfig and enable the (not exactly) kmod_xxx_rtlwifi in menuconfig with "*"
("M" could mean to build an openwrt package with the kmods).
Recently learned:
Searching in the menuconfigs works with "/" similar to vi.
(I think the last time I have configured before was for a kernel was for 2.2.19. So there is, felt, 20 times more options now.
And OMG, where can I find the CONFIG_XX option? Could it not be like in Windows control panel? Yes it is. Linux has it. May be had it since longer times)

If it would be easy, everybody would do it

How to flash this into ASUS T-N10E Rev.A? As I understand this should work, but I not sure if published Upvel builds is compatible.

Hello i tried to install the open wrt firmware with Realteks SDK. I compiled the firmware following the steps in the readme and received my firmware.bin file.

Now It gives me an Error that the Firmware file is Invalid at the Bootloader.

My device has the following specs:

CPU: RTL8881AQ
Flash: 8MB
Ram: 64MB

More Informations:
https://wikidevi.com/wiki/D-Link_DIR-518L_rev_A1

I used the rtl8881A config to compile the firmware.

Do I have to manually configure the Kernel Configuration? I tried it with "make kernel_menuconfig" but I just dont know what to set in the configuration. Have anybody an idea or the same HW?

Thanks

Hello.
I have ZTE H118N,  Realtek RTL8196C/RTL8188C, and how to know my bootloader IP? I make firmware from sources so now I need to flash my device with TFTP, yes?
Sorry for crossposting.

Hi
I have D-Link 600L A1 using Realtek RTL8196C processor. How can i find openwrt or build firmware from openwrt for it. Thanks

Should the version created here for UPVEL UR-825AC work also for dlink 825 ac revision E1?

Hello all!
Have the Upvel UR-825AC, started under OpenWRT (downloaded from this thread beta24) .
I can't connect to Internet. What am i do wrong?
where check setting ?

grodstrike wrote:

Hello.
I have ZTE H118N,  Realtek RTL8196C/RTL8188C, and how to know my bootloader IP? I make firmware from sources so now I need to flash my device with TFTP, yes?
Sorry for crossposting.

Hi, grodstrike.
Please give a link to download your Openwrt-build for ZTE H118N.

Thank you.

Hi. I've recently flashed akryll's build for Upvel UR-825AC into my D-Link DIR-825/AC (Rev. E1A) and i confirm that it works (even without updating bootloader). Flashed via TFTP in recovery mode.

There are some issues, by the way, however, generally akryll's builds are compatible with D-Link router, not only Upvel smile

(Last edited by rzzzh on 29 Jan 2016, 17:19)

akryll, can you share your source tree?

gilb wrote:

akryll, can you share your source tree?

joining this question too.

rzzzh wrote:

Hi. I've recently flashed akryll's build for Upvel UR-825AC into my D-Link DIR-825/AC (Rev. E1A) and i confirm that it works (even without updating bootloader). Flashed via TFTP in recovery mode.

There are some issues, by the way, however, generally akryll's builds are compatible with D-Link router, not only Upvel smile

Quick question, how do you get the D-Link DIR-825/AC  into TFTP recovery? I've only been able to get it to the emergency web interface so far, am I doing something wrong?

gilb wrote:
rzzzh wrote:

Hi. I've recently flashed akryll's build for Upvel UR-825AC into my D-Link DIR-825/AC (Rev. E1A) and i confirm that it works (even without updating bootloader). Flashed via TFTP in recovery mode.

There are some issues, by the way, however, generally akryll's builds are compatible with D-Link router, not only Upvel smile

Quick question, how do you get the D-Link DIR-825/AC  into TFTP recovery? I've only been able to get it to the emergency web interface so far, am I doing something wrong?

Actually, 'TFTP Recovery mode' that i've mentioned in my post is the same as 'Emergency web recovery'. I was able to access emergency web interface, but had no luck with uploading firmware through it.

And then i decided to try TFTP, and it did the trick.
So, put your router into emergency mode, and upload firmware via tftp. Ensure that transfer mode is set to binary.

Hi,
Does anyone have a build for ZTE ZXHN H118N ?

cpu: RTL8196C
wlan: RTL8192CE
flash: 8mb (W25Q32) or 16mb (MX25L12845E)
ram: 32mb
ports: 1WAN / 4LAN / 1USB

rzzzh wrote:
gilb wrote:
rzzzh wrote:

Hi. I've recently flashed akryll's build for Upvel UR-825AC into my D-Link DIR-825/AC (Rev. E1A) and i confirm that it works (even without updating bootloader). Flashed via TFTP in recovery mode.

There are some issues, by the way, however, generally akryll's builds are compatible with D-Link router, not only Upvel smile

Quick question, how do you get the D-Link DIR-825/AC  into TFTP recovery? I've only been able to get it to the emergency web interface so far, am I doing something wrong?

Actually, 'TFTP Recovery mode' that i've mentioned in my post is the same as 'Emergency web recovery'. I was able to access emergency web interface, but had no luck with uploading firmware through it.

And then i decided to try TFTP, and it did the trick.
So, put your router into emergency mode, and upload firmware via tftp. Ensure that transfer mode is set to binary.

Weird, I tried that now and it pushes the firmware file to the router but it doesn't automatically restart even after a long time and if i restart it myself it still boots the stock firmware so I guess something's going wrong.

For those who has router with dual band WiFi (not only Upvel): could you please send me your hardware config dump? In case if you have upvel you can do it through web interface after you're logged on:
_http://<you_device_ip>/syscmd.htm
flash allhw

and send the result to me: evereg12(.)yandex.ru with info which device you have.

I suppose that's standard utility for firmware flashing wich should be in every Realtek firmware:

Usage: flash cmd
option:
cmd:
      default -- write all flash parameters from hard code.
      get [wlan interface-index] mib-name -- get a specific mib from flash
          memory.
      set [wlan interface-index] mib-name mib-value -- set a specific mib into
          flash memory.
      all -- dump all flash parameters.
      gethw hw-mib-name -- get a specific mib from flash
          memory.
      sethw hw-mib-name mib-value -- set a specific mib into
          flash memory.
      allhw -- dump all hw flash parameters.
      reset -- reset current setting to default.
      set_mib -- get mib from flash and set to wlan interface.

thanks in advance!

andygo wrote:

For those who has router with dual band WiFi (not only Upvel): could you please send me your hardware config dump? In case if you have upvel you can do it through web interface after you're logged on:
_http://<you_device_ip>/syscmd.htm
flash allhw

take my hw config.
If my file help you, then good for all upvel 825AC user. smile

andygo wrote:

For those who has router with dual band WiFi (not only Upvel): could you please send me your hardware config dump? In case if you have upvel you can do it through web interface after you're logged on:
_http://<you_device_ip>/syscmd.htm
flash allhw

and send the result to me: evereg12(.)yandex.ru with info which device you have.

I suppose that's standard utility for firmware flashing wich should be in every Realtek firmware:

Usage: flash cmd
option:
cmd:
      default -- write all flash parameters from hard code.
      get [wlan interface-index] mib-name -- get a specific mib from flash
          memory.
      set [wlan interface-index] mib-name mib-value -- set a specific mib into
          flash memory.
      all -- dump all flash parameters.
      gethw hw-mib-name -- get a specific mib from flash
          memory.
      sethw hw-mib-name mib-value -- set a specific mib into
          flash memory.
      allhw -- dump all hw flash parameters.
      reset -- reset current setting to default.
      set_mib -- get mib from flash and set to wlan interface.

thanks in advance!

Well, on D-link dir-825/ac something is wrong with that:

Invild wlan hw setting signature �L�OI�, reset!
Reset reason: Length is too short!
Reset HW settings done
HW_BOARD_VER=0
HW_NIC0_ADDR=000000000000
HW_NIC1_ADDR=000000000000
HW_WLAN0_WLAN_ADDR=000000000000

...and all other values are filled with zeroes

gilb wrote:

Weird, I tried that now and it pushes the firmware file to the router but it doesn't automatically restart even after a long time and if i restart it myself it still boots the stock firmware so I guess something's going wrong.

Hm, really weird. In my case, router has been rebooted automatically.
Have you set TFTP transfer mode to binary? What's version of the openwrt firmware that you're trying to flash?

rzzzh wrote:
gilb wrote:

Weird, I tried that now and it pushes the firmware file to the router but it doesn't automatically restart even after a long time and if i restart it myself it still boots the stock firmware so I guess something's going wrong.

Hm, really weird. In my case, router has been rebooted automatically.
Have you set TFTP transfer mode to binary? What's version of the openwrt firmware that you're trying to flash?

Yeah, it was in binary mode.
I was trying to flash Upvel_OWRT_v0.1.2build24.bin.
I've had a few busy days, I'll give it another try this weekend.

Did you use a different build?

Hello, I've got bricked Dlink DAP-1513 with RTL8196C chipset (4M flash, 32M RAM). Flash chip is totally erased, including bootloader ((( Could anyone post a bootloader suitable for further recovering the full firmware. Flashing the chip with SPI programmer is not a problem.

I have found several bootloaders here in this thread, but they are for devices with different flash chip size (8M and 16M). Will they work with 4M?

Thank you.

(Last edited by ega2002 on 17 Feb 2016, 23:41)

ega2002 wrote:

I have found several bootloaders here in this thread, but they are for devices with different flash chip size (8M and 16M). Will they work with 4M?

Possible the bootloader will be loaded, but it could not work with D-Link firmware. Each Realtek bootloader has fixed address tables for loocking for the firmware core and firmware root-fs.
In case if you will not find suitable boot you can try compile it with RTL SDK. But you have to know several addresses and your h/w configuration.

And one more thing: I suppose that there should be hw_config area in your flash (MAC addresses and some hw variables). If you had fully cleared chip you could have some problem with it too.

It's easy to find someone with similar router and try to dump his f/w and flash to you wink

andygo wrote:

Possible the bootloader will be loaded, but it could not work with D-Link firmware. Each Realtek bootloader has fixed address tables for loocking for the firmware core and firmware root-fs.
In case if you will not find suitable boot you can try compile it with RTL SDK. But you have to know several addresses and your h/w configuration.

And one more thing: I suppose that there should be hw_config area in your flash (MAC addresses and some hw variables). If you had fully cleared chip you could have some problem with it too.

It's easy to find someone with similar router and try to dump his f/w and flash to you wink

I see all these possible obstacles. Unfortunately it's not so easy to find anyone with the same device for cloning: the device is not so popular and moreover one will need a console to make a dump or desolder the flash chip (must open the device and break the warranty). So, as of now, I have no other way but try to use the dumps from other devices with the same chipset and memory sizes.

Anyway, andygo, thanks for sharing your considerations.