OpenWrt Forum Archive

Topic: Texas Instruments avalanche DSL modem working with linux 2.6.19 on AR7

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

Hi
I have ported the old driver to a new 2.6.19.2 kernel. the most interesting feature, apart that it works, is that
now the firmware is loaded via hotplug.
Here there are some cookies for you:

[/]# uname -a
Linux OpenWrt 2.6.19.2 #33 Mon Apr 16 02:29:05 CEST 2007 mips unknown
[/]# insmod tiatm
[/]# dmesg
registered device TI Avalanche SAR
Initializing DSL interface
requesting firmware image "ar0700xx.bin"
avsar: Device released
size=10120
size=38720
size=46432
size=45312
Texas Instruments ATM driver: version:[4.02.04.00]
DSL in Sync
[/]# cat /proc/tiatm/avsar_ver
ATM Driver version:[4.02.04.00]
DSL HAL version: [3.00.06.00]
DSP Datapump version: [3.00.15.00] Annex A
SAR HAL version: [01.06.06]
PDSP Firmware version:[0.49]

tested with pppoa and it works as expected

the patch is here: sangam_linux-2.6.diff and it gets the source from here: sangam-atm-0.2.tar.bz2

Please report successes of failures in this forum or in the Ticket #1595

I'm working on a new release based on driver 7.00.01.00 (see Ticket 1411)
but at the moment it just segfaults sad
If someone is interested it can be found here: sangam-atm-0.3.tar.bz2

Cheers,
Matteo

I'd just like to give a huge thanks to yourself, ejka and nico for the work on the 2.6 port.

Where did you get your hands on the newer ATM source?

Netgear's V3.01.25 source code for the DG834G doesn't seem to have anything newer than Kamikaze, yet the downloadable firmware has the following:

# cat /proc/avalanche/avsar_ver
ATM Driver version:[4.05.03.00]
DSL HAL version: [3.02.04.00]
DSP Datapump version: [4.01.02.00] Annex A
SAR HAL version: [01.07.02]
PDSP Firmware version:[0.49]

(Last edited by KillaB on 17 Apr 2007, 22:18)

KillaB wrote:

I'd just like to give a huge thanks to yourself, ejka and nico for the work on the 2.6 port.

Where did you get your hands on the newer ATM source?

Netgear's V3.01.25 source code for the DG834G doesn't seem to have anything newer than Kamikaze, yet the downloadable firmware has the following:

# cat /proc/avalanche/avsar_ver
ATM Driver version:[4.05.03.00]
DSL HAL version: [3.02.04.00]
DSP Datapump version: [4.01.02.00] Annex A
SAR HAL version: [01.07.02]
PDSP Firmware version:[0.49]

Get the code here: https://dev.openwrt.org/ticket/1411.
Please, can you send me the binary firmware ver 4.05.03.00? rootkit85 AT yahoo DOT it

Here it is:

[/]# uname -a
Linux OpenWrt 2.6.19.2 #33 Mon Apr 16 02:29:05 CEST 2007 mips unknown
[/]# cat /proc/avalanche/avsar_ver
ATM Driver version:[7.01.00.10]
DSL HAL version: [7.01.00.08]
DSP Datapump version: [7.01.01.00] Annex A
SAR HAL version: [01.07.2c]
PDSP Firmware version:[0.54]
Chipset ID: [7300/7300A]
[/]# logread |fgrep pppd
Jan  1 00:00:49 (none) daemon.info pppd[1572]: Plugin pppoatm.so loaded.
Jan  1 00:00:49 (none) daemon.notice pppd[1573]: pppd 2.4.3 started by root, uid 0
Jan  1 00:00:50 (none) daemon.info pppd[1573]: Using interface ppp0
Jan  1 00:00:50 (none) daemon.notice pppd[1573]: Connect: ppp0 <--> 8.35
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: PAP authentication succeeded
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: PAP authentication succeeded
Jan  1 00:00:59 (none) daemon.warn pppd[1573]: kernel does not support PPP filtering
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: local  IP address 82.55.118.226
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: remote IP address 192.168.100.1
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: primary   DNS address 85.37.17.51
Jan  1 00:00:59 (none) daemon.notice pppd[1573]: secondary DNS address 85.38.28.97
[/]# ping -c2 openwrt.org
PING openwrt.org (195.56.146.238): 56 data bytes
64 bytes from 195.56.146.238: icmp_seq=0 ttl=47 time=66.1 ms
64 bytes from 195.56.146.238: icmp_seq=1 ttl=47 time=65.1 ms

