问题描述
我正在制作我自己的图像配方,并且仍然想像以前一样为我的 iMX6 输出 sdcard 图像,但是我想将它从基于 ext3 文件系统移动到 ext4(或可能是 btrfs).对于我的生活,我无法弄清楚我需要覆盖什么才能实现这一目标.在我自己层的配方中将 ext4 和 sdcard 添加到 IMAGE_FSTYPES 变量只会给我一个 .ext3 和 .ext4 输出,其中 .etx3 似乎用于 .sdcard 图像.要么是那个,要么是在启动时将 ext4 挂载为 ext3...我的映像继承了 core-image 并安装了 CORE_IMAGE_BASE_INSTALL 作为我添加的基础.
I'm making my own image recipe and would still like to output the sdcard image as before for my iMX6, however I would like to move it from being based on an ext3 file system to ext4 (or potentially btrfs). For the life of me I can't work out what I need to override to achieve this. Adding ext4 as well as sdcard to the IMAGE_FSTYPES variable in my recipe in my own layer merely gives me both a .ext3 and .ext4 output, of which the .etx3 one appears to be used for the .sdcard image. Either that or it's ext4 mounting as ext3 at boot time... My image inherits core-image and installs CORE_IMAGE_BASE_INSTALL as the basis for my additions.
关于我应该如何做这件事有什么建议吗?
Any suggestions as to how I should be doing this?
推荐答案
meta-fsl-arm 有一个用于创建 sdcard 图像的自定义类,您可以在引入它的提交中阅读它:
meta-fsl-arm has a custom class for creating the sdcard images, you can read about it in the commit which introduced it:
写入 sdcard 的 rootfs 是通过 SDCARD_ROOTFS
变量确定的,该变量通常在 imx*.conf 文件中从包含的 imx-base.inc 中继承,即在 meta 的当前主分支中-fsl-arm 我看到第 35 行 &36:SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"IMAGE_FSTYPES ?= "tar.bz2 ext3 sdcard"
The rootfs written to the sdcard is determined through the SDCARD_ROOTFS
variable which is typically inherited in the imx*.conf files from the included imx-base.inc, i.e. in the current master branch of meta-fsl-arm I see line 35 & 36: SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3" IMAGE_FSTYPES ?= "tar.bz2 ext3 sdcard"
将 ext4 附加到 IMAGE_FSTYPES 并适当设置 SDCARD_ROOTFS 应该就足够了,即(未经测试):
It should be sufficient to append ext4 to IMAGE_FSTYPES and set SDCARD_ROOTFS appropriately, i.e. (untested):
IMAGE_FSTYPES_append = " ext4"
SDCARD_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4"
这篇关于如何更改 yocto 中用于 sdcard 映像的 rootfs 文件系统类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!