可参照: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. db2 存储过程 语法 及结果集查询

    第一次用存储过程,关于处理待办的,不知道怎么执行和传参数 给存储过程 ,其实就一句话很简单. @call PRC_MISSIONLIST_QUERY('27020214', '27040000', ' ...

  2. 350. Intersection of Two Arrays II

    Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1] ...

  3. android中的空格及汉字的宽度

    在Android布局中进行使用到空格,以便实现文字的对齐.那么在Android中如何表示一个空格呢? 空格:  窄空格:  一个汉字宽度的空格:   [用两个空格(  )占一个汉字的宽度时,两个空格比 ...

  4. System program problem detected 解决

    每次开机都出现:System program problem detected 管理员权限打开:/etc/default/apport   su root   vim /etc/default/app ...

  5. Vue.js相关知识2-组件

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  6. 配置DNS

    1.将DNS解析服务器添加到:/etc/resolv.conf 2.打开DNS相关配置:sed -i 's/^hosts:[ \t]*files[ \t]*$/& dns/' /etc/nss ...

  7. 【NOIP2013】【P1441】花匠

    又一次看错题…… 原题: 花匠栋栋种了一排花,每株花都有自己的高度.花儿越长越大,也越来越挤.栋栋决定把这排中的一部分花移走,将剩下的留在原地,使得剩下的花能有空间长大,同时,栋栋希望剩下的花排列得比 ...

  8. python主文件判断

    目录结构: myfile1.py.myfile2.py.myfile3.py代码都是打印文件名和__name__变量,如myfile1.py: print("myfile1",__ ...

  9. Valgrind简单用法

    Valgrind的主要作者Julian Seward刚获得了今年的Google-O'Reilly开源大奖之一──Best Tool Maker.让我们一起来看一下他的作品.Valgrind是运行在Li ...

  10. javascript面向对象规则汇总以及json

    javascript中一切皆对象,而且定义非常灵活, 于是出现了一些相对其他编程语言环境下匪夷所思的代码: ---------------------------------------------- ...