カーネル・カーネルモジュールのリビルド
現状の Ubuntu Hardy では、D4 の動作に必要な、psb,drm カーネルドライバと、無線用の SD8686 のドライバが組み込まれていない。これは、カーネルドライバの再構築で作れる。手順は以下の通り。
より小さいカーネルを
参考サイト:
最新 ALSA ソースのマージ
cd linux-2.6.24-custom/
mkdir ../alsa-driver-1.0.19/tmp
mv Documentation/sound/alsa/ Documentation/sound/alsa.old
mv include/sound/ include/sound.old
mv sound/ sound.old
mv ../alsa-driver-1.0.19/alsa-kernel/Documentation/ Documentation/sound/alsa
mv ../alsa-driver-1.0.19/alsa-kernel/include/ include/sound
mv ../alsa-driver-1.0.19/alsa-kernel/oss/ ../alsa-driver-1.0.19/alsa-kernel/scripts/ ../alsa-driver-1.0.19/tmp/
mv ../alsa-driver-1.0.19/alsa-kernel/ sound
mv sound.old/oss/ sound
一応マージ完了。あとは、カーネルソースの include/sound/version.h を以下のように修正
$ cat include/sound/version.h
/* include/version.h */
#define CONFIG_SND_VERSION "1.0.19"
#define CONFIG_SND_DATE "(Mon Jun 19 20:22:00 2009 UTC)"
続いて、いよいよビルド。
debian/rules updateconfigs
全部、デフォルト値(Enter)で切り抜ける。
fakeroot debian/rules binary-ws016sh
カーネルの再構築(ws016sh フレーバー)
カーネルソースを修正して、既存のパッケージとは異なるパッケージでカーネルパッケージを作る。
必要なパッケージを導入する
sudo aptitude install dpkg-dev fakeroot debhelper
sudo aptitude install linux-kernel-devel devscripts libncurses5-dev ccache
カーネルソースを取得
apt-get source linux-image-2.6.24-22-generic
フレーバーの作成
※debian/control debian/control.stub ファイル内のヘッダパッケージの定義で同バージョンのカーネルヘッダへの依存関係があったのを削除(→しちゃだめ)
ビルド
fakeroot debian/rules binary-ws016sh
カーネルモジュールの再構築(ws016sh フレーバー)
あらかじめ上で作成した ws016sh フレーバーのカーネルヘッダをインストールしておく。
dpkg -i linux-headers-2.6.24-22-ws016sh_2.6.24-22.45_i386.deb
必要なパッケージを導入する
sudo aptitude install dpkg-dev fakeroot debhelper
カーネルモジュールのソースを取得
apt-get source linux-ubuntu-modules-2.6.24-22-generic
フレーバーの作成
- debian/rules.d/i386.mk
- debian/control
- debian/control.stub
debian/config/i386 ファイルを修正する。
CONFIG_DRM_PSB=m
CONFIG_MMC_SD8686=m
CONFIG_MMC_SD8688=m
の2行を追加
ビルド
fakeroot debian/rules binary-modules-ws016sh
※これでライブCDを作ろうとしたら、カーネルヘッダパッケージが依存関係の問題でインストールできなかった。
カーネルの再構築(generic フレーバーのカスタマイズ)
必要なパッケージを導入する
sudo aptitude install dpkg-dev fakeroot debhelper
sudo aptitude install linux-kernel-devel devscripts libncurses5-dev ccache
カーネルソースを取得
apt-get source linux-image-2.6.24-19-generic
ソースの修正
driver/usb/serial/pl2303.h
driver/usb/serial/pl2303.c
を修正した。
ビルド
fakeroot debian/rules binary-generic
カーネルモジュールの再構築(generic フレーバーのカスタマイズ)
必要なパッケージを導入する
sudo aptitude install dpkg-dev fakeroot debhelper
カーネルモジュールのソースを取得
apt-get source linux-ubuntu-modules-2.6.24-19-generic
debian/config/i386 ファイルを修正する。
CONFIG_DRM_PSB=m
CONFIG_MMC_SD8686=m
CONFIG_MMC_SD8688=m
の2行を追加
ビルド
fakeroot debian/rules binary-modules-generic
メモ
参考サイト
作業記録
カーネルモジュールの構築ログ
14 sudo aptitude install dpkg-dev fakeroot debhelper
15 apt-get source linux-ubuntu-modules-2.6.24-19-generic
17 cd linux-ubuntu-modules-2.6.24-2.6.24/
18 vi debian/config/i386
19 fakeroot debian/urles binary-modules-generic
カーネルの構築
36 apt-get source linux-image-2.6.24-19-generic
38 cd linux-2.6.24/
42 sudo aptitude install linux-kernel-devel devscripts libncurses5-dev ccache
46 fakeroot debian/rules binary-generic
最終更新:2009年02月04日 11:42