Mini2440官方所提供的arm-Linux-gcc是基于32位Linux系统的,在64位Linux中运行会出错[1]。在64位机时代里,继续使用32位Linux进行开发就显得有点out了。针对上述背景,本文在64位Linux中制作arm-linux-gcc工具,主要开发环境如下:
1 Buildroot
1.1 配置
下载Buildroot源码并解压,进入其目录执行下述命令启动配置界面:
make menuconfig
配置界面如下:
第一次执行make menucofig时,可能会出错:
@ubuntu:~/Mini2440/Buildroot/buildroot-2016.02$ make menuconfig
mkdir -p /home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config -C support/kconfig -f Makefile.br mconf
/usr/bin/gcc -DCURSES_LOC="<curses.h>" -DLOCALE -I/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/.depend 2>/dev/null || :
/usr/bin/gcc -DCURSES_LOC="<curses.h>" -DLOCALE -I/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/conf.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.
***
Makefile:199: recipe for target '/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/dochecklxdialog' failed
make[2]: *** [/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/dochecklxdialog] Error 1
Makefile:753: recipe for target '/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/mconf' failed
make[1]: *** [/home/onesea/Mini2440/Buildroot/buildroot-2016.02/output/build/buildroot-config/mconf] Error 2
Makefile:36: recipe for target '_all' failed
make: *** [_all] Error 2
根据上述错误提示,当前系统缺乏ncurses库,执行下述命令进行安装即可:
sudo apt-get install libncurses-dev