可参照:http://blog.csdn.net/wince_lover/article/details/51456745

1. Refer to 《基于i.mx6处理器的Yocto项目及Linux软件开发》

  • Yocto Project Build:step3中提到的manifest目录是:.repo/manifests/default.xml
  • 这篇文章是基于L3.10.17,也提到了repo init不成功的解决方法
  • 如果只是想快速建立起yocto project,可以参照project的跟目录下的:README-IMXBSP文档的quick start部分
  • DISTRO=fsl-imx-x11是什么意思?
  • conf文件目录:sources/meta-fsl-arm/conf/machine/imx6qsabresd.conf ,这里面定义了SOC_FAMILY, KERNEL_DEVICETREE, UBOOT_CONFIG等变量。
  • distro路径:sources/meta-fsl-bsp-release/imx/meta-sdk/conf/distro/fsl-imx-x11.conf

2. Refer to《Freescale_Yocto_Project_User's Guide.pdf》Rev. 0, 12/2015,针对L3.14.52_1.1.0BSP:

  2.1.Steps:

  • Host packages install---------------------Refer to Chapter 3.1
  • Setup repo--------------------------------Refer to Chapter 3.2
  • Yacto Project setup-----------------------Refer to Chapter 4--->Repo init可能遇到问题:参照http://www.cnblogs.com/aaronLinux/p/5862235.html
  • Image Build-------------------------------Refer to Chapter 5
    • $ MACHINE=imx6qsabresd source fsl-setup-release.sh -b build_test(执行完,会自动跳入build_test目录)
    • $ bitbake core-image-minimal(因为经过上述步骤,bitbake在给出的<target>中只有core-image-minimal/meta-toolchain/meta-toolchain-sdk/adt-installer/meta-ide-support)

  2.2 Issues  

  • Issue: Restarting a build environment:如果新的终端被打开或者是machine重启,那么需要参照Chapter 5.6.5
  • Issue: 执行$build-x11 bitbake fsl-image-gui时候, 报错: OE-core's config sanity checker detected a potential misconfiguration....Failed to fetch test data from the network. Please ensure your network is configured correctly.嫌弃我的网络有问题?解决方法:1.在sources/poky/meta-yocto/conf/distro/poky.conf中清掉CONNECTIVITY_CHECK_URIS;2.更好的方案:在conf/local.conf添加:CONNECTIVITY_CHECK_URIS=""即可。
  • Issue: /home/***/workspace/fsl-3.14.52_bsp/buil_test/tmp/work/x86_64-linux/binutils-native/2.24-r0/binutils-2.24/bfd/elf32-xtensa.c:7807: error: dereferencing pointer 'a' does break strict-aliasing rules:参照http://blog.csdn.net/dbzhang800/article/details/6720141:C/C++会假定不同类型的指针不会指向同一块区域。解决:在binutils-2.24下根据编译打印,编译会打印出gcc -I -W *.o, 找到-W-flags对应特殊选项,找到对应Makefile添加:-Wno-strict-aliasing.
  • Issue: Cloning into bare repository '/home/*****/workspace/fsl-3.14.52_bsp/downloads//git2/git.freescale.com.imx.uboot-imx.git'..fatal: unable to connect to git.freescale.com:

    Function failed: Fetcher failure for URL: 'git://git.freescale.com/imx/uboot-imx.git;protocol=git;branch=imx_v2015.04_3.14.52_1.1.0_ga'. Unable to fetch URL from any source

    . 解决

    重新尝试,重新开始

  • Issue: Task: u-boot-imx-2015.04-r0 do_fetch, 一直卡在这,以为失败了,最终还是过去了。其中大概一共要有近1800个Task, 都编译完了就过了。

  2.3 Result

  • Kernel源码位置:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.14.52-r0/git,,,,这是个链接文件,实际指向:fsl-3.14.52_bsp/build_test/tmp/work-shared/imx6qsabresd/kernel-source (也就是选择编译了哪个板子才会有对应源码)
  • Uboot源码:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git
  • Image的位置:fsl-3.14.52_bsp/build_test/tmp/deploy/images
  • Log信息:kernel编译:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.14.52-r0/temp
  • Log信息:Uboot编译:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/temp

  2.4 修改源码,重新单独编译

修改源码后,执行bitbake core-image-minimal是不会重新编译的。那怎么办呢?

编译kernel

