ubuntu14编译yocto笔记

运行平台:ubuntu14.04 64位系统

工具准备:

git:git version 2.25.0

ubuntu14.04下默认是1.19.1,使用下面命令更新:

$sudo add-apt-repository ppa:git-core/ppa
$sudo apt-get update
$sudo apt-get install git

然后配置好用户相关信息。

git:git version 1.9.1

新版本不能用,参数会出错

repo:

下载repo:

 curl  https://raw.githubusercontent.com/dzm2018/alientek-git-repo-downloads/master/repo  >  ./repo 

chmod修改repo属性,移动到/sbin

一、在线构建文件系统

开网址 http://git.freescale.com/git/cgit.cgi/imx/fsl-arm-yocto-bsp.git/查看 freescale 的 yocto 项目的分支。

根据我们源码内核发布的版本号是 4.1.15-2.10,所以我们选择 imx-4.1-krogoth 分支。

ubuntu14编译yocto笔记_第1张图片

$repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth

报错:

gpg: 警告:用户目录‘/home/lin/.repoconfig/gnupg’所有权不安全
gpg: failed to create temporary file `/home/lin/.repoconfig/gnupg/.#lk0x13fa330.ubunt                                                                              u.2233': 权限不够
gpg: 密钥块资源‘/home/lin/.repoconfig/gnupg/pubring.gpg’:常规错误
gpg: 于 2011年06月10日 星期五 07时52分20秒 CST 创建的签名,使用 DSA,钥匙号 920F5C65
gpg: 无法检查签名:找不到公钥
error: 不能校验该标签 'v1.7.5'

 

ubuntu14编译yocto笔记_第2张图片

原因分析

之前用了管理员权限执行了repo导致/home/lin/.repoconfig/目录正常用户无法使用。解决方法:

$sudo rm /home/lin/.repoconfig/ -rf

输入下面验证信息即可

ubuntu14编译yocto笔记_第3张图片

 $repo sync 

时间比较长,毕竟是国外的服务器,网络不是很稳定

 

DISTRO=fsl-imx-x11    MACHINE=imx6ull14x14evk  source  fsl-setup-release.sh  -b build

 

自动进入build目录

bitbake fsl-image-qt5 

 

报错:

WARNING: zlib-native-1.2.8-r0 do_fetch: Failed to fetch URL http://www.zlib.net/zlib-1.2.8.tar.xz, attempting                                                       MIRRORS if available
WARNING: libmpc-native-1.0.3-r0 do_fetch: Failed to fetch URL http://www.multiprecision.org/mpc/download/mpc-                                                      1.0.3.tar.gz, attempting MIRRORS if available
WARNING: ncurses-native-6.0+20160213-r0 do_fetch: Failed to fetch URL git://anonscm.debian.org/collab-maint/n                                                      curses.git, attempting MIRRORS if available
WARNING: gcc-source-5.3.0-5.3.0-r0 do_fetch: Failed to fetch URL http://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3                                                      .0.tar.bz2, attempting MIRRORS if available
WARNING: linux-libc-headers-4.1-r0 do_fetch: Failed to fetch URL http://kernel.org/pub/linux/kernel/v4.x/linu                                                      x-4.1.tar.xz, attempting MIRRORS if available
WARNING: gcc-source-5.3.0-5.3.0-r0 do_fetch: Checksum mismatch for local file /home/lin/fsl-release-bsp/downl                                                      oads/gcc-5.3.0.tar.bz2
Cleaning and trying again.
WARNING: gcc-source-5.3.0-5.3.0-r0 do_fetch: Renaming /home/lin/fsl-release-bsp/downloads/gcc-5.3.0.tar.bz2 t                                                      o /home/lin/fsl-release-bsp/downloads/gcc-5.3.0.tar.bz2_bad-checksum_76e8a1f678b1b3b401ad87810731c52c
ERROR: gcc-source-5.3.0-5.3.0-r0 do_fetch: Checksum failure fetching http://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc                                                      -5.3.0.tar.bz2
ERROR: gcc-source-5.3.0-5.3.0-r0 do_fetch: Function failed: Fetcher failure for URL: 'http://ftp.gnu.org/gnu/                                                      gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2'. Checksum mismatch!
File: '/home/lin/fsl-release-bsp/downloads/gcc-5.3.0.tar.bz2' has md5 checksum 76e8a1f678b1b3b401ad87810731c5                                                      2c when c9616fd448f980259c31de613e575719 was expected
File: '/home/lin/fsl-release-bsp/downloads/gcc-5.3.0.tar.bz2' has sha256 checksum bff5c4272444a4601250c328cae                                                      6a8e65a808ab5b4ccc568b6a1847ca5cb0d0e when b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db w                                                      as expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you                                                       can use these lines within the recipe:
SRC_URI[md5sum] = "76e8a1f678b1b3b401ad87810731c52c"
SRC_URI[sha256sum] = "bff5c4272444a4601250c328cae6a8e65a808ab5b4ccc568b6a1847ca5cb0d0e"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrup                                                      ted or otherwise unexpectedly modified.

ERROR: Logfile of failure stored in: /home/lin/fsl-release-bsp/build-6ul/tmp/work-shared/gcc-5.3.0-r0/temp/lo                                                      g.do_fetch.13735
ERROR: Task 4015 (/home/lin/fsl-release-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb, do_fetc                                                      h) failed with exit code '1'
ERROR: linux-libc-headers-4.1-r0 do_fetch: Fetcher failure: Fetch command failed with exit code 4, no output
ERROR: linux-libc-headers-4.1-r0 do_fetch: Function failed: Fetcher failure for URL: 'http://kernel.org/pub/l                                                      inux/kernel/v4.x/linux-4.1.tar.xz'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/lin/fsl-release-bsp/build-6ul/tmp/work/cortexa7hf-neon-poky-linux-                                                      gnueabi/linux-libc-headers/4.1-r0/temp/log.do_fetch.115504
ERROR: Task 4022 (/home/lin/fsl-release-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux-li                                                      bc-headers/linux-libc-headers_4.1.bb, do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 152 tasks of which 0 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:

ubuntu14编译yocto笔记_第4张图片

 

怀疑是空间不够大

 

 

未完待续。。。

你可能感兴趣的:(嵌入式linux学习)