« SC-02BにカスタムROM SuperNexus 2.0 を入れる | トップページ | hx2750でDebian Lenny を使う - カーネル構築メモ »

2013年12月25日 (水)

hx2750でDebian Lenny を使う - 内臓WiFi構築

ググってみるとiPAQの内臓Wifiを使うには、acx100ドライバを使うとあった。
kernel 2.6.23 には標準でacx100ドライバは入っておらず、
ググってみるとパッチの中にacxドライバが見つかったので試してみた。
パッチファイルは、htcuni-acx.patch
以下のサイトから入手
http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/packages/linux/linux-rp-2.6.23/?h=purple

Kconfigをみると CONFIG_NET_RADIO=y にする必要があるらしい。
kernel 2.6.23 では、menuconfig で以下の項目を有効にしてみた。

#  make menuconfig
[*] Network device support  --->
        Wireless LAN  --->
                [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions 
                [*]   Wireless Extension API over RtNetlink

上記の設定をすると、acx100ののcardbusのドライバが選択できる。

[*] Network device support  --->
        Wireless LAN  --->
                [M] TI acx100/acx111 802.11b/g wireless chipsets
                [*]   TI acx100/acx111 802.11b/g cardbus interface

念のため以下の設定も<*>にする。

Networking  --->
        Wireless  --->
                <*> Generic IEEE 802.11 Networking Stack (mac80211)
                <*> Generic IEEE 802.11 Networking Stack
                        <*>   IEEE 802.11i CCMP support
                        <*>   IEEE 802.11i TKIP encryption
                <*>   Software MAC add-on to the IEEE 802.11 networking stack

起動させてみると、firmwareファイルが必要とエラーメッセージが出た。

# modprobe acx

acx: this driver is still EXPERIMENTAL
acx: reading README file and/or Craig's HOWTO is recommended, 
visit http://acx100.sf.net in case of further questions/discussion
MEMORY WINDOW FOUND!!!
requesting Irq...
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
acx: found ACX100-based wireless network card
memwinbase=3c000000 memwinsize=4096
ACX radio type 0x0d
acx: firmware image 'WLANGEN.BIN' was not provided. Check your hotplug scripts
acx: reset_dev() FAILED
wlan%d: index 0x01: irq 118, mem 0x3c000000-0x3c000fff

ググってHX4700用のFirmwareを /lib/firmware に置いてみる。

# ls /lib/firmware/
RADIO0d.BIN  RADIO11.BIN  WLANGEN.BIN

再度リブートして確認

Linux version 2.6.23 (root@atde) (gcc version 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)) 
#18 PREEMPT Wed Dec 25 18:29:47 JST 2013
CPU: XScale-PXA270 [69054114] revision 4 (ARMv5TE), cr=0000397f
Machine: HP iPAQ HX2750
Memory policy: ECC disabled, Data cache writeback
Run Mode clock: 208.00MHz (*16)
Turbo Mode clock: 624.00MHz (*3.0, active)
Memory clock: 208.00MHz (/2)
System bus clock: 208.00MHz
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists in Zone order.  Total pages: 32512
Kernel command line: root=/dev/mmcblk0p2 rw rootdelay=6 noinitrd ramdisk_size=12288 
mem=128M cachepolicy=writeback console=tty0 console=ttyS0,115200n8 apm=off
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [tty0] enabled
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 127104KB available (2516K code, 192K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SSP Devices Initialised
NET: Registered protocol family 2
Time: oscr0 clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
input: pxa2xx-keys as /class/input/input0
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered (default)
Console: switching to colour frame buffer device 30x40
Load PXA Overlay driver successfully!
pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART
RAMDISK driver initialized: 16 RAM disks of 12288K size 1024 blocksize
loop: module loaded
input: tsc2101_ts as /class/input/input1
tsc2101 touchscreen driver initialized
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
pxa27x_udc: version 01-01-2006
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using pxa27x_udc, OUT ep2out-bulk IN ep1in-bulk STATUS ep3in-intr
usb0: MAC c6:3a:40:6f:36:24
usb0: HOST MAC c2:82:61:c3:61:f6
usb0: RNDIS ready
power.c: Adding power management to input layer
sa1100-rtc sa1100-rtc: rtc core: registered sa1100-rtc as rtc0
TCP cubic registered
NET: Registered protocol family 1
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
XScale iWMMXt coprocessor detected.
hx2750 Test Code Initialized.
sa1100-rtc sa1100-rtc: setting the system clock to 1995-05-10 12:00:50 (800107250)
Waiting 6sec before mounting root device...
pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
mmc0: new SD card at address 0002
mmcblk0: mmc0:0002 00000 1955840KiB
 mmcblk0: p1 p2
pccard: PCMCIA card inserted into slot 1
pcmcia: registering new device pcmcia1.0
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mmcblk0p2, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 92K
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...mice: PS/2 mouse device common for all mice
acx: this driver is still EXPERIMENTAL
acx: reading README file and/or Craig's HOWTO is recommended, visit http://acx100.sf.net in case of further questions/discussion
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
eth0: Asix AX88790: io 0xc8820300, irq 75, hw_addr 00:90:CC:DE:D2:58
MEMORY WINDOW FOUND!!!
requesting Irq...
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
acx: found ACX100-based wireless network card
memwinbase=3c000000 memwinsize=4096
ACX radio type 0x0d
acx copy_from_slavemem: warning!  destination not word-aligned!
acx copy_from_slavemem: warning!  destination not word-aligned!
NVS_vendor_offs:0000 probe_delay:500 eof_memory:65536
CCAModes:04 Diversity:01 ShortPreOpt:01 PBCC:01 ChanAgil:00 PHY:05 Temp:01
AntennaID:01 Len:02 Data:1E 00
PowerLevelID:0A Len:00 Data:
DataRatesID:02 Len:05 Data:02 04 11 22 44
DomainID:03 Len:08 Data:30 20 10 31 32 40 41 04
ProductID:09 Len:53 Data:WL-2300
ManufacturerID:CC Len:3B Data:v・ワャ・ゥオ}
                                          
