Yocto开发篇 Ubuntu构建与体验Poky发行版(Yocto 3

$ ./oe-init-build-env 
You had no conf/local.conf file. This configuration file has therefore been
created for you with some default values. You may wish to edit it to, for
example, select a different MACHINE (target hardware). See conf/local.conf
for more information as common configuration options are commented.

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you with some default values. To add additional metadata layers
into your configuration please add entries to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/


### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks

(3)添加bitbake环境变量

当前位于poky目录下:

$ cd bitbake/bin
$ pwd
/home/neutionwei/poky/bitbake/bin
$ export PATH=$PATH:/home/neutionwei/poky/bitbake/bin
$ cd -

(4)编译minimal镜像

当前位于poky目录下:

$ cd build
$ bitbake core-image-minimal
Parsing recipes: 100% |######################################################################################################################################################################| Time: 0:00:21
Parsing of 768 .bb files complete (0 cached, 768 parsed). 1300 targets, 40 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "my-yocto-3.1:5d47cdf448b6cff5bb7cc5b0ba0426b8235ec478"

NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org/releases/uninative/2.8/x86_64-nativesdk-libc.tar.xz;sha256sum=a09922172c3a439105e0ae6b943daad2d83505b17da0aba97961ff433b8c21ab
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 1159 Found 0 Missed 1159 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks

(5)镜像输出目录

当前位于build目录下:

$ cd tmp/deploy/images/qemux86-64/
$ ls -al
total 28144
drwxr-xr-x 2 neutionwei neutionwei     4096 11月  1 04:20 .
drwxr-xr-x 3 neutionwei neutionwei     4096 11月  1 04:19 ..
lrwxrwxrwx 2 neutionwei neutionwei       75 11月  1 04:19 bzImage -> bzImage--5.4.27+git0+bee554e595_03142acba0-r0-qemux86-64-20201031100022.bin
-rw-r--r-- 2 neutionwei neutionwei  8626848 11月  1 04:19 bzImage--5.4.27+git0+bee554e595_03142acba0-r0-qemux86-64-20201031100022.bin
lrwxrwxrwx 2 neutionwei neutionwei       75 11月  1 04:19 bzImage-qemux86-64.bin -> bzImage--5.4.27+git0+bee554e595_03142acba0-r0-qemux86-64-20201031100022.bin
-rw-r--r-- 2 neutionwei neutionwei     1338 11月  1 04:20 core-image-minimal-qemux86-64-20201031100022.qemuboot.conf
-rw-r--r-- 2 neutionwei neutionwei 12273664 11月  1 04:20 core-image-minimal-qemux86-64-20201031100022.rootfs.ext4
-rw-r--r-- 2 neutionwei neutionwei      884 11月  1 04:20 core-image-minimal-qemux86-64-20201031100022.rootfs.manifest
-rw-r--r-- 2 neutionwei neutionwei  3279857 11月  1 04:20 core-image-minimal-qemux86-64-20201031100022.rootfs.tar.bz2
-rw-r--r-- 2 neutionwei neutionwei   181054 11月  1 04:20 core-image-minimal-qemux86-64-20201031100022.testdata.json
lrwxrwxrwx 2 neutionwei neutionwei       56 11月  1 04:20 core-image-minimal-qemux86-64.ext4 -> core-image-minimal-qemux86-64-20201031100022.rootfs.ext4
lrwxrwxrwx 2 neutionwei neutionwei       60 11月  1 04:20 core-image-minimal-qemux86-64.manifest -> core-image-minimal-qemux86-64-20201031100022.rootfs.manifest
lrwxrwxrwx 2 neutionwei neutionwei       58 11月  1 04:20 core-image-minimal-qemux86-64.qemuboot.conf -> core-image-minimal-qemux86-64-20201031100022.qemuboot.conf
lrwxrwxrwx 2 neutionwei neutionwei       59 11月  1 04:20 core-image-minimal-qemux86-64.tar.bz2 -> core-image-minimal-qemux86-64-20201031100022.rootfs.tar.bz2
lrwxrwxrwx 2 neutionwei neutionwei       58 11月  1 04:20 core-image-minimal-qemux86-64.testdata.json -> core-image-minimal-qemux86-64-20201031100022.testdata.json
-rw-r--r-- 2 neutionwei neutionwei  7233298 11月  1 04:19 modules--5.4.27+git0+bee554e595_03142acba0-r0-qemux86-64-20201031100022.tgz
lrwxrwxrwx 2 neutionwei neutionwei       75 11月  1 04:19 modules-qemux86-64.tgz -> modules--5.4.27+git0+bee554e595_03142acba0-r0-qemux86-64-20201031100022.tgz

五、使用QEMU模拟器启动镜像

(1)安装模拟器:

$ sudo apt-get install qemu

(2) 添加runqemu环境变量:

当前位于poky目录下:

$ cd scripts
$ pwd
/home/neutionwei/poky/scripts
$ export PATH=$PATH:/home/neutionwei/poky/scripts
$ cd -

(3)启动镜像

当前位于poky目录下:

最后

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Java工程师,想要提升技能,往往是自己摸索成长,自己不成体系的自学效果低效漫长且无助。

因此收集整理了一份《2024年嵌入式&物联网开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

img

img

img

img

img

img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上嵌入式&物联网开发知识点,真正体系化!

如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新!!

以上嵌入式&物联网开发知识点,真正体系化!**

如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新!!

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值