当前位置: 技术问答>linux和unix
我的也是内核编译问题,不能进入内核配置界面……详细如下:
来源: 互联网 发布时间:2015-11-02
本文导语: 一 首先将linux-2.6.14.3.tar.gz解压到/usr/src目录下,并建立符号链接linux-2.6指向linux-2.6.14.3 二 在/usr/include目录下,有三个目录(不是符号链接)asm、linux、scis,我将它们改名,然后建立符号链接asm、linux、scsi asm -> /usr/s...
一
首先将linux-2.6.14.3.tar.gz解压到/usr/src目录下,并建立符号链接linux-2.6指向linux-2.6.14.3
二
在/usr/include目录下,有三个目录(不是符号链接)asm、linux、scis,我将它们改名,然后建立符号链接asm、linux、scsi
asm -> /usr/src/linux-2.6/include/asm-i386/
linux -> /usr/src/linux-2.6/include/linux/
scsi -> /usr/src/linux-2.6/include/scsi/
三
进入/usr/src/linux-2.6目录,然后打入命令:make menuconfig,输出结果如下:
[root@linux linux-2.6]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
In file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from scripts/basic/split-include.c:26:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
make[1]: *** [scripts/basic/split-include] Error 1
make: *** [scripts_basic] Error 2
不能进入内核配置界面
四
重新进入/usr/include目录下,删除asm、linux、scsi符号链接,并将原先改名的asm、linux、scsi目录重新改名为asm、linux、scsi
五
重新进入/usr/src目录,删除linux-2.6符号链接,直接进入目录linux-2.6.14.3,打入命令:
root@linux linux-2.6.14.3]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/lxdialog/checklist.o
HOSTCC scripts/lxdialog/inputbox.o
HOSTCC scripts/lxdialog/lxdialog.o
HOSTCC scripts/lxdialog/menubox.o
HOSTCC scripts/lxdialog/msgbox.o
HOSTCC scripts/lxdialog/textbox.o
HOSTCC scripts/lxdialog/util.o
HOSTCC scripts/lxdialog/yesno.o
HOSTLD scripts/lxdialog/lxdialog
scripts/kconfig/mconf arch/i386/Kconfig
#
# using defaults found in /boot/config-2.4.21-4.EL
#
/boot/config-2.4.21-4.EL:43: trying to assign nonexistent symbol MAX_USER_RT_PRIO
/boot/config-2.4.21-4.EL:44: trying to assign nonexistent symbol MAX_RT_PRIO
/boot/config-2.4.21-4.EL:51: trying to assign nonexistent symbol ACPI_ENABLE
/boot/config-2.4.21-4.EL:52: trying to assign nonexistent symbol ACPI_HT_ONLY
……
……
……
……
……下面都是类似于上面的输出……
……
最后能够进入配置界面:
Linux Kernel v2.6.14.3 Configuration
--------------------------------------------------------------------------------------------------
+-------------------------------- Linux Kernel Configuration ---------------------------------+
| Arrow keys navigate the menu. selects submenus --->. Highlighted letters are |
| hotkeys. Pressing includes, excludes, modularizes features. Press |
| to exit, for Help, for Search. Legend: [*] built-in [ ] excluded module |
| module capable |
| +-----------------------------------------------------------------------------------------+ |
| | Code maturity level options ---> | |
| | General setup ---> | |
| | Loadable module support ---> | |
| | Processor type and features ---> | |
| | Power management options (ACPI, APM) ---> | |
| | Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> | |
| | Executable file formats ---> | |
| | Networking ---> | |
| | Device Drivers ---> | |
| | File systems ---> | |
| | Profiling support ---> | |
| | Kernel hacking ---> | |
| | Security options ---> | |
| | Cryptographic options ---> | |
| | Library routines ---> | |
| | --- | |
| | Load an Alternate Configuration File | |
| | Save Configuration to an Alternate File | |
| +-----------------------------------------------------------------------------------------+ |
+---------------------------------------------------------------------------------------------+
| |
+---------------------------------------------------------------------------------------------+
为什么我第一次不成功,第二次可以???而且在第二次的输出中有这样一句:
# using defaults found in /boot/config-2.4.21-4.EL
这是什么意思啊……
首先将linux-2.6.14.3.tar.gz解压到/usr/src目录下,并建立符号链接linux-2.6指向linux-2.6.14.3
二
在/usr/include目录下,有三个目录(不是符号链接)asm、linux、scis,我将它们改名,然后建立符号链接asm、linux、scsi
asm -> /usr/src/linux-2.6/include/asm-i386/
linux -> /usr/src/linux-2.6/include/linux/
scsi -> /usr/src/linux-2.6/include/scsi/
三
进入/usr/src/linux-2.6目录,然后打入命令:make menuconfig,输出结果如下:
[root@linux linux-2.6]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
In file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from scripts/basic/split-include.c:26:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
make[1]: *** [scripts/basic/split-include] Error 1
make: *** [scripts_basic] Error 2
不能进入内核配置界面
四
重新进入/usr/include目录下,删除asm、linux、scsi符号链接,并将原先改名的asm、linux、scsi目录重新改名为asm、linux、scsi
五
重新进入/usr/src目录,删除linux-2.6符号链接,直接进入目录linux-2.6.14.3,打入命令:
root@linux linux-2.6.14.3]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/lxdialog/checklist.o
HOSTCC scripts/lxdialog/inputbox.o
HOSTCC scripts/lxdialog/lxdialog.o
HOSTCC scripts/lxdialog/menubox.o
HOSTCC scripts/lxdialog/msgbox.o
HOSTCC scripts/lxdialog/textbox.o
HOSTCC scripts/lxdialog/util.o
HOSTCC scripts/lxdialog/yesno.o
HOSTLD scripts/lxdialog/lxdialog
scripts/kconfig/mconf arch/i386/Kconfig
#
# using defaults found in /boot/config-2.4.21-4.EL
#
/boot/config-2.4.21-4.EL:43: trying to assign nonexistent symbol MAX_USER_RT_PRIO
/boot/config-2.4.21-4.EL:44: trying to assign nonexistent symbol MAX_RT_PRIO
/boot/config-2.4.21-4.EL:51: trying to assign nonexistent symbol ACPI_ENABLE
/boot/config-2.4.21-4.EL:52: trying to assign nonexistent symbol ACPI_HT_ONLY
……
……
……
……
……下面都是类似于上面的输出……
……
最后能够进入配置界面:
Linux Kernel v2.6.14.3 Configuration
--------------------------------------------------------------------------------------------------
+-------------------------------- Linux Kernel Configuration ---------------------------------+
| Arrow keys navigate the menu. selects submenus --->. Highlighted letters are |
| hotkeys. Pressing includes, excludes, modularizes features. Press |
| to exit, for Help, for Search. Legend: [*] built-in [ ] excluded module |
| module capable |
| +-----------------------------------------------------------------------------------------+ |
| | Code maturity level options ---> | |
| | General setup ---> | |
| | Loadable module support ---> | |
| | Processor type and features ---> | |
| | Power management options (ACPI, APM) ---> | |
| | Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> | |
| | Executable file formats ---> | |
| | Networking ---> | |
| | Device Drivers ---> | |
| | File systems ---> | |
| | Profiling support ---> | |
| | Kernel hacking ---> | |
| | Security options ---> | |
| | Cryptographic options ---> | |
| | Library routines ---> | |
| | --- | |
| | Load an Alternate Configuration File | |
| | Save Configuration to an Alternate File | |
| +-----------------------------------------------------------------------------------------+ |
+---------------------------------------------------------------------------------------------+
| |
+---------------------------------------------------------------------------------------------+
为什么我第一次不成功,第二次可以???而且在第二次的输出中有这样一句:
# using defaults found in /boot/config-2.4.21-4.EL
这是什么意思啊……
|
注意你在升级内核从2.4-2.6,你会遇到很多麻烦,因为并不是编译安装成功了就万事大吉。
你需要看一个文章。
关于你问的头文件的问题,linux-kernel 和 linux-kernel-header 现在已经是分开的两个工程。已经不是简单的在/usr/include下面作到 /usr/src/kernel-version/include 的连接。二是分开的,原因很简单因为 kernel的头文件需要 /usr/include 的 glibc的头文件的支持。所以你需要下在单独的头文件放在/usr/include里面
2.6.14得编译步骤是
make menuconfig
make
make install
然后拷贝 kernel .config Sysmap 到 /boot ,然后修改 /boot/grub/menu.lst就可以了。
你需要看一个文章。
关于你问的头文件的问题,linux-kernel 和 linux-kernel-header 现在已经是分开的两个工程。已经不是简单的在/usr/include下面作到 /usr/src/kernel-version/include 的连接。二是分开的,原因很简单因为 kernel的头文件需要 /usr/include 的 glibc的头文件的支持。所以你需要下在单独的头文件放在/usr/include里面
2.6.14得编译步骤是
make menuconfig
make
make install
然后拷贝 kernel .config Sysmap 到 /boot ,然后修改 /boot/grub/menu.lst就可以了。
|
在/usr/include目录下,有三个目录(不是符号链接)asm、linux、scis,我将它们改名,然后建立符号链接asm、linux、scsi
asm -> /usr/src/linux-2.6/include/asm-i386/
linux -> /usr/src/linux-2.6/include/linux/
scsi -> /usr/src/linux-2.6/include/scsi/
再加一个
asm-generic -> /usr/src/linux-2.6/include/asm-generic/
asm -> /usr/src/linux-2.6/include/asm-i386/
linux -> /usr/src/linux-2.6/include/linux/
scsi -> /usr/src/linux-2.6/include/scsi/
再加一个
asm-generic -> /usr/src/linux-2.6/include/asm-generic/
|
楼上的,根据linux kernel Team 的建议,直接引用/src/include的内容实际上是会出错的(虽然我编译也通过了,但是总是觉得怪怪的)
所以还是直接拷贝一份到/usr/include 里面较为稳妥
所以还是直接拷贝一份到/usr/include 里面较为稳妥