--- openwrt.org ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 65.1/65.6/66.1 ms
[/]# dmesg
...
registered device TI Avalanche SAR
Sangam detected
tn7dsl_read_dsp()
open file /lib/modules/ar0700xx.bin
DSP binary filesize = 374774 bytes
file length = 374774
tiload: check checksum
CRC-32 for the Binary: 0x9a62774a
Checksum error, got 0xe1af0000
signature=TIDSL
tiload: check sect count
Old Addr:147f2e00  New: 14af8000
Creating new root folder avalanche in the proc for the driver stats
Texas Instruments ATM driver: version:[7.01.00.10]
tn7atm_open()
tn7sar_activate_vc

I hope someone will find it useful.
I'll post the sources whan i will implemented hotplug firmware loading and cleaning them a bit
Cheers,
Matteo

I've published the sources online for some geek that wants to try them.
Go fetch it! sangam-atm-0.3.tar.bz2

Please excuse me for asking a newbie question... I have a D-Link DSL-G604t and have been waiting hopefully to hear that there would be support for ADSL and wireless together!  Do you think this code is nearly to the point where I could use it as a regular "production" router for my home office?

I wouldn't mind trying to help test it on a weekend if it is likely to work OK or my testing would help get it ready.  But I need to put the router back into a working state that is at least no worse than the goofy state it is in now, running D-Link DSL-G664t firmware that I installed via the ADAM2 firmware. :-)

Also, is there a way to use the 2.6 kernel with whiterussian?  Or does testing this mean building and using kamikaze?  I tried checking out trunk and building it for AR7 but got funny toolchain errors for both AR7-2.4 and AR7-2.6 builds... this is on Fedora Core 6 32-bit.  I wouldn't mind using kamikaze if someone could identify a good revision number to use in combination with this ADSL driver...

@rootkit

If it helps at all in writing the hotplug stuff.
Here are my thoughts: https://dev.openwrt.org/ticket/1074

If I could do it myself I would, but I'm unfortunately not much of a programmer.

rootkit wrote:

Please, can you send me the binary firmware ver 4.05.03.00?

The binary is for 2.4.x, do you still want it?  If so, what exact file(s) do you need?
Do you also want the ar0700xx.bin (Annex A) file?

karl wrote:

Please excuse me for asking a newbie question... I have a D-Link DSL-G604t and have been waiting hopefully to hear that there would be support for ADSL and wireless together!  Do you think this code is nearly to the point where I could use it as a regular "production" router for my home office?

I wouldn't mind trying to help test it on a weekend if it is likely to work OK or my testing would help get it ready.  But I need to put the router back into a working state that is at least no worse than the goofy state it is in now, running D-Link DSL-G664t firmware that I installed via the ADAM2 firmware. :-)

Also, is there a way to use the 2.6 kernel with whiterussian?  Or does testing this mean building and using kamikaze?  I tried checking out trunk and building it for AR7 but got funny toolchain errors for both AR7-2.4 and AR7-2.6 builds... this is on Fedora Core 6 32-bit.  I wouldn't mind using kamikaze if someone could identify a good revision number to use in combination with this ADSL driver...

if you post the build error maybe we can help...

I got past my tool build errors... it seems like maybe there are race conditions if you set the number of build jobs to 2?  (I was trying to get things done faster on a dual-core host).  It was odd errors about ld not being configured properly for options being passed to it (in the cross-compiler chain).  Once I set the number of jobs back to 1 and did a distclean, things started building OK.

However, I built revision 7004 ar7-2.6 with wireless and adsl support and installed it, but never got to the point of DHCP or telnet responding. I do not have a serial adapter for my DSL-G604t, so I am pretty much stumped at this point.  None of the squashfs or jffs2 images gave me any indication of whether they were booting or not, with the LEDs coming on for power and LAN link immediately and never changing (except to flicker if I sent DHCP/ARP requests on the LAN).  I even tried setting the MAC_PORT adam2 variable as suggested in a writeup for 2.4 kernels.  I have no way of knowing if the ethernet is non-functional, or the root filesystem, etc.

I followed the instructions for writing the firmware via FTP to my adam2 version 22.2 firmware that I found on a writeup for another model (DSL-504?)... I used hexdump to find the beginning of the squashfs (or jffs2) filesystems and tried to adjust the partition map so that the kernel/fs split was at the right spot, and I wrote the entire image to the kernel+fs partition so that the image byte 0 starts at the beginning of the kernel partition (mtd1). I found the jffs2 magic "0x1985" (stored as 85 19) starting after padding at offset 0x000d0000 in my build, whereas the 'hsqs' in the squashfs starts at an odd alignment of 10 bytes in from 0x000c67a0, i.e. 0x000c67aa. Is there some extra padding around this value that I didn't take into account?  I used these values as the boundary between mtd1 and mtd0.

