Building OpenWrt for RTL8197D

Hi!
I am trying to build OpenWRT for this router
I read that this Soc is unsupported but then I found this github.
where Realtec RTL8197D generic board could be chosen in menuconfig. So I decided to give it a try.

I faced a few problems with missing libraries, misplaced headers etc which I managed to circumvent eventually.
Unfortunately, when I got to the stage where system image is being written (as far as I understand) I faced an error which I can't fix.

/home/user/smartbox/openwrt/staging_dir/host/bin/padjffs2 /home/user/smartbox/openwrt/build_dir/target-mips_lx53_musl/linux-realtek_rtl8197d/tmp/openwrt-realtek-rtl8197d-DIR815D1-squashfs-factory.bin  4
padding image to 0058e000
/home/user/smartbox/openwrt/staging_dir/host/bin/tbs_dlink -b -k 0x197400 -r 0x4DFF70 -g BR -m DIR825G1 -p RTL8197DL_AC1200 /home/user/smartbox/openwrt/build_dir/target-mips_lx53_musl/linux-realtek_rtl8197d/tmp/openwrt-realtek-rtl8197d-DIR815D1-squashfs-factory.bin
bash: /home/user/smartbox/openwrt/staging_dir/host/bin/tbs_dlink: No such file or directory

Neither I nor Google know what tbs_dlink is.
Can you advise me - what should I do to build an image for my router?

Ping the person maintaining that repo, I would say. OpenWrt offers no support for those Realtek SoCs. Since they're hosting the repo you can assume they have it working.

I tried but I couldn't. I see no contact information on that repo. No means to write about an issue.
There are "About" section which says that they accept pull requests only and all issues should be reported to bugs.openwrt.org

Maybe @Dimazhan can help?

2 Likes

hi
utility tbs can be taken from here
read more about the work done here

I added new device, pcie2 and usb to my repository
I couldn't make work network and wifi for my device...
@gaspare seems to be working on the ethernet driver

1 Like

The 97D is made for the DLink 815 router.
This is a TBS router. TBS have its own bootloader. This tools is used to make the image for this bootloader. Thanks @Dimazhan for point out the tool. I intend to submit a patch to openwrt for those routers, because DLink 819 and Zyxel T10 are MT7620 and uses the tbs bootloader too (those routers are already ported in the Anlix tree, but at Anlix, we are using 19.07. I need to port to master... )

@koshkamau, for what router are you intending this port?
In DIR815, I can get the 5Ghz wifi working (it can use the rt88 open driver for RTL8812 wifi chip).

1 Like

if I understand correctly, you have the device SerComm S1000 V2
and, if I correctly found its firmware, you don't need the tbs utility

you need to use the cvimg utility
only in your case it will be necessary to take several more steps when preparing the firmware: add the wrapper sercomm, bootloader, compress in the zip archive, add the wrapper sercomm again

try to start build ramdisk image for a3002, we have start addresses like the same
unless, of course, your version of bootloader allows you to boot from ramdisk

I didn't try it...
I need to try...

Thank you all for your responses.
It seems much more complicated than I expected...
I had a little experience with embedded software so I vaguely understand what you are talking about :slight_smile:
Actually, I found a mention about @Dimazhan's github on a forum about SerComm S1000 V2.
The user, who mentioned this github, said that he is able to build firmware but has no hardware to test.
I thought I would just build firmware for "Generic RTL8197D board" and flash it somehow.

Hi @Dimazhan!
I have RTL8197FS device - IP-COM W36AP(Tenda W12).
RTL8197FS also has PCIE.
What should I do to enable PCIE for RTL8197F?
Only to change rtl8197f/config-5.4 as you made for RTL8197D?

Hi!
you will also need to describe the pci controller in your dts file or in RTL8197F.dtsi

I copied pcie0 data from RTL819x.dtsi to RTL8197F.dtsi and added pcie0 to W36AP.dts(this is my device).
In that case the booting stops with error "pcie link is down".

registers seem to match...
@gaspare did you have work pcie on rtl8197f?

and I never realized what kind of driver you meant... do you have a link?

I used Dimazhan's github for RTL8197D and I got PCI-WIFI adapter recognized only after I added CONFIG_PCIE_SUPPORT=y in target's kernel config.
Unfortunately I couldn't bring this network interface up so far.

Hi. I think - this information may be interesting for you - https://4pda.to/forum/index.php?showtopic=771762&view=findpost&p=84018554