acx: === chipset TNETW1100B, radio type 0x0D (Maxim), form factor 0x03 (Compact Flash), EEPROM version 0x05: uploaded firmware 'Rev 1.10.7.K' ===
acx copy_from_slavemem: warning!  destination not word-aligned!
acx copy_from_slavemem: warning!  destination not word-aligned!
acx copy_from_slavemem: warning!  destination not word-aligned!
acx copy_from_slavemem: warning!  destination not word-aligned!
acx v0.3.36: net device wlan0, driver compiled against wireless extensions 22 and Linux 2.6.23
wlan0: index 0x01: irq 118, mem 0x3c000000-0x3c000fff
done.
Setting the system clock.
Activating swap...done.
Checking root file system...fsck 1.41.3 (12-Oct-2008)
/dev/mmcblk0p2: clean, 18429/91392 files, 99369/365478 blocks
done.
EXT3 FS on mmcblk0p2, internal journal
Setting the system clock.
Cleaning up ifupdown....
Loading kernel modules...done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...done.
Setting up ALSA...done (none loaded).
Recovering jove files ... Done.
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogd.
Starting internet superserver: inetd.
Starting FTP server: vsftpd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 debian ttyS0

debian login: 

気になるメッセージが出ているが、wlan0が認識しているようなので、iwconfigコマンドで確認する。

root@debian:~# iwconfig
lo        no wireless extensions.

usb0      no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b+  ESSID:"STA448E9F"  Nickname:"acx v0.3.36"
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated
          Bit Rate:22 Mb/s   Tx-Power=14 dBm   Sensitivity=176/255
          Retry min limit:7   RTS thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlan0 が有効になっていることが分かる。次にアクセスポイントを指定してみる。

# iwconfig wlan0 essid "ISW11k"
# ifconfig wlan0 key 0123456789

DHCPを起動する

# dhclient wlan0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wlan0: changing radio power level to 14 dBm (47)
NET: Registered protocol family 17
Listening on LPF/wlan0/00:02:78:44:8e:9f
Sending on   LPF/wlan0/00:02:78:44:8e:9f
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.43.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.43.1
bound to 192.168.43.60 -- renewal in 1503 seconds.

IPアドレスがリリースされ、繋がった!!。
通信確認をとるため、パッケージのダウンロードを試す。

# apt-get install lrzsz

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  minicom
The following NEW packages will be installed:
  lrzsz
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 107kB of archives.
After this operation, 270kB of additional disk space will be used.
Get:1 http://archive.debian.org lenny/main lrzsz 0.12.21-4.1 [107kB]
Fetched 107kB in 5s (19.5kB/s)
tar: ./control: time stamp 2007-05-30 21:41:09 is 380453666.777313846 s in the future
tar: ./md5sums: time stamp 2007-05-30 21:41:11 is 380453668.774172923 s in the future
tar: .: time stamp 2007-05-30 21:41:10 is 380453667.773504615 s in the future
Selecting previously deselected package lrzsz.
(Reading database ... 14878 files and directories currently installed.)
Unpacking lrzsz (from .../lrzsz_0.12.21-4.1_armel.deb) ...
Processing triggers for man-db ...
Setting up lrzsz (0.12.21-4.1) ...

ダウンロード成功。とりあえず使える環境になった。

|

« SC-02BにカスタムROM SuperNexus 2.0 を入れる | トップページ | hx2750でDebian Lenny を使う - カーネル構築メモ »

コメント

コメントを書く



(ウェブ上には掲載しません)


コメントは記事投稿者が公開するまで表示されません。



トラックバック

この記事のトラックバックURL:
http://app.cocolog-nifty.com/t/trackback/531329/58820152

この記事へのトラックバック一覧です: hx2750でDebian Lenny を使う - 内臓WiFi構築:

« SC-02BにカスタムROM SuperNexus 2.0 を入れる | トップページ | hx2750でDebian Lenny を使う - カーネル構築メモ »