2008年9月1日月曜日
Dell Studio で Linux
8月上旬に Dell Studio 17 ノートパソコンなるものを購入。CPU が T9300 (2.5GHz) メモリが 4G という我が家一番の高スペックマシンとなった。お盆休みもあって Linux - debian/lenny 入れてみた。やっぱり? 無線 LAN と GPU で手間取ったので...この位なら切り貼りで良いや。とパッチなど。 CONFIG_DRM は組み込まないように。
Dell Studio の Radeon HD3650
ドライバはここ。カーネルモジュールはいらないかも。と思っていたが、スクロールが遅すぎ。で 2.6.27-rc でコンパイルするためのパッチは以下。GPL なモジュールしか呼び出せない __rcu_read_lock() などこちらを参照しつつ回避しているので注意。
コンパイルはdiff -ubBrN fglrx/Makefile fglrx-27/Makefile
--- fglrx/Makefile 2008-08-24 08:47:58.000000000 +0900
+++ fglrx-27/Makefile 2008-08-30 20:27:22.000000000 +0900
@@ -2,6 +2,11 @@
LIBIP_PREFIX ?= ..
+RCU_READ_LOCK := $(shell grep "T __rcu_read_lock" $(SYSMAP) | colrm 9)
+RCU_READ_UNLOCK := $(shell grep "T __rcu_read_unlock" $(SYSMAP) | colrm 9)
+EXTRA_LDFLAGS := --defsym __rcu_read_lock=0x$(RCU_READ_LOCK) \
+ --defsym __rcu_read_unlock=0x$(RCU_READ_UNLOCK)
+
obj-m += fglrx.o
fglrx-libs += libfglrx_ip.a.GCC$(GCC_VER_MAJ)
fglrx-c-objs += firegl_public.o
diff -ubBrN fglrx/firegl_public.c fglrx-27/firegl_public.c
--- fglrx/firegl_public.c 2008-08-24 08:47:58.000000000 +0900
+++ fglrx-27/firegl_public.c 2008-08-31 21:07:45.000000000 +0900
@@ -3077,7 +3077,7 @@
{
#ifdef __SMP__
/* write back invalidate all other CPUs (exported by kernel) */
- if (smp_call_function(deferred_flush, NULL, 1, 0) != 0)
+ if (smp_call_function(deferred_flush, NULL, 0) != 0)
panic("timed out waiting for the other CPUs!\n");
/* invalidate this CPU */
@@ -4796,7 +4796,7 @@
void ATI_API_CALL KCL_CallFuncOnOtherCpus(firegl_void_routine_t func_to_call)
{
#ifdef CONFIG_SMP
- smp_call_function( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
+ smp_call_function( firegl_smp_func_parameter_wrap, (void*)func_to_call, 1 );
#endif
}
@@ -4910,7 +4910,7 @@
}
#ifdef CONFIG_SMP
- if (smp_call_function(KCL_setup_pat, NULL, 0, 1) != 0)
+ if (smp_call_function(KCL_setup_pat, NULL, 1) != 0)
return 0;
#endif
KCL_setup_pat(NULL);
@@ -4929,7 +4929,7 @@
}
#ifdef CONFIG_SMP
- if (smp_call_function(KCL_restore_pat, NULL, 0, 1) != 0)
+ if (smp_call_function(KCL_restore_pat, NULL, 1) != 0)
return;
#endif
KCL_restore_pat(NULL);
で。SYSMAP に、そのまま... System.map を指定して。make SYSMAP=/boot/System.map-2.6.27-rc5-git1 -C /usr/src/testing SUBDIRS=`pwd` clean
make SYSMAP=/boot/System.map-2.6.27-rc5-git1 -C /usr/src/testing SUBDIRS=`pwd` modules
Dell Studio の WLAN
ドライバはここ。残念なことに mac80211 で deprecated になってしまった CONFIG_IEEE80211。2.6.27-rc でコンパイルするためのパッチは以下
diff -ubBrN hybrid-portsrc-x86_32_5_10_27_6/Makefile hybrid-portsrc-x86_32_5_10_27_6-27/Makefile
--- hybrid-portsrc-x86_32_5_10_27_6/Makefile 2008-07-02 13:32:20.000000000 +0900
+++ hybrid-portsrc-x86_32_5_10_27_6-27/Makefile 2008-08-13 13:29:51.000000000 +0900
@@ -38,3 +38,14 @@
EXTRA_CFLAGS += -I$(src)/src/wl/sys
EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+KERNEL_PATH ?= /lib/modules/`uname -r`/source
+
+default:
+ make -C $(KERNEL_PATH) M=`pwd` modules
+
+clean:
+ make -C $(KERNEL_PATH) M=`pwd` clean
+
+install:
+ make -C $(KERNEL_PATH) M=`pwd` modules_install
\ No newline at end of file
diff -ubBrN hybrid-portsrc-x86_32_5_10_27_6/src/wl/sys/wl_iw.c hybrid-portsrc-x86_32_5_10_27_6-27/src/wl/sys/wl_iw.c
--- hybrid-portsrc-x86_32_5_10_27_6/src/wl/sys/wl_iw.c 2008-07-02 13:31:02.000000000 +0900
+++ hybrid-portsrc-x86_32_5_10_27_6-27/src/wl/sys/wl_iw.c 2008-08-13 13:28:33.000000000 +0900
@@ -931,12 +931,12 @@
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN);
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_ADDR_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_ADDR_LEN);
iwe.u.data.length = dtoh32(bi->SSID_len);
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
- event = iwe_stream_add_point(event, end, &iwe, bi->SSID);
+ event = iwe_stream_add_point(info, event, end, &iwe, bi->SSID);
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) {
iwe.cmd = SIOCGIWMODE;
@@ -944,7 +944,7 @@
iwe.u.mode = IW_MODE_INFRA;
else
iwe.u.mode = IW_MODE_ADHOC;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_UINT_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_UINT_LEN);
}
iwe.cmd = SIOCGIWFREQ;
@@ -952,13 +952,13 @@
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ?
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G);
iwe.u.freq.e = 6;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_FREQ_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_FREQ_LEN);
iwe.cmd = IWEVQUAL;
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI));
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI);
iwe.u.qual.noise = 0x100 + bi->phy_noise;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_QUAL_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_QUAL_LEN);
#if WIRELESS_EXT > 17
@@ -970,7 +970,7 @@
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
}
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t);
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) {
@@ -978,7 +978,7 @@
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
break;
}
}
@@ -989,7 +989,7 @@
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
goto done;
}
}
@@ -1003,7 +1003,7 @@
else
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
- event = iwe_stream_add_point(event, end, &iwe, (char *)event);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)event);
if (bi->rateset.count) {
value = event + IW_EV_LCP_LEN;
@@ -1012,7 +1012,7 @@
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) {
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000;
- value = iwe_stream_add_value(event, value, end, &iwe,
+ value = iwe_stream_add_value(info, event, value, end, &iwe,
IW_EV_PARAM_LEN);
}
event = value;
登録:
投稿 (Atom)