ath auf WRAP

Herakles

Profifragensteller
Moin!

Ich habe OpenBSD auf einem WRAP.1E installiert. Als WLAN-Karte habe ich eine GIGABYTE GN-WI01HT auf das Board geclippt. Laut ath(4) ist diese Karte nicht supported, dennoch möchte ich den Versuch noch nicht als gescheitert ansehen. Sollte die Karte auf dem Board zum laufen kommen, besteht die reele Möglichkeit, dass ich den Treiber der Karte in meiner Diplomarbeit erweitere, also will ich auch weitermachen ;-)

So, folgendes bekomme ich mit dmesg heraus:

Code:
[ using 493460 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 3.9-stable (GENERIC) #1: Fri Sep 15 17:22:19 CEST 2006
    root@testmachine.intern.com:/usr/src/sys/arch/i386/compile/GENERIC
RTC BIOS diagnostic error 80<clock_battery>
cpu0: Geode(TM) Integrated Processor by National Semi ("Geode by NSC" 586-class) 267 MHz
cpu0: FPU,TSC,MSR,CX8,CMOV,MMX
cpu0: TSC disabled
real mem  = 133804032 (130668K)
avail mem = 115367936 (112664K)
using 1658 buffers containing 6791168 bytes (6632K) of memory
RTC BIOS diagnostic error 80<clock_battery>
mainbus0 (root)
bios0 at mainbus0: AT/286+(77) BIOS, date 11/08/05, BIOS32 rev. 0 @ 0xfc622
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xe0000/0x8000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Cyrix GXm PCI" rev 0x00
vendor "Atheros", unknown product 0x001b (class network subclass ethernet, rev 0x01) at pci0 dev 13 function 0 not configured
sis0 at pci0 dev 14 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, address 00:0d:b9:02:cb:5c
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 15 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 9, address 00:0d:b9:02:cb:5d
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci0 dev 16 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 11, address 00:0d:b9:02:cb:5e
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
gscpcib0 at pci0 dev 18 function 0 "NS SC1100 ISA" rev 0x00
gpio0 at gscpcib0: 64 pins
"NS SC1100 SMI" rev 0x00 at pci0 dev 18 function 1 not configured
pciide0 at pci0 dev 18 function 2 "NS SCx200 IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <Hitachi XX.V.3.4.0.0>
wd0: 1-sector PIO, LBA, 244MB, 500400 sectors
wd0(pciide0:0:0): using PIO mode 2
"NS SCx200 AUDIO" rev 0x00 at pci0 dev 18 function 3 not configured
geodesc0 at pci0 dev 18 function 5 "NS SC1100 X-Bus" rev 0x00: iid 6 revision 3 wdstatus 0
isa0 at gscpcib0
isadma0 at isa0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
gscsio0 at isa0 port 0x2e/2: SC1100 SIO rev 1: ACB1 ACB2
iic0 at gscsio0
iic1 at gscsio0
lmtemp0 at iic1 addr 0x48: lm77
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
biomask f1ef netmask ffef ttymask ffef
pctr: no performance counters in CPU
nvram: invalid checksum
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
clock: unknown CMOS layout
WARNING: clock time much less than file system time
WARNING: using file system time
WARNING: CHECK AND RESET THE DATE!
/dev/rwd0a: file system is clean; not checking
mfs: mounting /tmp...
mfs: populating /tmp...
databases: dev
securelevel: kern.securelevel: 0 -> 1
watchdog: kern.watchdog.period: 0 -> 32
watchdog: kern.watchdog.auto: 1 -> 1
hostname: setting hostname to sample...
inet: configuring IP on system interfaces...
route: adding default route...
add net default: gateway 208.192.32.1
pf/nat: configuring and enabling...
pf enabled
syslogd: starting log daemon...
ssh: starting daemon...

OpenBSD/i386 (sample) (tty00)

login:

Die Interessante Zeile ist wohl diese hier:

vendor "Atheros", unknown product 0x001b (class network subclass ethernet, rev 0x01) at pci0 dev 13 function 0 not configured

, da es sich um einen Atheros Chip handelt. In GENERIC ist dieser Treiber defaultmäßig an, jedoch als "ath* pci?". Nun dachte ich mir, dass ich doch einfach mal die Angaben der dmesg nutze und einen neuen Kernel baue. Logischerweise muss ich dies auf einem Fremdsystem ("testrechner") machen, was aber ebenfalls x86 ist.

Setze ich nun in GENERIC folgendes ein:

Code:
ath* at pci0 dev 13 function 0

passiert dieses:

Code:
root@testmachine:[/usr/src/sys/arch/i386/conf]# config EMBIGENCE
EMBIGENCE:479: ath* at pci0 is orphaned
 (no pci0 declared)
*** Stop.

Klar, dass der testrechner das nicht kennt, soll dieser Kernel doch auch nicht auf dem testrechner laufen, sondern auf dem WRAP.

Wie also bring ich meinem testrechner nun bei, dass er den Kernel übersetzt bzw. wie bekomme ich den ath auf dem WRAP zum Laufen?

Danke, Herakles
 
Zuletzt bearbeitet:
Herakles schrieb:
Code:
ath* at pci0 dev 13 function 0

passiert dieses:

Code:
root@testmachine:[/usr/src/sys/arch/i386/conf]# config EMBIGENCE
EMBIGENCE:479: ath* at pci0 is orphaned
 (no pci0 declared)
*** Stop.
das hat nichts damit zu tun, dass der testrechner das nicht kennt, weil er die karte nicht engebaut hat. das ist ein rein syntaktisches problem von config(8), welches die kernelconfig parst.

das liegt ganz einfach daran, dass in der config woertlich kein pci0 deklariert ist, auch wenn zur bootzeit aus dem pci* at ... ein pci0 at ... wird.

im uebrigen ist das der falsche ansatz. schau mal in die config, wie ath eingebunden wird. da steht garantiert sowas wie ath* at pci?, d.h. es ist egal, auf welchem pci-bus die karte haengt. wuerde der treiber die karte kennen (nach vendor und product id), dann wuerde er sie finden. das jetzt auf pci0 zu "hardwiren", bringt gar nichts.

wenn du glueck hast, kannst du die product id im treiber hinzufuegen und das laeuft. so koennen z.b. updates bei fxp(4) passieren, weil das alles nur varianten des selben chips sind. im fall von ath bin ich da allerdings weniger optimistisch. du muesstest den treiber schon direkt erweitern, damit er mit der karte umgehen kann.
 
wenn du glueck hast, kannst du die product id im treiber hinzufuegen und das laeuft. so koennen z.b. updates bei fxp(4) passieren, weil das alles nur varianten des selben chips sind.

Ok, das würde ich gerne versuchen. Kannst Du mir einen Tipp geben, wie man an so eine Sache herangeht? Ich habe mal im source nach den Firmennamen der laut ath(4) laufenden Interfaces gesucht, leider jedoch erfolglos.

Wie sähe der Ansatz aus? Oder zeig mir ein Beispiel, wie sowas bei fxp(4) geschieht, dann würde ich selbst versuchen, dieses Wissen zu transferrieren. Schließlich bin ich ja auch zum lernen hier :-)

