开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处。

QQ群:,为避免广告骚扰,申请时请注明 “开发者” 字样

========================================================

主机系统:Ubuntu 14.04

开发板子:freescale 6ul,http://freescale.github.io/#contributing

Yocto :  www.yoctoproject.org/

IDE:eclipse

========================================================

工程获取、编译:

1. 翻墙:

教程:https://www.jsqgreen.com/shiyong/67.html,

网关:a.jpgjsq.com

2. Host工具

# sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
  build-essential chrpath socat libsdl1.-dev
# sudo apt-get install libsdl1.-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

3. repo

# mkdir ~/bin (this step may not be needed if the bin folder already exists)
# curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
# chmod a+x ~/bin/repo
# export PATH=~/bin:$PATH # git config --global user.name "Your Name"
# git config --global user.email "Your Email"
# git config --list # mkdir fsl-release-bsp
# cd fsl-release-bsp
# repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.38-6UL_ga
# repo sync

4. comlipe project

# MACHINE=imx6ulevk source fsl-setup-release.sh -b <build dir>
# bitbake fsl-image-gui

========================================================

烧写《i.MX_Linux_User's_Guide.pdf》

Image结构

. Bootloader (U-boot) ---> U-boot-[platform]-[board]_[machine_configeration].imx
. Linux kernel image (zImage) ---> 3.14.,所有平台一致
. A Device tree file --->
  配置:arch/arm/boot/dts ---> *.dts
  zImage: [kernel]-[platform]-[board][configuration].dtb
. A root file system (rootfs) ---> Busy common libs, fundermental element

Image Layout (boot from SD/MMC) (4G flash need)

0x400      0x09FFC00 bytes    RAW    u-boot
0xa00000    500Mbytes        FAT     kernel image & *.dtb
0x25800000   Remaning space     ext3/ext4  rootfs

SD卡烧写

# cat proc/partitions     // 查看
# sudo dd if=<.sdcard image> of=/dev/sdx bs=1M conv=fsync // 烧写到sdcard

========================================================

========================================================

纪录

bitbake编译命令

# bitbake -c cleansstate u-boot
# bitbake -c path u-boot // 如此才可以从本地编译,否则会从网上fetch代码
# bitbake -e u-boot | grep ^S= // 获取u-boot的代码路径,进入后可以修改
# bitbake -c compile -f u-boot >> log.txt //将输出结果显示在log.txt中
# bitbake u-boot
# bitbake -c cleansstate virtual/kernel
# bitbake -c patch virtual/kernel
# bitbake -e virtual/kernel | grep ^S=
# update KERNEL_DEFCONFIG variable in meta-fsl-ppc/conf/machine/<machine>.conf // 修改kernel defconfig
# update KERNEL_DEVICETREE variable in meta-fsl-ppc/conf/machine/<machine>.conf // 修改dts
# bitbake -c menuconfig virtual/kernel
# screen -r devshell
# bitbake # bitbake -c menuconfig virtual/kernel
# screen -r devshell
# bitbake -c compile -f virtual/kernel
# bitbake virtual/kernel # bitbake -b imx-test_3.10.17-1.0. -c compile -f
# bitbake -b imx-test_3.10.17-1.0. -c install # bitbake recipe -c listtasks // 查看task列表
make clean  // 删除大多数的编译生成文件, 但是会保留内核的配置文件.config, 还有足够的编译支持来建立扩展模块
make mrproper // 删除所有的编译生成文件, 还有内核配置文件, 再加上各种备份文件
make distclean // mrproper 删除的文件, 加上编辑备份文件和一些补丁文件。 执行make mrproper, 会先执行make clean, 执行make distclean之前, 会先执行make mrproper。

包的位置

# bitbake -e virtual/kernel | grep ^S=
S="/media/summer/fsl-release-bsp/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/linux-imx/3.14.38-r0/git"

====================================================================

理解 shared state cache

Poky通过scratch编译所有的东西,除非bitbake认为某个recipe不需要重新编译。shared state cache存放了一些中间产物,当bitbake编译内容时,先查看这个文件夹中有没有需要的中间文件。这个文件随着编译次数增多变大,我们时刻记住要定时清空它。当我们需要从scratch重新编译的时候,我们可以删除build/tmp文件夹,这样会通过sstate-cache加速编译过程,也可以把sstate-cache也删除掉,这样不会有cache文件被复用。

# ./scripts/sstate-cache-management.sh --remove-duplicated -d --cache-dir=<path to sstate-cached>  // this removes the duplicated and old data from the cache

====================================================================

Yocto Project complier:

1. ubuntu has "sudo" installed

2. needed packages:

 $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev xter
3.1 Host packages
A Yocto Project build requires that some packages be installed for the build that are documented under the Yocto Project. You can go to Yocto Project Quick Start and check for the packages that must be installed for your build machine.
Essential Yocto Project host packages are:
Freescale Yocto Project User's Guide, Rev. L3.14.38_6ul-ga, 09/2015
 Freescale Semiconductor, Inc.