bitbake编译:

  • bitbake -c menuconfig -v linux-imx (注意此处并没有使用cp **_deconfig .config, 且能看出这里并没有使用imx_v7_deconfig)
  • bitbake -c compile -f -v linux-imx
  • Issue: ERROR: Task 5 (/home/gaorong/workspace/fsl-3.14.52_bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_3.14.52.bb, do_compile) failed with exit code '1',,,more undefined references to `snd_pcm_link_rwlock' follow,,,按照这个官网链接,还是没解决掉. workaround方案:./include/sound/pcm.h中使用到snd_pcm_link_rwlock该变量的几个函数,添加局部变量,DEFINE_RWLOCK(snd_pcm_link_rwlock);该变量是从./sound/core/pcm_native.c extern出来的,但是可能由于该文件并未built-in,从而导致无法找到原型。解决问题首先要找到config文件中是否包含了此源文件的编译。
  • 编译完的kernel位置:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.14.52-r0/build/arch/arm/boot

源码目录编译:

DIR: fsl-3.14.52_bsp/build_test/tmp/work-shared/imx6qsabresd/kernel-source

  • make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- imx_v7_defconfig------------生成.config(和cp imx_v7_defconfig .config有何差异?后重复步骤,并未发现差异)
  • make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- menuconfig-------------------生成对应config头文件
  • make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- zImage-----------------------编译kernel

1. 这里编译内核不会出现bitbake中more undefined references to `snd_pcm_link_rwlock'的问题,且该模块是编译进内核的。

2. bitbake和源码目录编译差异在哪?

3. 这里有个目录需要注意:fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.14.52-r0/build

编译uboot:

bitbake编译:

  • bitbake -c compile -f -v u-boot-imx
  • bitbake -c deploy -f -v u-boot-imx
  • 可以成功,查看image文件夹下,对应也有新的uboot文件

源码下编译:

DIR: fsl-3.14.52_bsp/build_test/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git

  • make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- mx6qsabresd_defconfig
  • make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi-

1. 编译完的u-boot.imx/u-boot.bin都会在根目录下

从上述能看出来,单独编译uboot,镜像文件会自动更新到fsl-3.14.52_bsp/build_test/tmp/deploy/images,而kernel并没有,不知为何?

 3. 烧写

1111

问题

1. bitbake使用方法:yocto官网有《Bitbake User Manual》或者bitbake --help查看用法,如-c -f -v.

2. make menuconfig时,调用config文件和.config等有什么关系?

make menuconfig/.config/Kconfig三者关系:http://blog.chinaunix.net/uid-24227137-id-3277449.html

Linux内核配置机制:http://blog.csdn.net/a746742897/article/details/52247292

可以理解为.config是make menuconfig后生成在根目录的配置项赋值(Y/N...); Kconfig则定义了这些配置项,在menuconfig界面中可以见到的一些菜单,当*选中后,对应如CONFIG_SERIAL_IMX为y, 对应目录Makefile模块也被选中编译;Makefile则是建立这些配置项的生成法则,如obj-$(CONFIG_TTY) += tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o tty_buffer.o tty_port.o tty_mutex.o tty_ldsem.o。

make menuconfig实际执行了script/kconfig/mconf和arch/arm/Kconfig, 前者是存放脚本的文件目录,后者则是顶层Kconfig, 如果顶层有.config,那么make menuconfig会从.config中读取默认参数,解析该文件并把结果放到include/linux/autoconf.h中,而该文件会被include/linux/config.h包含,因此关系配置的内核源文件只需要#include <include/config.h>即可。

如果根目录没有.config,那么make menuconfig是从哪儿读默认配置项呢?

