[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:33242] [summary] How to build kernel module
[質å•]
既㫠build 済ã¿ã® kernel-image ã«é©åˆã™ã‚‹ kernel module package を,
kernel-image ã‚’ rebuild ã™ã‚‹ã“ã¨ãªã,build ã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°è‰¯ã„ã§
ã—ょã†ã‹ï¼Ž
[回ç”]
対象ã¨ãªã‚‹ kernel-image を作æˆã™ã‚‹å…ƒã«ãªã£ãŸ kernel-source パッケー
ジ㨠/boot/config-* を使ãˆã°å¯èƒ½ã§ã™ï¼Ž
例ã¨ã—ã¦ï¼Œalsa-modules ã‚’ build ã™ã‚‹å ´åˆã®æ‰‹é †ã‚’以下ã«ç¤ºã—ã¾ã™ï¼Ž
tar xjf /usr/src/kernel-source-`uname -r`.tar.bz2
tar xzf /usr/src/alsa-driver.tar.gz
export MODULE_LOC=`pwd`/modules
cd kernel-source-2.4.18
cp -p /boot/config-`uname -r` .config
fakeroot make-kpkg --revision=xxx modules_image
最後㮠xxx ã®éƒ¨åˆ†ã¯å¯¾è±¡ã¨ãªã‚‹ kernel-image ã® version ã«åˆã‚ã›ã¾ã™ï¼Ž
ã“ã® version ã¯ï¼Œä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§çŸ¥ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼Ž
dpkg --status kernel-image-`uname -r`|awk '/^Version: /{print $2}'
>> On Tue, 4 Jun 2002 14:35:37 +0900
>> ishikawa@xxxxxxxxxxx (ISHIKAWA Mutsumi) said as follows:
>>> > ã“ã¡ã‚‰ã®æ–¹æ³•ã§ã¯ï¼Œkernel-source を展開ã—ãŸå ´æ‰€ã§ä½œæ¥ã§ãã‚‹ã®ã§ï¼Œ
>>> > ã¾ã 気楽ã§ã™ãŒï¼Œbuild 時㮠header files ãŒãã¡ã‚“ã¨å‚ç…§ã•ã‚Œã‚‹ã‹ãŒ
>>> > æ°—ã«ãªã‚Šã¾ã™ï¼Žä¾‹ãˆã°ï¼Œæ‰‹å…ƒã® kernel-source-2.2.20.tar.bz2 ã«ã¯
>>> > modversions.h ãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“ã§ã—ãŸã‹ã‚‰ï¼Œã“れをå‚ç…§ã™ã‚‹ãƒ¢ã‚¸ãƒ¥ãƒ¼
>>> > ルã¯ã‚³ãƒ³ãƒ‘イルã§ããªã„ã¯ãšã§ã™ï¼Ž
>>> むむã€ãã†ã‹ã€‚.configã‚’ç½®ã„ãŸã‚ã¨ã€make menuconfigã‚’ã—ã¦ã™ã終了ã€
>>> ãã‚Œã‹ã‚‰make depを実行ã—ãŸã‚‰ã€modversions.hãŒã§ãã¾ã—ãŸã€‚ã“ã‚Œã§ã„
>>> ã„ã®ã‹ã—ら?
> make-kpkg modules_image ã®ã¿ã®æ™‚ã§ã‚‚ (make-kpkg clean ã—ã¨ã‘ã°)
> make oldconfig
> make dep
>ãŒèµ°ã‚‹ã®ã§ã€.config ã•ãˆ kernel-source-* ã®ä¸‹ã«ç”¨æ„ã—ã¨ã‘ã°
>ã ã„ã˜ã‚‡ã†ã¶ ã ã¨æ€ã†ã‚“ã™ã‘ã©ã€ãƒ€ãƒ¡ã™ã‹?
実際ã«è©¦ã—ã¦ã¿ãŸã‚‰å¤§ä¸ˆå¤«ã§ã—ãŸï¼Ž
アドãƒã‚¤ã‚¹æœ‰ã‚Šé›£ã†ã”ã–ã„ã¾ã—㟠> æ¦è—¤ã•ã‚“,むã¤ã¿ã•ã‚“.
--
土屋 雅稔 ( TSUCHIYA Masatoshi )