Danke, Herakles
 
bei solchen updates wird nur die noch unbekannte product id der karte in den treiber hinzugefuegt.

beispiele dafuer finden sich unter http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/sys/dev/pci/pcidevs und http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/sys/dev/pci/if_fxp_pci.c.

konkret:

http://cvsweb.de.netbsd.org/cgi-bin.../pcidevs.diff?r1=1.701.2.37;r2=1.701.2.38;f=h
http://cvsweb.de.netbsd.org/cgi-bin...if_fxp_pci.c.diff?r1=1.40.2.2;r2=1.40.2.3;f=h

das erste ist die globale tabelle aller bekannten vendor und product ids. dort werden die ids als defines abstrahiert, damit man keine beliebigen zahlen in den treiber hardcoden muss. letztendlich wird dann die neue id einfach im treiber-source in eine bedingung mit eingebaut, die dem treiber sagt, ob er fuer dieses device jetzt zustaendig ist oder nicht. ein schneller blick zu openbsd zeigt, dass das da genauso ablaeuft.

die datei pcidevs muss uebrigens nach dem update noch in eine .h-datei konvertiert werden. unter netbsd dafuer ist Makefile.pcidevs zustaendig. openbsd hat direkt nur ein Makefile, was das gleiche macht.

wie gesagt bezweifle ich allerdings, dass das bei ath so einfach ist, aber einen versuch ist es sicher wert.