Is there a known-good revision I should start with to validate that I can get an image to boot with ethernet access?

Hey guys,
DSL support for AR7-2.6 has been committed. I also fixed up a few quirks in cpmac. Enjoy!

wink a big thxs from my side to ejka, nbd, rootkit, and all the rest of the ar7 guy's!!!

Yeah, thanks for not giving up on the AR7 stuff!

I did an svn update after reading nbd's post, and got a build to boot successfully on my router, using the JFFS2-64K image uploaded via FTP to adam2. However, I had to revert it due to my wife impatiently needing the internet access while I was still learning how to get the PPP over ADSL working. It did get DSL in sync though, with the same line quality metrics as with the D-Link firmware. :-)

I'll try again later after I read more online docs and get "permission" to disable our internet again... with luck, my next question will be about getting the wireless working, as I noticed dmesg output about hotplug not finding the firmware image...

create /lib/firmware, dl http://www.hauke-m.de/fileadmin/acx/fw.ar.bz2 untar it to /lib/firmware ... and have fun. (but it is the opensource driver, no wpa funktion... only web)

(Last edited by heini on 21 Apr 2007, 11:28)

I added a few fixes for PPPoE and added a config template for configuring it. Should be easier to set up now...

I just wanted to say that I got PPPoE going once I installed the br2684ctl package and manually created nas0, and in fact I am posting via this new OpenWRT instance now.  Am I reading correctly that the new patches automate this step, i.e. getting the vpi/vci settings from config/network?  You guys are too quick for me. :-)

I guess I should go find another topic to ask questions about the acx driver, and keep this one just about the ADSL modem...

who can help with error on build (rev. 7031):
make -C ar7-atm compile
make[3]: Entering directory `/my/openwrt/trunk/package/ar7-atm'
make -C "/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/linux-2.6.19.2" CROSS_COMPILE="mipsel-linux-uclibc-" ARCH="mips" SUBDIRS="/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10" modules
make[4]: Entering directory `/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/linux-2.6.19.2'
  CC [M]  /my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.o
In file included from /my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:74:
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.h:66:7: warning: "PSP_VERSION_MAJOR" is not defined
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.h:279:8: warning: extra tokens at end of #endif directive
In file included from /my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:75:
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7api.h:166:8: warning: extra tokens at end of #endif directive
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c: In function `tn7atm_send_complete':
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:1292: warning: unused variable `ledticks'
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c: In function `tn7atm_receive':
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:1407: warning: unused variable `ledticks'
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c: In function `tn7atm_detect':
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:1800: warning: unused variable `residual'
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c: In function `tn7atm_dsl_irq':
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7api.h:107: sorry, unimplemented: inlining failed in call to 'tn7dsl_handle_interrupt': function body not available
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:608: sorry, unimplemented: called from here
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c: At top level:
/my/openwrt/trunk/build_mipsel/linux-2.6-ar7/sangam_atm-07.01.00.10/tn7atm.c:2354: warning: 'tn7atm_xlate_proc_name' defined but not used

For me both adsl syncing and connection work on my linksys wag354g. The problem instead is the ethernet not running. The output of ifconfig says the interface eth0 is up with static ip 192.168.1.1, but rx and tx byte are stuck to zero.

karl, how have u solved your problems with ethernet?

Yes. Agree. I am too has problems with etherned (rev. 7031, dlink dsl 524-t), look like leds of ethernet blink but connection don't established

I built r7021  and did not do anything special to get ethernet working.  It booted from the first flash install and I telneted into it (I have no serial console).

I did see on a howto for a different model a suggestion to try setting the adam2 variable MAC_PORT to a value of "0" or "1" to configure the network, but I think the 2.6 kernel is now trying to automatically select this and I am not sure if the adam2 variable will actually have any effect.  Might be worth a try...  On my DSL-G604t, there is eth0 and eth1 and I suspect eth1 is not connected to anything. I have the MAC_PORT variable unset in adam2.

cyberstorm wrote:

For me both adsl syncing and connection work on my linksys wag354g. The problem instead is the ethernet not running. The output of ifconfig says the interface eth0 is up with static ip 192.168.1.1, but rx and tx byte are stuck to zero.

karl, how have u solved your problems with ethernet?

Yeah, i know. The driver fails to detect the Admtek switch so it doesn't works.
You can force the switch usage like i do here: https://dev.openwrt.org/ticket/1614 with this patch

thanks rootkit, now ethernet works. I'll wait for someone to put in /etc/config/network a template for acx111 too smile

rootkit wrote:

Yeah, i know. The driver fails to detect the Admtek switch so it doesn't works.
You can force the switch usage like i do here: https://dev.openwrt.org/ticket/1614 with this patch

Is this patch will help with ADM6996M ?