编译内核2.6.33.2出错

编译打包和其他
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

编译内核2.6.33.2出错

#1

帖子 黄美姬 » 2010-04-07 17:34

浪费了1个钟头,晕,当前版本不匹配

代码: 全选

make[1]:正在离开目录 `/home/janker/linux-2.6.33.2'                                       
test ! -e scripts/package/builddeb || mv -f scripts/package/builddeb scripts/package/builddeb.kpkg-dist                                                                           
test ! -e scripts/package/Makefile || test -f scripts/package/Makefile.kpkg-dist || (mv -f scripts/package/Makefile scripts/package/Makefile.kpkg-dist && (echo "# Dummy file "; echo "help:") >  scripts/package/Makefile)                                                
COLUMNS=150 dpkg -l 'gcc*' perl dpkg 'libc6*' binutils make dpkg-dev |\                  
         awk '$1 ~ /[hi]i/ { printf("%s-%s\n", $2, $3) }'> debian/buildinfo              
uname -a >> debian/buildinfo                                                             
echo using the compiler: >> debian/buildinfo                                             
grep LINUX_COMPILER include/linux/compile.h | \                                          
           sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >> debian/buildinfo
grep: include/linux/compile.h: 没有那个文件或目录
echo applied kernel patches: >> debian/buildinfo
echo done > debian/stamp/build/kernel
/usr/bin/make -f ./debian/rules         debian/stamp/binary/pre-linux-image-2.6.33.2-custom0
make[1]: 正在进入目录 `/home/janker/linux-2.6.33.2'
====== making target debian/stamp/install/linux-image-2.6.33.2-custom0 [new prereqs: ]======
This is kernel package version 11.015.
echo "The UTS Release version in include/linux/version.h"; echo "          \"\" "; echo "does not match current version:"; echo "           \"2.6.33.2-custom0\" "; echo "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
           ""
does not match current version:
           "2.6.33.2-custom0"
Please correct this.
make[1]: *** [debian/stamp/install/linux-image-2.6.33.2-custom0] 错误 2
make[1]:正在离开目录 `/home/janker/linux-2.6.33.2'
make: *** [kernel_image] 错误 2
janker@soul ~/linux-2.6.33.2 $
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 编译内核2.6.33.2出错

#2

帖子 黄美姬 » 2010-04-07 18:21

代码: 全选

你这个错误可以这样解决:

1. 修改debian/ruleset/misc/version_vars.mk文件(找不到就搜索一下)
在其中把
UTS_RELEASE_HEADER=$(call doit,if [ -f include/linux/utsrelease.h ]; then \
echo include/linux/utsrelease.h; \
else \
echo include/linux/version.h ; \
fi)
改成
UTS_RELEASE_HEADER=$(call doit,if [ -f include/generated/utsrelease.h ]; then \
echo include/generated/utsrelease.h; \
else \
echo include/generated/version.h ; \
fi)
2. 直接在include/generated下复制utsrelease.h为version.h搞定
3. 再次运行编译,这样应该可以顺利完成编译产生连个.deb文件了
难道又要从头开始,我可是花一个小时了,能否在修改后继续
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 编译内核2.6.33.2出错

#3

帖子 黄美姬 » 2010-04-07 18:27

代码: 全选

grep: include/linux/compile.h: 没有那个文件或目录
晕倒什么是这个,目录下应是compiler.h,少个“r“,genereted/下倒是有compile.h
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 编译内核2.6.33.2出错

#4

帖子 黄美姬 » 2010-04-07 20:22

经验证,还是不行。又花我1小时 :em06

代码: 全选

====== making target debian/stamp/install/linux-image-                              2.6.33.2-custom0 [new prereqs: ]======
This is kernel package version 11.015.
echo "The UTS Release version in include/linux/version                              .h"; echo "        \"\" "; echo "does not match curren                              t version:"; echo "        \"2.6.33.2-custom0\" "; ech                              o "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
           ""
does not match current version:
           "2.6.33.2-custom0"
Please correct this.
make[1]: *** [debian/stamp/install/linux-image-2.6.33.                              2-custom0] 错误 2
make[1]:正在离开目录 `/home/janker/linux-2.6.33.2'
make: *** [kernel_image] 错误 2
janker@soul ~/linux-2.6.33.2 $
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
kamui0523
帖子: 547
注册时间: 2008-05-14 18:53
来自: 上海

Re: 编译内核2.6.33.2出错

#5

帖子 kamui0523 » 2010-04-07 23:55

不用重头开始
debian/ruleset/misc/version_vars.mk 这个文件是在你执行
sudo ake-kpkg --initrd kernel_image kernel-headers
之后才有的
修改完毕version_vars.mk后再执行sudo ake-kpkg --initrd kernel_image kernel-headers就好了
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 编译内核2.6.33.2出错

#6

帖子 黄美姬 » 2010-04-08 6:26