Yocto Project Setup
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.-dev
i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:
$ sudo apt-get install libsdl1.-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
i.MX layers host packages for a Ubuntu 12.04 host setup only are:
$ sudo apt-get install uboot-mkimage
i.MX layers host packages for a Ubuntu 14.04 host setup only are:
$ sudo apt-get install u-boot-tools
The configuration tool uses the default version of grep that is on your build machine. If there is a different version of grep in your path, it may cause builds to fail. One workaround is to rename the special version to something not containing "grep".

3. 获取工程代码

  $ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
remote: Counting objects: 226790, done.
remote: Compressing objects: 100% (57465/57465), done.
remote: Total 226790 (delta 165212), reused 225887 (delta 164327)
Receiving objects: 100% (226790/226790), 100.98 MiB | 263 KiB/s, done.
Resolving deltas: 100% (165212/165212), done.
$ git checkout jethro   因为我们要获取板子对应的工程,所以不用以上方式,直接按照开发板的快速指南,下载repo,直接run.

4. Initialize the build enviroment

  $ source oe-init-build-env

=======================================================

summer@summer-ThinkPad-X230:~/fsl-community-bsp$ . ./setup-environment fsl_linux_project/

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support

编译问题纪录:

没有lsusb、file等命令

之前的helloworld程序在这儿不能运行

Yocto开发笔记之《快速入门,环境搭建 & 编译》(QQ交流群:519230208)的更多相关文章

  1. 运维开发笔记整理-URL配置

    运维开发笔记整理-URL配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.URL路由 对于高质量的Web应用来说,使用简洁,优雅的URL的路由是一个非常值得重视的细节.Dja ...

  2. Yocto开发笔记之《根文件系统裁剪》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  3. Yocto开发笔记之《嵌入式linux libcurl编程》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  4. Yocto开发笔记之《Makefile编写》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  5. Yocto开发笔记之《驱动调试-GPS数据采集》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  6. Yocto开发笔记之《Tip-bitbake常用命令》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  7. [Openwrt 项目开发笔记]:MySQL配置(六)

    [Openwrt项目开发笔记]系列文章传送门:http://www.cnblogs.com/double-win/p/3888399.html 正文: 在本人的项目中,运行在路由器上的服务器采用Ngi ...

  8. 《linux就该这么学》课堂笔记12 网卡配置、防火墙配置

    1.网卡配置(四种方法,选其一即可,配置后须重启网络服务使其生效) 1)修改配置文件./etc/sysconfig/network-scripts/ifcfg-网卡名称 2)nmtui [RHEL7] ...

  9. Yocto开发笔记之《网卡配置》(QQ交流群:519230208)

    QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 ============================================== # ifconfig -a # ...

随机推荐

  1. NHibernate无法将类型“System.Collections.Generic.IList<T>”隐式转换为“System.Collections.Generic.IList<IT>

    API有一个需要实现的抽象方法: public IList<IPermission> GetPermissions(); 需要注意的是IList<IPermission>这个泛 ...

  2. java 计算地球上两点间距离

    /** * 计算地球上任意两点(经纬度)距离 * * @param long1 * 第一点经度 * @param lat1 * 第一点纬度 * @param long2 * 第二点经度 * @para ...

  3. Beta--项目冲刺第七天

    胜利在望-- 队伍:F4 成员:031302301 毕容甲 031302302 蔡逸轩 031302430 肖阳 031302418 黄彦宁 会议内容: 1.站立式会议照片: 2.项目燃尽图 3.冲刺 ...

  4. HIbernate的脏数据检测和延缓加载

    脏数据监测: 在一个事务中,加载的数据,除了返回给用户之外,会复制一份在session中,在事务提交时,会用session中的备份和用户的数据进行比对,如果用户的数据状态改变, 则用户的数据即为:脏数 ...

  5. ubuntu eclipse 不能新建javaweb项目解决方案

    ubuntu下,通过sudo apt-get install eclipse 成功安装了eclipse,可它简洁的都让我不知如何新建web project.网上查了众多资料,终于找到了一系列简洁的方法 ...

  6. zabbix_server的自动发现,实现批量添加主机,并链接到模板

    一.需求 zabbix 服务器可以手动加入zabbix-agent客户端,对于少量的机器,这没有什么.但到了线上,我们有大量的服务器需要监控时,如果再一个个的手动加的话,工作量势必会增加很多.这时,z ...

  7. .net的Hello World之旅

    class Program    {        //这是主函数,是程序的入口        static void Main(string[] args)        {            ...

  8. Linux_虚拟机_安装VMware Tools

    以root用户执行,否则可能会出现权限不足,无法执行的情况 一.点击安装Vmware Tools   二.拖动安装文件到桌面并解压   三.双击并[在终端中运行]   四.根据提示回车或输入yes   ...

  9. 网络流HDU 2883

    建图           源点  ->     每个人  ->           每段时间      ->      汇点 时间要离散化一下 分成一些时间段 权           ...

  10. 去掉iPhone、iPad的默认按钮样式 去掉高光样式:

    input[type="button"], input[type="submit"], input[type="reset"] { -web ...