summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/partition.py2
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 3fe5c4e26c..c73af9d427 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -211,7 +211,7 @@ class Partition():
211 """ 211 """
212 p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) 212 p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
213 p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR", 213 p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
214 "%s/../pseudo" % get_bitbake_var("IMAGE_ROOTFS")) 214 "%s/../pseudo" % rootfs_dir)
215 p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir) 215 p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir)
216 p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1") 216 p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1")
217 pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix 217 pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 1fa6b917e6..81583e97b9 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -122,6 +122,10 @@ class DirectPlugin(ImagerPlugin):
122 if self._update_fstab(fstab_lines, self.parts): 122 if self._update_fstab(fstab_lines, self.parts):
123 # copy rootfs dir to workdir to update fstab 123 # copy rootfs dir to workdir to update fstab
124 # as rootfs can be used by other tasks and can't be modified 124 # as rootfs can be used by other tasks and can't be modified
125 new_pseudo = os.path.realpath(os.path.join(self.workdir, "pseudo"))
126 from_dir = os.path.join(os.path.join(image_rootfs, ".."), "pseudo")
127 from_dir = os.path.realpath(from_dir)
128 copyhardlinktree(from_dir, new_pseudo)
125 new_rootfs = os.path.realpath(os.path.join(self.workdir, "rootfs_copy")) 129 new_rootfs = os.path.realpath(os.path.join(self.workdir, "rootfs_copy"))
126 copyhardlinktree(image_rootfs, new_rootfs) 130 copyhardlinktree(image_rootfs, new_rootfs)
127 fstab_path = os.path.join(new_rootfs, 'etc/fstab') 131 fstab_path = os.path.join(new_rootfs, 'etc/fstab')