由於上課需要,我們這學期又多買了幾塊PCM7230,不過我們以前用的CF無線網卡卻因為年代久遠已經買不到了...@@。所以從學期初起,我就幫忙今年的助教們想辦法解決這個難題。一開始我們試著找和以前一樣用CF或PCMCIA介面的網卡,不過實在是不好找,只好轉向USB介面的網卡。經過了一番努力,我們試出了Planex GW-US54GXS這張卡有支援linux,也可以在PCM7230上work,但不幸的是,全台灣竟然剩不到十張!?最後,我們改買使用同款晶片(ZD1211 chipset)的Buffalo WLI-U2-KG54L,總算在昨晚成功地解決了~^^

以下就是完整的步驟:

  1. Build kernel for wireless support
    (target OS is Linux kernel 2.4.19-rmk4-pxa1)
    $ make menuconfig
    Enter "Network device support" -> "Wireless LAN (non-hamradio)"
    Enable "Wireless LAN (non-hamradio)"
  2. Add the USB vendor and product ID for your adapter (refer to Linux Wireless ) in the source code of ZD1211 driver
    Add USE_DEVICE(0x0411,0x00DA) at usb device list as follows:

    (in zdusb.c)
    static struct usb_device_id zd1211_ids [] = {
    #ifdef ZD1211B
    ...
    { USB_DEVICE(0x0411,0x00DA) },
    ...
    }

  3. Cross compile the driver for target board
    (in Makefile)
    CC=arm-linux-gcc
    CPP=arm-linux-g++
    LD=arm-linux-ld
    ...
    KERN_24=y
    KERNEL_SOURCE=/path/to/target/kernel/source

    $ make -DZD1211REV_B=1

  4. Put the module in ramdisk and load it on booting
    $ cp zd1211b.o <ramdisk>/lib/modules/<kernel_version>/kernel/drivers/net/

    Add "zd1211b" in <ramdisk>/etc/modules
arrow
arrow
    全站熱搜

    cym 發表在 痞客邦 留言(0) 人氣()