Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1226690
  • 博文数量: 105
  • 博客积分: 127
  • 博客等级: 入伍新兵
  • 技术积分: 962
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-29 15:22
文章分类

全部博文(105)

文章存档

2021年(1)

2019年(3)

2018年(1)

2017年(11)

2016年(47)

2015年(32)

2014年(4)

2012年(6)

我的朋友

分类: 嵌入式

2016-06-04 16:07:43

1.Restarting a build environment

source setup-environment


2.gcc工具链

bitbake meta-toolchain
./tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-cortexa7hf-vfp-neon-toolchain-1.8.sh

3.QT工具链
bitbake meta-toolchain-qt5

4.编译uboot
source /opt/poky/1.8/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi 
make mx6qsabresd_defconfig
make

5.编译kernel
//make distclean
//make clean
make imx_v7_defconfig
make menuconfig
make uImage LOADADDR=0x12000000 -j8
make imx6q-sabresd.dtb
make modules
make DEPMOD=echo INSTALL_MOD_PATH=./modules_install_tmpdir modules_install


6.单独编译C文件

yangzhiwen@yzw-kingsee:~$ cd /home/work/Elmo/test/test/
yangzhiwen@yzw-kingsee:/home/work/Elmo/test/test$ ls
main.c  test
yangzhiwen@yzw-kingsee:/home/work/Elmo/test/test$ rm test 
yangzhiwen@yzw-kingsee:/home/work/Elmo/test/test$ cat main.c 
#include "stdlib.h"
#include "stdio.h"

void main(void)
{
        printf("Hello world\n");
}


$ source /opt/poky/1.8/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi 
$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi

$ $CC main.c -o test
$ file test
test: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=ad28e302b106823c7cbcd038f9cb4940c14b5f57, not stripped

补充:
参考PDF : Stand-alone_Build-Uboot-Kernel.rar


阅读(4651) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~