栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

嵌入式linux之yocto(二)编译树莓派镜像

嵌入式linux之yocto(二)编译树莓派镜像

编译树莓派镜像

1.前言2.步骤3.问题

1.前言

yocto版本:3.4
ubuntu版本:20.04(基于docker)
工具:vscode+remote-ssh插件
开发板:树莓派4B
官方参考文档

2.步骤
root@6dc066bac538:~# mkdir yocto && cd yocto
root@6dc066bac538:~/yocto# apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath 
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 
libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool 
root@6dc066bac538:~/yocto# git clone git://git.yoctoproject.org/poky
root@6dc066bac538:~/yocto/poky# git checkout -t origin/honister -b my-honister
root@6dc066bac538:~/yocto/poky# git pull
root@6dc066bac538:~/yocto# git clone git://git.yoctoproject.org/meta-raspberrypi
root@6dc066bac538:~/yocto# source poky/oe-init-build-env rpi-build


root@6dc066bac538:~/poky/rpi-build# vim conf/bblayers.conf
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " 
  /root/yocto/poky/meta 
  /root/yocto/poky/meta-poky 
  /root/yocto/meta-raspberrypi   //修改此处为树莓派的BSP
  "


root@6dc066bac538:~/yocto/rpi-build# ls /root/yocto/meta-raspberrypi/conf/machine/
root@6dc066bac538:~/yocto/rpi-build# vim conf/local.conf
MACHINE ??= "raspberrypi4-64" //修改机器类型



root@6dc066bac538:~/yocto/rpi-build# bitbake core-image-minimal
Build Configuration:
BB_VERSION           = "1.53.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "raspberrypi4-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.4+snapshot-5d653957d599e3e5bf5ed453d7098aed92c2de3c"
TUNE_FEATURES        = "aarch64 armv8a cortexa72"
TARGET_FPU           = ""
meta
meta-poky            = "master:5d653957d599e3e5bf5ed453d7098aed92c2de3c"
meta-raspberrypi     = "master:836755370f5a61d96d62d5ff23e7b73c81032c8e"
3.问题
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:
	
    Do not use Bitbake as root.

$ vim /root/yocto/poky/meta/classes/sanity.bbclass
# if 0 == os.getuid():
   #  raise_sanity_error("Do not use Bitbake as root.", d)
  

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Your system needs to support the en_US.UTF-8 locale.	

$ locale -a
$ apt-get update
$ apt-get install locales-all
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/701988.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号