ubuntu14.04 下载安装 yocto平台

ubuntu 14.04 yocto平台安装编译

 

1.首先安装必须的软件包:


$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat

$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

$ sudo apt-get install u-boot-tools

2 下载yocto

$ mkdir ~/bin
$ curl http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo > ~/bin/repo  //修改了这条命令,实测可行(一次没有连接上的话多试几次就可以)
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga

$ repo sync

3. 1编译 以IMX6QSABRESD为例

$ cd fslrelease-bsp
$ MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-x11 -e x11 //在fsl-release-bsp 路径下设置环境
$ bitbake -c menuconfig virtual/kernel //内核配置
$ bitbake -c cleansstate linux-imx  //清理之前的编译状态
$ bitbake linux-imx //单独编译内核
$ bitbake fsl-image-gui //编译整个工程

3.2 交叉编译工具制作

 

如上在build 目录下执行命令
$ bitbake meta-toolchain
编译工具,然后在tmp/deploy/sdk/目录下看到poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh,在该目录下执行
$ sh poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh
然后出现
     [sudo] password for daiane:

    Enter target directory for SDK (default: /opt/poky/1.4.1):

    You are about to install the SDK to "/opt/poky/1.4.1". Proceed[Y/n]?y

    Extracting SDK...done

    Setting it up...done

    SDK has been successfully set up and is ready to be used.
表示成功安装了交叉编译工具。然后就可以使用环境变量
    source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

比如采用该工具编译hello.c

在使用前先配置

$  $CC -o hello hello.c   (注意CC 前面有符号$ 要带上)

 

 

 

 

 

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值