Y450 Ubuntu 10.04编译zen Kernel 2.6.34
最近小Y升级到ubuntu 10.04,由于感觉它好慢,于是又折腾起内核来,使用的是zen Kernel,感觉很是方便,哈哈。编译完真实爽多了,记录如下:
1.下载buildZen
详细内容可以参考如下链接
$cd /usr/src
$sudo wget http://
$sudo chmod a+x ./buildZen
|
2.稍微修改buildZen文件
#git clone http://git.zen-sources.org/kernel/"$repo".git;
git clone git://zen-kernel.org/kernel/"$repo".git:
找到如下字段,修改成如下:
cd /usr/src/"$repo"/;
if [ "$I" = "1" ]; then make xconfig; elif [ "$I" = "2" ]; then make gconfig; elif [ "$I" = "3" ]; then make menuconfig; elif [ "$I" = "4" ]; then make localmodconfig; else make oldconfig; fi
红色为添加部分
if [ $(which make-kpkg) != "" ]; then make-kpkg clean INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=2 make-kpkg --initrd kernel_image kernel_headers modules_image;
这里可以按自己的喜欢添加版本信息
--append-to-version -0.1
|
如果不修改,我无法下载zen源代码,修改后可以正常下载
3.运行buildZen文件
这里看个人网络环境,我用的是教育网,平均速度还能达到400K,甚是高兴,最后下载完zen整个文件集大概800M,所以要注意空闲空间的问题。
duxingxia@duxingxia-laptop:/usr/src$ sudo ./buiildZen
[sudo] password for duxingxia:
-en
[INTRODUCTION]
This script will aid you in building the Zen kernel, which you will be building from the git tree. Rerun this script whenever you want to rebuild or update the source tree.
To continue, type zen to install the regular Zen kernel, zenrt to install the Zen realtime kernel, zenmm to install the Zenmm kernel, or zenps3 to build the Zen for Playstation 3 kernel. Otherwise, enter nothing to exit. Any other input will result in an error.
zen
[: 18: xzen: unexpected operator
[CHECKING FOR BUILD DEPENDENCIES]
./buiildZen: 26: [[: not found
./buiildZen: 26: !=: not found
./buiildZen: 26: !=: not found
./buiildZen: 31: [[: not found
gcc: ==: 没有那个文件或目录
gcc: : 没有那个文件或目录
gcc: no input files
make: *** 空变量名。 停止。
autoconf: error: invalid number of arguments
Try `autoconf --help' for more information.
automake: no Automake input file found for `=='
automake: empty argument
automake: Try `/usr/bin/automake --help' for more information.
It appears you have all build dependencies.
[CLONE THE SOURCE TREE]
Now, we must clone the sources via git, using the command "git clone". The cloning process takes anywhere from 5 to 60 minutes, sometimes more. Go grab a coffee or surf the web. It's worth the wait. May I suggest browsing mattparnell.com ?
Cloning zen...
Initialized empty Git repository in /usr/src/zen/.git/
remote: Counting objects: 1724408, done.
remote: Compressing objects: 96% (277928/287591)
|
4.接下来按照提示做就行了。
配置的时候细心一点就ok了,然后会在/usr/src生成image和headers文件,
我的如下:
linux-headers-2.6.34-zen0-0.1_2.6.34-zen0-0.1-10.00.Custom_i386.deb
linux-image-2.6.34-zen0-0.1_2.6.34-zen0-0.1-10.00.Custom_i386.deb
5.安装内核
$cd /usr/src
$sudo dpkg -i linux-image-2.6.34-zen0-0.1_2.6.34-zen0-0.1-10.00.Custom_i386.deb
$sudo dpkg -i linux-headers-2.6.34-zen0-0.1_2.6.34-zen0-0.1-10.00.Custom_i386.deb
$sudo mkinitramfs -o /boot/initrd.img-2.6.34-zen0-0.1 2.6.34-zen0-0.1
$sudo update-grub
完成,重启
重启以后,Y450是Nvidia GT 240,内核会无法编译,网上解决办法如下:
在文件
/etc/modprobe.d/blacklist.conf添加:
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
|
然后启动是选择控制台登录,重新编译Nvidia驱动即可。
Enjoy it
|
文件: | config-2.6.34-zen0.tar.bz2 |
大小: | 11KB |
下载: | 下载 |
|
附件是我的config文件
阅读(2349) | 评论(0) | 转发(0) |