难怪,我改后
又sudo make mrproper了,它就没有了
害我又浪费1小时,
现在生成大便包了 :em04,383M,晕,那个文件夹有7.3G :em04 :em04
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
kamui0523
帖子: 547
注册时间: 2008-05-14 18:53
来自: 上海

Re: 编译内核2.6.33.2出错

#7

帖子 kamui0523 » 2010-04-08 9:17

你编译的东西太多了,.config可以从老的内核的配置文件CP过来再编译,我当时第一次编译也是那么大的,呵呵
在设备那里你可以去掉点模块,比如出你设备以外的声卡,网卡,显卡,反正我的.config文件最后控制在92K左右,编译出来的内核比原来的小些,不过initrd这个文件要小很多,少了3M.然后速度很快,因为选了些优化选项,呵呵
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 编译内核2.6.33.2出错

#8

帖子 黄美姬 » 2010-04-09 4:36

用系统老.config,104K,还精简了不少选项,编出来也有340M,就小了40M。晕 :em06 :em06
1.config.tar.gz
(26.55 KiB) 已下载 51 次
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
fb8fb8
帖子: 14
注册时间: 2010-04-12 6:37

Re: 编译内核2.6.33.2出错

#9

帖子 fb8fb8 » 2010-04-12 6:57

看这个帖子的相关部分:
http://tchdavid.com/blog/?p=203

总结起来就是:
//打开你的kernel里的version_vars.mk
sudo (你的路径)/linux-2.6.33.2/debian/ruleset/misc/version_vars.mk
//然后找到“UTS_RELEASE_HEADER”, 把“echo include/linux/version.h” 改成 “echo include/generated/utsrelease.h”. 注意这一块有两个“echo include/linux/version.h”,都需要改成“echo include/generated/utsrelease.h”。
//然后直接执行
sudo make-kpkg -initrd --initrd --append-to-version=2.6.33.2-custom0 kernel_image kernel-headers
//这样继续编译,千万别执行sudo make-kpkg clean。这样就节省时间了。
头像
jmw778s
帖子: 994
注册时间: 2009-10-16 11:13
来自: 福安
联系:

Re: 编译内核2.6.33.2出错

#10

帖子 jmw778s » 2010-04-12 9:14

某编译编译的kernel 33.2 在30M左右。。。 :em01
Acer 4738ZG-P22G50Mnkk 笔记本电脑
我用Windows 7 来这里装13的
RayWach
帖子: 7
注册时间: 2010-04-29 17:31

Re: 编译内核2.6.33.2出错

#11

帖子 RayWach » 2010-04-30 12:41

菜鸟求助:看到你的帖子关于2.6.33.2内核编译。按照上面的说法编译通过了,然后装上了新内核。后来,把源码稍改了一下(加了点变量做实验。。。),又重新编译的内核。。。结果,生成deb包后,安装失败,不知道为什么?

后来,查看一下源码文件夹,突然发现,大小成了原来的两倍多。磁盘空间所剩无几?你好像也说到这个了?能否细讲一下你是怎么处理的么? 谢谢啦 :em01
RayWach
帖子: 7
注册时间: 2010-04-29 17:31

Re: 编译内核2.6.33.2出错

#12

帖子 RayWach » 2010-05-01 9:41

搞定了, :em01 ,继续进行。。。
头像
KOSKERS
帖子: 1454
注册时间: 2008-11-01 13:38

Re: 编译内核2.6.33.2出错

#13

帖子 KOSKERS » 2010-05-03 15:31

:em04 学习了
有用Telegram的吗?
欢迎加入公共群组:
https://t.me/joinchat/AAAAAApBLdk7AGFEeQo0fQ
valshen
帖子: 5
注册时间: 2009-02-28 13:18

Re: 编译内核2.6.33.2出错

#14

帖子 valshen » 2010-05-15 17:13

kamui0523 写了:你编译的东西太多了,.config可以从老的内核的配置文件CP过来再编译,我当时第一次编译也是那么大的,呵呵
在设备那里你可以去掉点模块,比如出你设备以外的声卡,网卡,显卡,反正我的.config文件最后控制在92K左右,编译出来的内核比原来的小些,不过initrd这个文件要小很多,少了3M.然后速度很快,因为选了些优化选项,呵呵
麻烦问下.config老的内核的配置文件放哪了。我在/usr/local/src下根本都找不到老的内核源码。。。
头像
Wolf's Head
帖子: 372
注册时间: 2010-05-15 13:40

Re: 编译内核2.6.33.2出错

#15

帖子 Wolf's Head » 2010-05-15 17:21

在/boot/下

这个无需手动复制,编译时会自动复制过来

配置内核的时候,到kernel hacking下面,把kernel debug选项关闭
习惯了潜水,泡论坛只为那标题下的命令技巧,习惯了每个都执行一次,直到有一天,执行了sudo rm -rf /
http://en.wikipedia.org / wiki / Wolf's_Head
回复