[Freescale]Freescale L3.14.52_1.1.0 yocto build的更多相关文章

  1. 14 Zabbix4.4.0系统实现监控checkpoint设备

    点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 14 Zabbix4.4.0系统实现监控checkpoint设备 1. 前期规划信息 2. 配置 ...

  2. sublime Text2 2.0.2 build 2221 64位 破解(已测试)

    近终于找到  sublime Text2 升级到 2.0.2 build 2221 64位 的破破解 输入注册码就成了 ----- BEGIN LICENSE ----- Andrew Weber S ...

  3. ARM64平台编译stream、netperf出错解决办法 解决办法:指定编译平台为alpha [root@localhost netperf-2.6.0]# ./configure –build=alpha

    ARM64平台编译stream.netperf出错解决办法 http://ilinuxkernel.com/?p=1738 stream编译出错信息: [root@localhost stream]# ...

  4. Deepin15.8系统下安装QorIQ Linux SDK v2.0 yocto成功完美运行的随笔

    2019.2.17日:最终安装成功,完美解决! 2019.2.16日:最终安装未成功,但是过程中排除 了几个bug,前进了几步,仅供参考. 写在最前面,yocto安装是有系统要求的,Deepin 15 ...

  5. ISSCC 2017论文导读 Session 14:ENVISION: A 0.26-to-10 TOPS/W Subword-Parallel DVAFS CNN Processor in 28nm

    ENVISION: A 0.26-to-10 TOPS/W Subword-Parallel Dynamic-Voltage-Accuracy-Frequency-Scalable CNN Proce ...

  6. IDEA 升级14.1提示org/hibernate/build/gradle/publish/auth/maven/AuthenticationManager:Unsupported major.minor version 51.0

    在看到“Unsupported major.minor version 51.0”这样的错误描述时,就基本可以肯定是jdk版本不正确导致.但是提示的类非业务系统,而是来自IDEA.因此去其官网检索了下 ...

  7. 2018/04/14 理解oAuth2.0

    最近都近没有更新博客了,卡在 oAuth 上了. 之前公司做统一身份的认证,不了解 oAuth 的我在这卡了两天. 于是决定仔细研究原理,理论指导实践. -- 什么是 oAuth ? 简单来说 oAu ...

  8. 【14】vuex2.0 之 mutation 和 action

    我们的项目非常简单,当点击+1按钮的时候,count 加1,点击-1按钮的时候,count 减1. 1, mutation The only way to actually change state ...

  9. Android自定义组件系列【14】——Android5.0按钮波纹效果实现

    今天任老师发表了一篇关于Android5.0中按钮按下的波纹效果实现<Android L中水波纹点击效果的实现>,出于好奇我下载了源代码看了一下效果,正好手边有一个Nexus手机,我结合实 ...

随机推荐

  1. [转载]oracle 11g不能导出空表的多种解决方法

    原文地址:11g不能导出空表的多种解决方法">oracle 11g不能导出空表的多种解决方法作者:Anlin_Yang ORACLE 11g 用exp命令导出库文件备份时,发现只能导出 ...

  2. abap append 用法

    [转自http://blog.chinaunix.net/uid-7982817-id-91999.html]Append用法总结 2008-11-14 11:42:19 分类: Syntax APP ...

  3. tomcat实现文件打开下载功能

    omcat作为http的下载服务器,网上有很多办法 但我认为最简单的是: 1.直接把文件放在 tomcat6/webapps/ROOT 目录下, 2.然后在网址中访问: http://192.168. ...

  4. C#部分---利用arraylist集合做滚动抽奖;

    输入多个手机号码,放到集合中,进行三秒钟的滚动抽奖:随机显示号码,清空,再显示: 1.收集号码: 2.每隔三秒进行抽奖,及作弊代码,哈哈哈: 3.System.Threading.Thread.Sle ...

  5. timus 1106 Two Teams(二部图)

    Two Teams Time limit: 1.0 secondMemory limit: 64 MB The group of people consists of N members. Every ...

  6. MySQL数据库高并发优化配置

    在Apache, PHP, mysql的体系架构中,MySQL对于性能的影响最大,也是关键的核心部分.对于Discuz!论坛程序也是如此,MySQL的设置是否合理优化,直接 影响到论坛的速度和承载量! ...

  7. 使用 margin 让div块内容居中

    问:有一个div块,其width为300px,如何设置margin让div块居中显示? 答:margin设置为 margin:0 auto,即div块的上下外边距设置为 0 , 左右外边距设置为 自动 ...

  8. easyui datagrid 表格组件列属性formatter和styler使用方法

    明确单元格DOM结构 要想弄清楚formatter和styler属性是怎么工作的,首先要弄清楚datagrid组件内容单元格的DOM接口,注意,这里指的是内容单元格,不包括标题单元格,标题单元格的结构 ...

  9. asp.net之ajax

    ajax主要的作用是无刷新的情况进行提交. 常用于客户端组件信息的提交.服务器组件在asp.net中能够正常的提交,而html组件则不能正常提交,在此情况下,就可以采用jquery的方式进行数据的异步 ...

  10. c# 加密转载 备忘

    public sealed class EncryptUtils { #region Base64加密解密 /// <summary> /// Base64加密 /// </summ ...