「ubuntu/Hardy Heron/KernelRebuild」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
*カーネル・カーネルモジュールのリビルド
#contents()
現状の Ubuntu Hardy では、D4 の動作に必要な、psb,drm カーネルドライバと、無線用の SD8686 のドライバが組み込まれていない。これは、カーネルドライバの再構築で作れる。手順は以下の通り。
*より小さいカーネルを
参考サイト:
-http://andreas.goelzer.de/kernel-config-based-on-lsmod-output
-http://wiki.linuxquestions.org/wiki/Configuring_linux_kernel
*最新 ALSA ソースのマージ
http://d.hatena.ne.jp/kakurasan/20070629/p1
ここを参考にして、カーネルソースに 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
でけたー。でもしかし、これでブートするだけではダメらしい。dmesg に色々エラーが記録されていて、デバイスの初期化に失敗しているような・・・。実績のある 1.0.18a あたりで試すべきだったか。大量の Unknown symbol のエラーと、snd: disagrees about version of symbol sound_slass だそうな。(カーネルモジュールとカーネルとのバージョンの整合が取れていないらしい(http://blog.mnsoft.net/murmur/archives/2007/03/disagrees_about.html http://lists.atmark-techno.com/pipermail/armadillo/2007-November/002370.html)。ビルドし直したカーネルでもう一度試してみる。
*カーネルの再構築(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
**フレーバーの作成
以下のページに新たなフレーバーを追加する方法がかかれているのでそれにしたがって ws016sh フレーバーを追加した。
http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
※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
**フレーバーの作成
http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
の記載に習って、以下のファイルを修正した。
-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
*メモ
**参考サイト
-http://https..wiki.ubuntu.com/KernelMaintenance#head-ef6ca858b4b97c1ad30639e34d92abb11ef37cf8
-http://jody.sci.hokudai.ac.jp/~ike/blog/2007/06/kernelubuntu.html
-http://https..help.ubuntu.com/community/Kernel/Compile
-http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
-http://blog.avirtualhome.com/2008/10/31/compiling-a-new-release-of-the-ubuntu-intrepid-kernel-using-git/
**作業記録
カーネルモジュールの構築ログ
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
#javascript(){{
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "http://https..ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7139291-1");
pageTracker._trackPageview();
} catch(err) {}</script>
}}
*カーネル・カーネルモジュールのリビルド
#contents()
現状の Ubuntu Hardy では、D4 の動作に必要な、psb,drm カーネルドライバと、無線用の SD8686 のドライバが組み込まれていない。これは、カーネルドライバの再構築で作れる。手順は以下の通り。
*より小さいカーネルを
参考サイト:
-http://andreas.goelzer.de/kernel-config-based-on-lsmod-output
-http://wiki.linuxquestions.org/wiki/Configuring_linux_kernel
*最新 ALSA ソースのマージ
http://d.hatena.ne.jp/kakurasan/20070629/p1
ここを参考にして、カーネルソースに 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
でけたー。でもしかし、これでブートするだけではダメらしい。dmesg に色々エラーが記録されていて、デバイスの初期化に失敗しているような・・・。実績のある 1.0.18a あたりで試すべきだったか。大量の Unknown symbol のエラーと、snd: disagrees about version of symbol sound_class だそうな。(カーネルモジュールとカーネルとのバージョンの整合が取れていないらしい(http://blog.mnsoft.net/murmur/archives/2007/03/disagrees_about.html http://lists.atmark-techno.com/pipermail/armadillo/2007-November/002370.html)。現状では、マージしたALSA のコードはモジュールとしては生成されていなくて、LUM 側のモジュールの読み込み時にエラーが出ているよう。何のバージョンと何のバージョンとが不整合なのだろう?
*カーネルの再構築(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
**フレーバーの作成
以下のページに新たなフレーバーを追加する方法がかかれているのでそれにしたがって ws016sh フレーバーを追加した。
http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
※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
**フレーバーの作成
http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
の記載に習って、以下のファイルを修正した。
-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
*メモ
**参考サイト
-http://https..wiki.ubuntu.com/KernelMaintenance#head-ef6ca858b4b97c1ad30639e34d92abb11ef37cf8
-http://jody.sci.hokudai.ac.jp/~ike/blog/2007/06/kernelubuntu.html
-http://https..help.ubuntu.com/community/Kernel/Compile
-http://blog.avirtualhome.com/2008/10/28/how-to-compile-a-custom-kernel-for-ubuntu-intrepid-using-git/
-http://blog.avirtualhome.com/2008/10/31/compiling-a-new-release-of-the-ubuntu-intrepid-kernel-using-git/
**作業記録
カーネルモジュールの構築ログ
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
#javascript(){{
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "http://https..ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7139291-1");
pageTracker._trackPageview();
} catch(err) {}</script>
}}