カーネルvm関西その参lt
DESCRIPTION
カーネルVM@関西 その参のスライドです。TRANSCRIPT
Linuxカーネル3.3でNVIDIAのプロプラドライバを使う
カーネルVM探検隊@関西 その参
by コスモ
Twitter:@cosmo__
Linux3.3で新しくなった部分
● Androidがマージ
● ext4・btrfsが改良された● ネットワーク周りも改良されています● EFI bootのサポート
etc....
参考:http://kernelnewbies.org/Linux_3.3
今回話すのはこれら機能についてではありません。
本題● NVIDIAのプロプライエタリドライバ
● Linux/Unixにも提供されている。● Ubuntuだと高機能ドライバ
としてインストールできます。● カーネルのヘッダーに深く依存…?● 一旦インストールするとnouveauと
相性が悪い● しかもカーネル入れ替えるとドライバを
インストールし直さないとXがディスプレイを見つけられない
何故これを話すかLinux3.3のカーネルをいつものようにコンパイルして立ち上げると…
つまり…このカーネルはサポートしてません。
と出てしまった。
If you are using a Linux 2.4 kernel, please make sure you either have configured kernel sources matching your kernel or the correct set of kernel headers installed on your system. If you are using a Linux 2.6 kernel, please make sure you have configured kernel sources matching your kernel installed on your system. If you specified a separate output directory using either the “KBUILD_OUTPUT” or the “O” KBUILD parameter, make sure to specify this directory with the SYSOUT environment variable or with the equivalent nvidia-installer command line option. Depending on where and how the kernel sources (or the kernel headers) were installed, you may need to specify their location with the SYSSRC environment variable or the equivalent nvidia-installer command line option.
with NVIDIA Driver295.20
NVIDIAのプロプラドライバが入らなかった理由
● NVIDIAのプロプラドライバはインストール時に対応しているかのテストを実行する
● そのテストの一つがcommit:303395ac3bf3e2cb488435537d416bc840438fcbの変更でこけてしまっていた
NVIDIA_Driver/kernel/conftest.sh
コミット履歴を覗く● システムコール生成のスクリプトに変更があった
scripts/checksyscalls.shchecksyscalls: Use arch/x86/syscalls/syscall_32.tbl as sourceauthor H. Peter Anvin <[email protected]>
Fri, 11 Nov 2011 23:57:53 +0000 (15:57 -0800)committer H. Peter Anvin <[email protected]>
Thu, 17 Nov 2011 21:35:37 +0000 (13:35 -0800)Use the new arch/x86/syscalls/syscall_32.tbl file as source instead ofarch/x86/include/asm/unistd_32.h.
Cc: Michal Marek <[email protected]>Cc: Geert Uytterhoeven <[email protected]>Cc: Sam Ravnborg <[email protected]>Signed-off-by: H. Peter Anvin <[email protected]>
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=29dc54c673ea2531d589400badb4ada5f5f60dae;hp=d181764ccf6207e02abb95fb3052639b947f4833
このシェルスクリプトにarch/x86/syscalls/syscall_32.tblからシステムコールに関わるヘッダーを自動生成するように変更が掛かっています。
調べると…● commit
303395ac3bf3e2cb488435537d416bc840438fcb で
以下の2つのファイルの位置に変更
arch/x86/include/asm/unistd_32.harch/x86/include/asm/unistd_64.h
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=303395ac3bf3e2cb488435537d416bc840438fcb
(DELETED)
コケた原因
● conftest.sh:
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
arch/x86/include/asm/unistd_32.harch/x86/include/asm/unistd_64.h
を決め打ちしていた。
”
コケた原因:その2
● 上の2つのヘッダーはarch/x86/include/generated/asm/unistd_(32|64).h
に生成されるようになった
arch/x86/include/asm/unistd_32.harch/x86/include/asm/unistd_64.h
カーネル3.3でドライバを使いたい
arch/x86/include/generated/asm/unistd_(32|64).h
arch/x86/include/asm/unistd_32.harch/x86/include/asm/unistd_64.h
シンボリックリンクを貼る
解決策の1:
カーネル3.3でドライバを使いたいその2:ドライバを解凍してパッチを当てる
--- ~/Document/conftest.sh.orig 2012-03-19 21:11:18.000000000 +0900+++ ~/Document/conftest.sh 2012-03-28 03:54:51.719483979 +0900@@ -126,7 +126,7 @@ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS$OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated" elif [ "$ARCH" = "ARMv7" ]; then CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include" fi
$ sh ./NVIDIA_Driver.run --extract-only
実際にインストールしてみる
● 解決策1を取ってみました。
するとちゃんとインストールできるようです↓
Linux3.3が起動できてる図です。
Linuxカーネル3.3でNVIDIAのプロプラドライバを使う
大体ここらを参考にしています↓http://weltall.heliohost.org/wordpress/2012/01/20/linux-kernel-3-3-rc1-and-nvidia-drivers/http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=303395ac3bf3e2cb488435537d416bc840438fcb
参考にしたブログにはお礼のコメントをしておきました!
と、ここまで話しましたが● NVIDIA Driver 295.33では解決策2が取られてお
り問題は解決していました
マジデスカ…orz
完