<nach einigem rumsuchen>

ich sehe gerade, dass das ganze bei ath ein wenig anders zu laufen scheint. dort wird im treiber nur ein ath_hal_probe() aufgerufen. diese funktion scheint dann allerdings nur als binary vorzuliegen, d.h. du kannst die product ids nicht aendern. es sieht ganz so aus, als muesstes du warten, bis es ein ath-update gibt.

im prinzip kannst du das, was ich oben zuerst geschrieben habe, vergessen. ich lass es aber trotzdem stehen. sorry fuer die falschen hoffnungen :/

ich bin kein programmierer, deswegen dachte ich, dass das aehnlich einfach ist wie die anderen updates, die ich bisher bei fxp z.b. mitbekommen hab. bei ath war ja was mit nicht-ganz-freiem treiber + binary-only hal.

edit: man kann auf diese weise nicht einmal im voraus feststellen, ob der bsd-treiber ein geraet unterstuetzt oder nicht. ich war auch erst letzte woche auf der suche nach einer minipci-wlan-karte und bin bei einer gigabyte gn-wi01gs mit ral(4) chipsatz gelandet. dort habe ich mir einfach den windows-treiber runtergeladen und in der .inf-datei nach der produktbezeichnung und der passenden product-id gesucht und diese dann auch in if_ral.c gefunden.

mein tipp waere, die karte zurueckzugeben und nach einer unterstuetzten karte zu suchen. ich wuerde ausserdem ath nicht kaufen, wenn die solche binary-only-geschichten machen.

edit2: falls es interessiert, eine gigabyte gn-wi01gs:
Code:
ral0 at pci0 dev 13 function 0: Ralink Technologies RT2561S 802.11b/g (rev. 0x00)
ral0: interrupting at irq 12
ral0: 802.11 address [...]
ral0: MAC/BBP RT2661B, RF RT2527
ral0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ral0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

