ubuntu 内核源码下载及编译
2015-04-11 13:17
531 查看
1.查看当前系统原码版本
$ apt-cache search linux-source
linux-source - Linux kernel source with Ubuntu patches
linux-source-2.6.35 - Linux kernel source for version 2.6.35 with Ubuntu patches
2.下载源码
$ sudo apt-get install linux-source-2.6.35
下载完成后,在/usr/src目录中,可以看到压缩包
$ ls
linux-headers-2.6.35-22 linux-source-2.6.35
linux-headers-2.6.35-22-generic linux-source-2.6.35.tar.bz2
3.编译
$ sudo tar -xjvf linux-source-2.6.35.tar.bz2
$ sudo make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/kconfig/kxgettext.o
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2
缺少ncurses库,安装
$ sudo apt-get install libncurses5-dev
重新编译成功。也可以使用系统原来的配置来编译,oldconfig
$ sudo make oldconfig #编译内核
来源:http://blog.chinaunix.net/uid-24219701-id-3268294.html
$ apt-cache search linux-source
linux-source - Linux kernel source with Ubuntu patches
linux-source-2.6.35 - Linux kernel source for version 2.6.35 with Ubuntu patches
2.下载源码
$ sudo apt-get install linux-source-2.6.35
下载完成后,在/usr/src目录中,可以看到压缩包
$ ls
linux-headers-2.6.35-22 linux-source-2.6.35
linux-headers-2.6.35-22-generic linux-source-2.6.35.tar.bz2
3.编译
$ sudo tar -xjvf linux-source-2.6.35.tar.bz2
$ sudo make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/kconfig/kxgettext.o
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2
缺少ncurses库,安装
$ sudo apt-get install libncurses5-dev
重新编译成功。也可以使用系统原来的配置来编译,oldconfig
$ sudo make oldconfig #编译内核
来源:http://blog.chinaunix.net/uid-24219701-id-3268294.html
相关文章推荐
- ubuntu 16.04 LTS 内核源码下载编译流程
- Ubuntu Android源码以及内核下载与编译
- ubuntu12.04内核源码下载编译
- Ubuntu下Android源码以及内核下载与编译
- ubuntu环境:下载、编译模拟器平台android内核源码
- Android内核源码 在Ubuntu上下载,编译,安装
- linux驱动学习(1)-ubuntu 内核源码下载及编译
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- ubuntu下载编译android源码(二)
- Ubuntu环境Android平台源码下载及编译
- Ubuntu上编译Android内核源码
- 在ubuntu 上下载 编译android 源码
- Ubuntu 9.10下的Android源码下载及编译
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- Ubuntu环境下 Android平台源码的下载及编译
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- Android 内核源码下载 (ubuntu)
- Ubuntu上下载及编译Android源码
- ubuntu下安装eclipse以及下载编译android源码!