yocto项目例子
新建一个yocto工程
- 开发环境
- 自定义构建
- 参考
开发环境
本机环境:
$ uname -a
Linux yz-MS-7E06 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
yocto的项目版本Yocto Project ® 4.0.26
安装如下依赖:
$ sudo apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
- clone工程
$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ git checkout -t origin/kirkstone -b my-kirkstone
$ source oe-init-build-env build
$ bitbake core-image-sato
$ runqemu qemux86-64
最终结果如下:
自定义构建
通常有很多已经存在的配方,如 仓库,如下图所示:
$ cd poky
$ git clone https://github.com/kraj/meta-altera.git
$ cd poky/build
$ bitbake-layers add-layer ../meta-altera
参考
官网