Yocto Initramfs Transaction Error adding cryptsetup package
我正在Ubuntu 18.04 LTS和meta-tegra层(https://github.com/madisongh/meta-tegra)上使用Yocto Warrior为我的NVIDIA Jetson Nano构建根文件系统。
我想对SD卡上的某个分区进行加密,因此我需要在openembedded层中可用的cryptsetup软件包。我已经将它添加到我的映像中,并且生成的根文件系统已经安装了它。
问题是我需要将其添加到initramfs中,以便在启动时自动解密我的加密卷。
我得到的错误显示为:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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 ------------- |
我将initramfs配方的cryptsetup添加到我的bbappend文件中(如下所示是整个bbappend文件):
1 2 3 4 | PACKAGE_INSTALL_append =" e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks" PACKAGE_INSTALL_append =" i2c-tools" PACKAGE_INSTALL_append =" openssl" PACKAGE_INSTALL_append =" cryptsetup" |
如果我注释掉cryptsetup行,则initramfs任务就可以正常完成。
这是meta-tegra中initramfs的未附加的原始配方文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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}" |
如何将cryptsetup成功添加到initramfs配方中?谢谢。
我有完全相同的错误消息,除了它是由其他配方触发的(不是cryptsetup,而是一些自定义配方)触发的。
问题在于,配方(tegra-minimal-init_1.0.bb)和基本文件_3.0.14.bb都试图创建'/ sys和'/ proc'目录,但是具有不同的权限(一个为0755) ,另一个为0555)。
解决问题的方法只是删除tegra-minimal-init_1.0.bb中的目录创建:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [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 |
或者,您可以通过更改tegra-minimal-init_1.0.bb以创建具有基本文件中相同权限的'/ proc'和'/ sys'来升级到'dunfell',因为该问题已在此处修复。只是从特定的提交中退回这部分:
1 2 3 4 | - 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 |