内核版本:linux-3.10.46.tar.gz
第一步:解压
执行命令:tar -axvf linux-3.10.46.tar.gz
第二步:配置内核
1)修改Makefile中的CROSS_COMPILE
2)执行命令:make s5pv210_defconfig,进入arch/arm/configs目录可发现该配置文件
3)执行命令:make menuconfig(报错1),进行内核配置
第三步:
执行命令:make zImage(报错2),(如果执行命令make uImage,需要配置u-boot的环境变量)
报错总结:
报错1:Unable to find the ncurses libraries
root@xingllchn-VirtualBox:/home/xingllchn/01linux/linux-2.6.35.7# 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_sym’:
scripts/kconfig/conf.c:159:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
int type;
^
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:231:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
int type;
^
scripts/kconfig/conf.c:307:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 128, stdin);
^
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 128, stdin);
^
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
解决方法:
第一:执行sudo apt-get install ncurses,但是找不到源
root@xingllchn-VirtualBox:/home/xingllchn/01linux/linux-2.6.35.7# sudo apt-get install ncurses
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
现在没有可用的软件包 ncurses,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
第二:执行sudo apt-get install libncurses*
运行如下:
报错2:make: arm-linux-gcc:命令未找到
问题描述:普通权限有arm-linux-,但是超级权限找不到,可能是超级权限和普通权限地址配置不一样。
解决:
步骤一:添加环境变量
修改/etc/profile文件(此文件属于系统级别的环境变量,设置在里面的东西对所有用户适用)
sudo gedit /etc/profile
增加路径设置,在末尾添加如下:
export PATH=$PATH:
/home/
xingllchn/MyPacket/Arm_Linux_Gcc/opt/FriendlyARM/toolschain/4.5.1/bin
步骤二:注册环境变量
source /etc/profile
此时,再次输入arm-linux-,两次按tab键,发现已经有了。