2021-05-12 14:32:11
Ubuntu 16.04 (64bit)中製作arm-linux-gcc
Mini2440官方所提供的arm-Linux-gcc是基於32位元Linux系統的,在64位元Linux中執行會出錯[1]。在64位元機時代裡,繼續使用32位元Linux進行開發就顯得有點out了。針對上述背景,本文在64位元Linux中製作arm-linux-gcc工具,主要開發環境如下:
- Ubuntu 16.04(64bit) http://www.linuxidc.com/Linux/2016-04/130466.htm
- arm-linux-gcc 4.6.3
- Buildtroot
下載 arm-linux-gcc 4.4.3
下載連結 http://www.linuxidc.com/Linux/2011-05/35906.htm
Ubuntu 16.04 U盤安裝圖文教學 http://www.linuxidc.com/Linux/2016-04/130520.htm
1 Buildroot
1.1 設定
下載Buildroot原始碼並解壓,進入其目錄執行下述命令啟動設定介面:
make menuconfig
設定介面如下:
第一次執行make menucofig時,可能會出錯:
www.linuxidc.com@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
本文永久更新連結地址:http://www.linuxidc.com/Linux/2016-12/138770.htm
相關文章