首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >INITRAMFS_IMAGE_BUNDLE上的Yocto战士和SD卡上的Linux

INITRAMFS_IMAGE_BUNDLE上的Yocto战士和SD卡上的Linux
EN

Stack Overflow用户
提问于 2019-07-29 20:05:39
回答 1查看 1.9K关注 0票数 0

我正在Ubuntu18.04上使用Yocto战士构建我的嵌入式Linux系统。我有自己的核心形象食谱和一个initramfs图像食谱。

我一直在阅读网上的文档( IMAGE )和各种帖子,以便在我的local.conf中得到以下内容:

代码语言:javascript
复制
# Use the INITRAMFS bundled in kernel
#KERNEL_IMAGETYPE = "Image-initramfs-jetson-nano.bin"
#KERNEL_IMAGE_BASE_NAME = "Image-initramfs-jetson-nano.bin"
#INITRAMFS_LINK_NAME = ""
INITRAMFS_NAME = "Initramfs"
INITRAMFS_IMAGE = "tegra-minimal-initramfs"
INITRAMFS_IMAGE_BUNDLE = "1"

实际上,这些行创建了一个内置在内核版本中的initramfs,并将其放在名为Image-Initramfs.bin.的部署目录中。它比成功引导的图像内核文件略大一些。所以Yocto最终建造了2个内核,一个带有initramfs,另一个没有。

代码语言:javascript
复制
ubuntu@ip:~/Desktop/jetson-yocto/build$ du -sh tmp/deploy/images/jetson-nano/Image-Initramfs.bin
36M tmp/deploy/images/jetson-nano/Image-Initramfs.bin
ubuntu@ip:~/Desktop/jetson-yocto/build$ du -sh tmp/deploy/images/jetson-nano/Image--4.9+git0+3c02a65d91-r0-jetson-nano-20190729195650.bin 
33M tmp/deploy/images/jetson-nano/Image--4.9+git0+3c02a65d91-r0-jetson-nano-20190729195650.bin

文档说,这是通过二级编译路径完成的:

代码语言:javascript
复制
Controls whether or not the image recipe specified by INITRAMFS_IMAGE is run through an extra pass (do_bundle_initramfs) during kernel compilation in order to build a single binary that contains both the kernel image and the initial RAM filesystem (initramfs) image. This makes use of the CONFIG_INITRAMFS_SOURCE kernel feature.

Note
Using an extra compilation pass to bundle the initramfs avoids a circular dependency between the kernel recipe and the initramfs recipe should the initramfs include kernel modules. Should that be the case, the initramfs recipe depends on the kernel for the kernel modules, and the kernel depends on the initramfs recipe since the initramfs is bundled inside the kernel image.

问题是,Yocto没有将这个initramfs内核安装到最终的SD卡映像中。只安装了非initramfs内核。我还没有找到关于如何安装initramfs版本而不是非initramfs版本的Yocto指令/设置。

我该怎么做?

EN

回答 1

Stack Overflow用户

发布于 2019-07-29 21:24:50

如果使用wic工具生成SD卡映像,则可以在local.conf中添加如下内容

代码语言:javascript
复制
`IMAGE_BOOT_FILES_append = " Image-Initramfs.bin;${KERNEL_IMAGETYPE}"`

但是,如果您使用的是自定义脚本,那么您必须提供更多的信息,并自定义SD卡生成脚本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57260710

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档