# ifconfig -m ral0
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid [...] apbridge
        powersave off
        bssid [...] chan 6
        address: [...]
        media: IEEE802.11 autoselect mode 11g hostap
        status: active
        supported IEEE802.11 media:
                media autoselect
                media autoselect mediaopt adhoc
                media autoselect mediaopt hostap
                media autoselect mediaopt monitor
                media autoselect mode 11b
                media autoselect mode 11b mediaopt adhoc
                media autoselect mode 11b mediaopt hostap
                media autoselect mode 11b mediaopt monitor
                media DS1 mode 11b
                media DS1 mode 11b mediaopt adhoc
                media DS1 mode 11b mediaopt hostap
                media DS1 mode 11b mediaopt monitor
                media DS2 mode 11b
                media DS2 mode 11b mediaopt adhoc
                media DS2 mode 11b mediaopt hostap
                media DS2 mode 11b mediaopt monitor
                media DS5 mode 11b
                media DS5 mode 11b mediaopt adhoc
                media DS5 mode 11b mediaopt hostap
                media DS5 mode 11b mediaopt monitor
                media DS11 mode 11b
                media DS11 mode 11b mediaopt adhoc
                media DS11 mode 11b mediaopt hostap
                media DS11 mode 11b mediaopt monitor
                media autoselect mode 11g
                media autoselect mode 11g mediaopt adhoc
                media autoselect mode 11g mediaopt hostap
                media autoselect mode 11g mediaopt monitor
                media DS1 mode 11g
                media DS1 mode 11g mediaopt adhoc
                media DS1 mode 11g mediaopt hostap
                media DS1 mode 11g mediaopt monitor
                media DS2 mode 11g
                media DS2 mode 11g mediaopt adhoc
                media DS2 mode 11g mediaopt hostap
                media DS2 mode 11g mediaopt monitor
                media DS5 mode 11g
                media DS5 mode 11g mediaopt adhoc
                media DS5 mode 11g mediaopt hostap
                media DS5 mode 11g mediaopt monitor
                media DS11 mode 11g
                media DS11 mode 11g mediaopt adhoc
                media DS11 mode 11g mediaopt hostap
                media DS11 mode 11g mediaopt monitor
                media OFDM6 mode 11g
                media OFDM6 mode 11g mediaopt adhoc
                media OFDM6 mode 11g mediaopt hostap
                media OFDM6 mode 11g mediaopt monitor
                media OFDM9 mode 11g
                media OFDM9 mode 11g mediaopt adhoc
                media OFDM9 mode 11g mediaopt hostap
                media OFDM9 mode 11g mediaopt monitor
                media OFDM12 mode 11g
                media OFDM12 mode 11g mediaopt adhoc
                media OFDM12 mode 11g mediaopt hostap
                media OFDM12 mode 11g mediaopt monitor
                media OFDM18 mode 11g
                media OFDM18 mode 11g mediaopt adhoc
                media OFDM18 mode 11g mediaopt hostap
                media OFDM18 mode 11g mediaopt monitor
                media OFDM24 mode 11g
                media OFDM24 mode 11g mediaopt adhoc
                media OFDM24 mode 11g mediaopt hostap
                media OFDM24 mode 11g mediaopt monitor
                media OFDM36 mode 11g
                media OFDM36 mode 11g mediaopt adhoc
                media OFDM36 mode 11g mediaopt hostap
                media OFDM36 mode 11g mediaopt monitor
                media OFDM48 mode 11g
                media OFDM48 mode 11g mediaopt adhoc
                media OFDM48 mode 11g mediaopt hostap
                media OFDM48 mode 11g mediaopt monitor
                media OFDM54 mode 11g
                media OFDM54 mode 11g mediaopt adhoc
                media OFDM54 mode 11g mediaopt hostap
                media OFDM54 mode 11g mediaopt monitor
                media DS1
                media DS1 mediaopt adhoc
                media DS1 mediaopt hostap
                media DS1 mediaopt monitor
                media DS2
                media DS2 mediaopt adhoc
                media DS2 mediaopt hostap
                media DS2 mediaopt monitor
                media DS5
                media DS5 mediaopt adhoc
                media DS5 mediaopt hostap
                media DS5 mediaopt monitor
                media DS11
                media DS11 mediaopt adhoc
                media DS11 mediaopt hostap
                media DS11 mediaopt monitor
                media OFDM6
                media OFDM6 mediaopt adhoc
                media OFDM6 mediaopt hostap
                media OFDM6 mediaopt monitor
                media OFDM9
                media OFDM9 mediaopt adhoc
                media OFDM9 mediaopt hostap
                media OFDM9 mediaopt monitor
                media OFDM12
                media OFDM12 mediaopt adhoc
                media OFDM12 mediaopt hostap
                media OFDM12 mediaopt monitor
                media OFDM18
                media OFDM18 mediaopt adhoc
                media OFDM18 mediaopt hostap
                media OFDM18 mediaopt monitor
                media OFDM24
                media OFDM24 mediaopt adhoc
                media OFDM24 mediaopt hostap
                media OFDM24 mediaopt monitor
                media OFDM36
                media OFDM36 mediaopt adhoc
                media OFDM36 mediaopt hostap
                media OFDM36 mediaopt monitor
                media OFDM48
                media OFDM48 mediaopt adhoc
                media OFDM48 mediaopt hostap
                media OFDM48 mediaopt monitor
                media OFDM54
                media OFDM54 mediaopt adhoc
                media OFDM54 mediaopt hostap
                media OFDM54 mediaopt monitor
[...]
 
Zuletzt bearbeitet:
Zurück
Oben