QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1322|回复: 12

question of compiling the kern

[复制链接]
发表于 2003-4-8 10:09:47 | 显示全部楼层 |阅读模式
after compiling and installing the kernel once, i can no longer use "make xconfig"  or "make menuconfig". even i reinstalled the red hat system, it doesn't work neither.
thanks for help!
the messages of make are like below:


[root@bean linux-2.4]# make menuconfig
make: *** No rule to make target `include/linux/autoconf.h', needed by `include/linux/version.h'.  Stop.


[root@bean linux-2.4]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.7-10/scripts'
cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk
KERNTYPE=`sed -n 's_^/\* Kernel type \(.*\) \*/_\1_p' /boot/kernel.h 2>/dev/null`; \
if [ -f configs/*-ERNTYPE.config ]; then \
        conf=`echo configs/*-ERNELTYPE.config`; \
        echo "set defaults \"\"" >> kconfig.tk; \
else \
        echo "set defaults \"arch/i386/defconfig\"" >> kconfig.tk; \
fi
echo "set ARCH \"i386\"" >> kconfig.tk
cat tail.tk >> kconfig.tk
chmod 755 kconfig.tk
make[1]: Leaving directory `/usr/src/linux-2.4.7-10/scripts'
wish -f scripts/kconfig.tk
#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?usr/lib/tcl8#?#?#?#?lib/tcl8#?#?#?#?lib/tcl8#?3/librar#?#?#?librar#?#?#?tcl8#?3/librar#?#?#?usr/lib/tcl8#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?@(#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#!#?usr/bin/wish#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?#?make: *** [xconfig] Error 1
发表于 2003-4-8 10:15:38 | 显示全部楼层
autoconf.h is generated by make menuconfig. so this problem is strange.

"make mrproper" and then "make menuconfig" should work. try "make config" to see if works
回复

使用道具 举报

 楼主| 发表于 2003-4-8 11:51:12 | 显示全部楼层
yeah, it is strange. i just reinstalled my system. make menuconfig worked, but not make xconfig. then i ran make mrproper. and after that, make menuconfig didn't work any more!
what's the problem? thanks!
回复

使用道具 举报

 楼主| 发表于 2003-4-8 18:48:58 | 显示全部楼层
once run make mrproper, i can no longer ran make menuconfig
then i reinstalled the system and reinstalled kernel-source, the pb was sovled.
but i still don't dare to run make mrproper
回复

使用道具 举报

发表于 2003-4-8 21:46:38 | 显示全部楼层
from the make mrproper script u can see that it delete the autoconf.h. while i believe the make menuconfig should work. at least my kernel 2.4.20 is fine. what version of kernel code u use? i may have a try. i try at least 20 versions of linux kernel before from 2.2 to 2.4 to 2.5, never meet this before.
回复

使用道具 举报

发表于 2003-4-8 22:20:50 | 显示全部楼层
ln /usr/src/linux-2.x.x linux
cd /usr/src/linux
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
cd /usr/src/linux
make mrproper
........
.........

enjoy it
回复

使用道具 举报

发表于 2003-4-8 23:48:37 | 显示全部楼层
我在RH9上,2.5.66,做了
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi

这几步反倒出错了。当时没有删除asm linux scsi 这几个目录,只是改了个名,建了个连接。为什么?
回复

使用道具 举报

发表于 2003-4-9 00:21:53 | 显示全部楼层
need not do this, mrproper will do these automatically. and for vanilla kernel from kernel.org. if u compile it the first time, u only need run make menuconfig. but if u change some important options, like smp support, u need run make mrproper or make distclean.
回复

使用道具 举报

 楼主| 发表于 2003-4-9 15:05:13 | 显示全部楼层
my kernel version is 2.4.7-10
normally "make menuconfig" should work after "make mrproper".
but on my machine, it's strange. maybe it's due to a hard ware pb.
any way, i think it's not such a big pb.
回复

使用道具 举报

发表于 2003-4-9 15:24:23 | 显示全部楼层
cheunqming  : -)

Makefile(2.4.20)


mrproper: clean archmrproper
        find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
        rm -f $(MRPROPER_FILES)
        rm -rf $(MRPROPER_DIRS)
        $(MAKE) -C Documentation/DocBook mrproper

distclean: mrproper
        rm -f core `find . \( -not -type d \) -and \
                \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags


just "rm",try link /usr/include/asm scsi linux
回复

使用道具 举报

发表于 2003-4-9 21:31:58 | 显示全部楼层
, i am wrong, some of that work is not done by make mrproper automatically, but why u need link that?
回复

使用道具 举报

发表于 2003-4-9 23:17:10 | 显示全部楼层
fresh *.h(*.head)

haha
回复

使用道具 举报

发表于 2003-4-9 23:20:23 | 显示全部楼层
what u mean? u always give so concise post and never have explanation.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-19 18:46 , Processed in 0.058522 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表