From e9fd1171abef26955009404e3290f6cead368799 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Tue, 14 Jun 2022 20:44:28 -0700 Subject: wic: Use ROOTFS_DIR to locate pseudo_dir Fixed when wks is: part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --fixed-size 256M part / --source rootfs --exclude-path=var/ --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --ondrive mmcblk0 --fstype=ext4 --label var --align 4096 --fixed-size 1024M --fsoptions=ro,relatime,sync $ bitbake $ wic create -e WARNING: /path/to/rootfs/var/../pseudo folder does not exist. Usernames and permissions will be invalid The --rootfs-dir can be anywhere, so the ../pseudo may not exist, use ROOTFS_DIR to fix the problem. From: Rath Anil Kumar Signed-off-by: Robert Yang --- scripts/lib/wic/plugins/source/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index 25bb41dd70..11b09c1e80 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py @@ -95,7 +95,7 @@ class RootfsPlugin(SourcePlugin): part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) part.has_fstab = os.path.exists(os.path.join(part.rootfs_dir, "etc/fstab")) - pseudo_dir = os.path.join(part.rootfs_dir, "../pseudo") + pseudo_dir = os.path.join(krootfs_dir['ROOTFS_DIR'], "../pseudo") if not os.path.lexists(pseudo_dir): pseudo_dir = os.path.join(cls.__get_rootfs_dir(None), '../pseudo') -- cgit 1.2.3-korg