Yocto Initramfs Transaction 添加加密设置包时出错



我在 Ubuntu 18.04 LTS 上使用 Yocto Warrior 和 meta-tegra 层 ( https://github.com/madisongh/meta-tegra ( 为我的 NVIDIA Jetson Nano 构建根文件系统。

我想加密SD卡上的某个分区,所以我需要开放嵌入式层中可用的cryptsetup包。我已经将其添加到我的映像中,并且生成的根文件系统已安装它。

问题是我需要将其添加到我的 initramfs 中,以便在启动时自动解密我的加密卷。

我得到的错误显示为:

Transaction Summary
================================================================================
Install  50 Packages
Total size: 13 M
Installed size: 52 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
file /proc conflicts between attempted installs of tegra-minimal-init-1.0-r0.aarch64 and base-files-3.0.14-r89.jetson_nano
file /sys conflicts between attempted installs of tegra-minimal-init-1.0-r0.aarch64 and base-files-3.0.14-r89.jetson_nano
Error Summary
-------------

我将密码设置添加到我的 bbappend 文件中,用于 initramfs 配方,如下所示(显示的是整个 bbappend 文件(:

PACKAGE_INSTALL_append = " e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks"
PACKAGE_INSTALL_append = " i2c-tools"
PACKAGE_INSTALL_append = " openssl"
PACKAGE_INSTALL_append = " cryptsetup"

如果我注释掉密码设置行,initramfs 任务就可以完成。

以下是来自meta-tegra的initramfs的未附加原始配方文件:

DESCRIPTION = "Minimal initramfs image for Tegra platforms"
LICENSE = "MIT"
TEGRA_INITRD_INSTALL ??= ""
INITRD_FSTYPES ??= "${INITRAMFS_FSTYPES}"
PACKAGE_INSTALL = "
tegra-firmware-xusb 
tegra-minimal-init 
${TEGRA_INITRD_INSTALL} 
"
IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
COPY_LIC_MANIFEST = "0"
COPY_LIC_DIRS = "0"
COMPATIBLE_MACHINE = "(tegra)"
KERNELDEPMODDEPEND = ""
IMAGE_ROOTFS_SIZE = "8192"
#IMAGE_ROOTFS_SIZE = "16384"
inherit core-image
IMAGE_FSTYPES = "${INITRD_FSTYPES}"

如何成功地将密码设置添加到 initramfs 配方中?

我有相同的错误消息,只是它是由不同的配方触发的(不是密码设置,而是一些自定义配方(。

问题是配方(tegra-minimal-init_1.0.bb(和base-files_3.0.14.bb都尝试创建"/sys"和"/proc"目录,但具有不同的权限(一个使用0755,另一个使用0555(。

解决它的只是简单地删除tegra-minimal-init_1.0.bb中的目录创建:

[eliranl@somehost]$ git diff
diff --git a/meta-tegra/recipes-core/initrdscripts/tegra-minimal-init_1.0.bb b/meta-tegra/recipes-core/initrdscripts/tegra-minimal-init_1.0.bb
index ac16ff1..e7021bb 100644
--- a/meta-tegra/recipes-core/initrdscripts/tegra-minimal-init_1.0.bb
+++ b/meta-tegra/recipes-core/initrdscripts/tegra-minimal-init_1.0.bb
@@ -12,7 +12,7 @@ S = "${WORKDIR}"

do_install() {
install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
-    install -d ${D}/proc ${D}/sys ${D}/dev ${D}/tmp ${D}/mnt ${D}/run ${D}/usr
+    install -d ${D}/dev ${D}/tmp ${D}/mnt ${D}/run ${D}/usr
mknod -m 622 ${D}/dev/console c 5 1
install -d ${D}${sysconfdir}
if [ -e ${WORKDIR}/platform-preboot-cboot.sh ]; then

或者,您可以升级到"dunfell",因为它是通过更改tegra-minimal-init_1.0.bb来创建具有与基本文件中相同的权限的"/proc"和"/sys"来修复的,或者只是从特定提交中向后移植此部分:

-    install -d ${D}/proc ${D}/sys ${D}/dev ${D}/tmp ${D}/mnt ${D}/run ${D}/usr
+    install -m 0555 -d ${D}/proc ${D}/sys
+    install -m 0755 -d ${D}/dev ${D}/mnt ${D}/run ${D}/usr
+    install -m 1777 -d ${D}/tmp

最新更新