配置Linaro toolchain交叉编译工具
1、安装linaro toolchain
$ wget https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME
ARM 9机器的用户 需要安装 arago toolchain
$ wget http://downloads.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports/arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
$ tar -jxvf arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 -C $HOME
2、安装本地机器需要的开发工具
$sudo apt-get install git build-essential diffstat texinfo gawk chrpath
如果你的机器14.04以前的版本,是32位的,但是需要安装32位动态库,则需要预编译处理
$ sudo apt-get install ia32-libs'
如果是14.04以后的版本,需要安装一下指令
$ sudo apt-get install libstdc++6:i386 libncurses5:i386 libz1:i386 libc6:i386 libc6-dev-i386
也建议将本地的dash 切换到更为常用的bash
$ sudo dpkg-reconfigure dash
3、快速开始(如果想快速使用)
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/arago-morty-config.txt
$ cd build
$ . conf/setenv
$ export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
$ MACHINE=am335x-evm bitbake tisdk-rootfs-image
4、安装细节
1)克隆安装脚本
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
Cloning into 'tisdk'...
remote: Counting objects: 318, done.
remote: Compressing objects: 100% (309/309), done.
remote: Total 318 (delta 201), reused 0 (delta 0)
Receiving objects: 100% (318/318), 42.86 KiB, done.
Resolving deltas: 100% (201/201), done.
$ cd tisdk
5、运行安装脚本
$ ./oe-layertool-setup.sh -f configs/arago-dylan-config.txt
/OE/tisdk
cloning repo bitbake
Cloning into '/OE/tisdk/sources/bitbake'...
remote: Counting objects: 25001, done.
remote: Compressing objects: 100% (7410/7410), done.
remote: Total 25001 (delta 17201), reused 23780 (delta 16200)
Receiving objects: 100% (25001/25001), 4.51 MiB | 285 KiB/s, done.
Resolving deltas: 100% (17201/17201), done.
Already on 'master'
Already up-to-date.
Note: checking out '1.18.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at cc7fdbd... Update version to 1.18.0
cloning repo meta-arago
Cloning into '/OE/tisdk/sources/meta-arago'...
remote: Counting objects: 5132, done.
remote: Compressing objects: 100% (4376/4376), done.
remote: Total 5132 (delta 2930), reused 1248 (delta 525)
Receiving objects: 100% (5132/5132), 8.44 MiB | 7.78 MiB/s, done.
Resolving deltas: 100% (2930/2930), done.
Already on 'master'
Already up-to-date.
cloning repo meta-openembedded
Cloning into '/OE/tisdk/sources/meta-openembedded'...
remote: Counting objects: 27559, done.
remote: Compressing objects: 100% (10787/10787), done.
remote: Total 27559 (delta 15997), reused 26742 (delta 15535)
Receiving objects: 100% (27559/27559), 17.97 MiB | 867 KiB/s, done.
Resolving deltas: 100% (15997/15997), done.
Branch dylan set up to track remote branch dylan from origin.
Switched to a new branch 'dylan'
Already up-to-date.
cloning repo meta-ti
Cloning into '/OE/tisdk/sources/meta-ti'...
remote: Counting objects: 11370, done.
remote: Compressing objects: 100% (6562/6562), done.
remote: Total 11370 (delta 6153), reused 8624 (delta 4346)
Receiving objects: 100% (11370/11370), 6.63 MiB | 6.60 MiB/s, done.
Resolving deltas: 100% (6153/6153), done.
Branch dylan set up to track remote branch dylan from origin.
Switched to a new branch 'dylan'
Already up-to-date.
cloning repo meta-linaro
Cloning into '/OE/tisdk/sources/meta-linaro'...
remote: Counting objects: 2741, done.
remote: Compressing objects: 100% (1981/1981), done.
remote: Total 2741 (delta 1135), reused 1496 (delta 524)
Receiving objects: 100% (2741/2741), 973.28 KiB, done.
Resolving deltas: 100% (1135/1135), done.
Branch dylan set up to track remote branch dylan from origin.
Switched to a new branch 'dylan'
Already up-to-date.
cloning repo oe-core
Cloning into '/OE/tisdk/sources/oe-core'...
remote: Counting objects: 160738, done.
remote: Compressing objects: 100% (47233/47233), done.
remote: Total 160738 (delta 113682), reused 155341 (delta 109640)
Receiving objects: 100% (160738/160738), 75.21 MiB | 758 KiB/s, done.
Resolving deltas: 100% (113682/113682), done.
Branch dylan set up to track remote branch dylan from origin.
Switched to a new branch 'dylan'
Already up-to-date.
################################################################################
The bblayers.conf configuration file has been created for you with some
default values. Please verify the contents of your conf/bblayers.conf
file for correctness.
NOTE: Any additional entries to this file will be lost if the ./oe-layertool-setup.sh
script is run again. To add entries permanently to this file
please add them to the config file used and rerun the
./oe-layertool-setup.sh script.
################################################################################
The local.conf configuration file has been created for you with some
default values. Please verify the contents of your conf/local.conf
file for correctness.
By default the number of threads used by the build is set to the number
of CPUs found on your system.
NOTE: You will probably want to change the default MACHINE setting in the
local.conf file to the machine you are trying to build.
################################################################################
A setenv file has been created for you in the conf directory. Please verify
The contents of this file. Once you have verified the contents please source
this file to configure your environment for building:
. conf/setenv
You can then start building using the bitbake command. You will likely want
to set the MACHINE option if you have not done so in your local.conf file.
For example:
MACHINE=xxxxx bitbake
Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
meta-toolchain-sdk
adt-installer
meta-ide-support
6、生效环境配置
$ cd build
$ . conf/setenv
7、将linaro 添加到环境变量中
$ export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
ARM 9机器用户
$ export PATH=$HOME/arago-2011.09/armv5te/bin:$PATH
8、开始编译
$ MACHINE=am335x-evm bitbake core-image-minimal
Pseudo is not present but is required, building this first before the main build
Parsing recipes: 100% |#####################################################################################################| Time: 00:00:27
Parsing of 1480 .bb files complete (0 cached, 1480 parsed). 1843 targets, 148 skipped, 7 masked, 0 errors.
Build Configuration:
BB_VERSION = "1.17.0"
TARGET_ARCH = "arm"
TARGET_OS = "linux-gnueabi"
MACHINE = "am335x-evm"
DISTRO = "arago"
DISTRO_VERSION = "2013.05"
TUNE_FEATURES = "armv7a vfp neon thumb callconvention-hard cortexa8"
TARGET_FPU = "vfp-neon"
meta-arago-distro
meta-arago-extras = "master:5f0d1c03cb725f63c7090c59b26abbf84f6f6302"
toolchain-layer
meta-oe = "danny:f00028caf257e386c0f3ae46bd4b3ba53dd0729d"
meta-ti = "danny:428c9db65f69c5c885b014c49ddedf3130cf16f3"
meta-linaro = "danny:d0558fa4304592622423582f8b464e1c22cfe6f1"
meta = "danny:0785489d558c34cacf5cb349949a15e27084efbf"
NOTE: Resolving any