FreeBSDをVAIOを使う

FreeBSD 6.2-STABLEでいくつかの便利な設定を行ってみます。

Sony VAIOノートのジョグダイアルを使う

Sony VAIOノートにはジョグダイアルが付いている時期がありました。 あればあるで便利だったのですが、いまでは無くなってしまいました。付い ている機種で使えるようにしてみます。

# vi /sys/i386/conf/GENERIC1

+ include GENERIC
+ ident   GENERIC1
+ device  spic
# cd /sys/i386/conf
# config GENERIC1
# cd ../compile/GENERIC1
# make depend && make install
# vi /boot/device.hints

+ hint.spic.0.at="isa"
+ hint.spic.0.port="0x10a0"
# vi /etc/rc.conf

+ moused_jogdial_enable="YES"
+ moused_jogdial_type="jogdial"
+ moused_jogdial_port="/dev/jogdial"
+ moused_jogdial_flags=""
# vi /usr/local/etc/rc.d/moused_jogdial

#!/bin/sh

case "$1" in
"start")
        /etc/rc.d/moused start jogdial
        ;;

"stop")
        /etc/rc.d/moused stop jogdial
        ;;

"restart")
        /etc/rc.d/moused stop jogdial
        /etc/rc.d/moused start jogdial
        ;;

*)
        ;;

esac
# chmod 755 /usr/local/etc/rc.d/moused_jogdial
# reboot

カーネルの起動時のメッセージを確認します。

spic0: device model type = 1
spic0: <Sony Programmable I/O Controller< at port 0x10a0-0x10a4 on isa0

Intel Speed Step Technologyを使う

# vi /boot/loader.conf

+ cpufreq_load="YES"
# vi /etc/rc.conf

+ powerd_enable="YES"
# kldload cpufreq
# /etc/rc.d/powerd start

OSでサポートされていない無線LANカードをNDISラッパーで使う

ここでは試しにBUFFALO WLI-CB-G108を使えるようにしてみます。

NDISドライバのインストール

% cd CBG100
% ndisgen Netg108.inf CBG1081.sys
# cp CBG1081_sys.ko /boot/modules
# vi /boot/loader.conf

+ CBG1081_sys_load="YES"
# mkdir /compat/ndis
# cp CBG108.CAT /compat/ndis
# cp CBG108.bin /compat/ndis
# cp CBG1081.sys /compat/ndis

無線LAN設定

TKIPを使うように設定してみます。

# vi /etc/rc.conf

+ ifconfig_ndis0="WPA DHCP"
# vi /etc/wpa_supplicant.conf

+ network={
+   ssid="XXXXXXXXXXXXXX"
+   scan_ssid=1
+   key_mgmt=WPA-PSK
+   pairwise=TKIP
+   group=TKIP
+   psk="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ }
# reboot
cardbus0: Resource not specified in CIS: id=14, size=80000
ndis0: <BUFFALO WLI-CB-G108 Wireless LAN Driver>
 mem 0x88080000-0x8809ffff,0x88000000-0x8807ffff irq 9 at device 0.0 on cardbus0
ndis0: NDIS API version: 5.1
ndis0: Ethernet address: 00:xx:xx:xx:xx:xx
# ifconfig ndis0

ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.10.100 netmask 0xffffff00 broadcast 192.168.10.255
        ether 00:xx:xx:xx:xx:xx
        media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
        status: associated
        ssid XXXXXXXXXXXXXX channel 6 bssid 00:XX:XX:XX:XX:XX
        authmode WPA privacy OFF powersavemode CAM powersavesleep 100
        txpowmax 100 bmiss 7 protmode CTS

それにしてもassociateに時間がかかるのはなぜ?
しかもunstable...