可参照: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. xcode中的一些快捷键

    隐藏xcode command+h退出xcode command+q关闭窗口 command+w关闭所有窗口 command+option+w关闭当前项目 command+control+w关闭当前文 ...

  2. c#---部分;把数组或者结构体存入集合里,然后再从集合中取出之后,输出;foreach既可以用到提取数组重点额数据,也可以提取集合中的数据(前提是集合中的元素是相同数据类型)

    1.输入班级人数,统计每个人的姓名,性别,年龄:集合与数组 //Console.Write("请输入班级人数:"); //int a = int.Parse(Console.Rea ...

  3. 关于duplicate symbol _main in的解决办法

    报错:duplicate symbol _main in: duplicate symbol _main in:    /Users/gavin/Library/Developer/Xcode/Der ...

  4. 【原创】Algorithms:原地归并排序

    第一次归并: a[0] a[1] a[2] a[3] a[4] a[5] a[6] 23 8 19 33 15 6 27 ↑             ↑ i     j 最开始i指向a[0],j指向a ...

  5. springMvc源码学习之:spirngMvc的参数注入的问题

    转载:https://my.oschina.net/lichhao/blog/172562 概述 在SpringMVC中,可以使用@RequestBody和@ResponseBody两个注解,分别完成 ...

  6. Awesome Deep Vision

    Awesome Deep Vision  A curated list of deep learning resources for computer vision, inspired by awes ...

  7. Java 标准日志工具 Log4j 的使用(附源代码)

    源代码下载 Log4j 是事实上的 Java 标准日志工具.会不会用 Log4j 在一定程度上可以说是衡量一个开发人员是否是一位合格的 Java 程序员的标准.如果你是一名 Java 程序员,如果你还 ...

  8. malloc(): memory corruption: 0x0000000001cc7120 ***

    今天在调试一个程序时发生如题所示的错误,在malloc时报错. 经查是由于前面有内存越界,导致内存结构遭到破坏,才发生这样的错误.

  9. Maximum number of WAL files in the pg_xlog directory (1)

      Guillaume Lelarge: Hi, As part of our monitoring work for our customers, we stumbled upon an issue ...

  10. mvn使用问题

    http://mirrors.ibiblio.org/maven2/org/apache/maven/archetypes/ http://blog.csdn.net/u011340807/artic ...