diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2013-10-22 09:24:05 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-23 07:14:01 +0100 |
commit | 4bf11cd7d7301da664c098c8a0ae9c0294a6f423 (patch) | |
tree | c2013ab4d4793c7537281022bde9da505732defd | |
parent | 0d9eef0eaa267500e8eedab8b72ddf24eb0516db (diff) | |
download | openembedded-core-4bf11cd7d7301da664c098c8a0ae9c0294a6f423.tar.gz openembedded-core-4bf11cd7d7301da664c098c8a0ae9c0294a6f423.tar.bz2 openembedded-core-4bf11cd7d7301da664c098c8a0ae9c0294a6f423.zip |
wic: Update and generalize pseudo setup for rootfs generation
Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the
setup to the top-level prepare_rootfs().
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/mic/kickstart/custom_commands/partition.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py index 0eb0671356..4b11195160 100644 --- a/scripts/lib/mic/kickstart/custom_commands/partition.py +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py @@ -204,25 +204,27 @@ class Wic_PartData(Mic_PartData): Currently handles ext2/3/4 and btrfs. """ + pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot + pseudo += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir + pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir + pseudo += "export PSEUDO_NOSYMLINKEXP=1;" + pseudo += "%s/usr/bin/pseudo " % native_sysroot + if self.fstype.startswith("ext"): return self.prepare_rootfs_ext(cr_workdir, oe_builddir, - rootfs_dir, native_sysroot) + rootfs_dir, native_sysroot, + pseudo) elif self.fstype.startswith("btrfs"): return self.prepare_rootfs_btrfs(cr_workdir, oe_builddir, - rootfs_dir, native_sysroot) + rootfs_dir, native_sysroot, + pseudo) def prepare_rootfs_ext(self, cr_workdir, oe_builddir, rootfs_dir, - native_sysroot): + native_sysroot, pseudo): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot - populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir - populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir - populate_script += "export PSEUDO_NOSYMLINKEXP=1;" - populate_script += "export PSEUDO_DISABLED=0;" - populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ - (native_sysroot, native_sysroot) + populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240 @@ -245,7 +247,7 @@ class Wic_PartData(Mic_PartData): rc, out = exec_native_cmd(mkfs_cmd, native_sysroot) populate_cmd = populate_script + " " + image_rootfs + " " + rootfs - rc, out = exec_native_cmd(populate_cmd, native_sysroot) + rc, out = exec_native_cmd(pseudo + populate_cmd, native_sysroot) # get the rootfs size in the right units for kickstart (Mb) du_cmd = "du -Lbms %s" % rootfs @@ -258,7 +260,7 @@ class Wic_PartData(Mic_PartData): return 0 def prepare_rootfs_btrfs(self, cr_workdir, oe_builddir, rootfs_dir, - native_sysroot): + native_sysroot, pseudo): """ Prepare content for a btrfs rootfs partition. @@ -281,7 +283,7 @@ class Wic_PartData(Mic_PartData): mkfs_cmd = "mkfs.%s -b %d -r %s %s" % \ (self.fstype, rootfs_size * 1024, image_rootfs, rootfs) - rc, out = exec_native_cmd(mkfs_cmd, native_sysroot) + rc, out = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) # get the rootfs size in the right units for kickstart (Mb) du_cmd = "du -Lbms %s" % rootfs |