diff options
-rw-r--r-- | meta/classes/image_types_wic.bbclass | 8 | ||||
-rw-r--r-- | scripts/lib/wic/partition.py | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass index 70ea46ef5b..82f0985eeb 100644 --- a/meta/classes/image_types_wic.bbclass +++ b/meta/classes/image_types_wic.bbclass | |||
@@ -33,8 +33,7 @@ IMAGE_CMD_wic () { | |||
33 | if [ -z "$wks" ]; then | 33 | if [ -z "$wks" ]; then |
34 | bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." | 34 | bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." |
35 | fi | 35 | fi |
36 | 36 | BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" ${WIC_CREATE_EXTRA_ARGS} | |
37 | BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" ${WIC_CREATE_EXTRA_ARGS} | ||
38 | mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" | 37 | mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" |
39 | } | 38 | } |
40 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" | 39 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" |
@@ -89,6 +88,10 @@ python do_write_wks_template () { | |||
89 | bb.utils.copyfile(wks_file, "%s/%s" % (depdir, basename + '-' + os.path.basename(wks_file))) | 88 | bb.utils.copyfile(wks_file, "%s/%s" % (depdir, basename + '-' + os.path.basename(wks_file))) |
90 | } | 89 | } |
91 | 90 | ||
91 | do_flush_pseudodb() { | ||
92 | ${FAKEROOTENV} ${FAKEROOTCMD} -S | ||
93 | } | ||
94 | |||
92 | python () { | 95 | python () { |
93 | if d.getVar('USING_WIC'): | 96 | if d.getVar('USING_WIC'): |
94 | wks_file_u = d.getVar('WKS_FULL_PATH', False) | 97 | wks_file_u = d.getVar('WKS_FULL_PATH', False) |
@@ -142,6 +145,7 @@ python do_rootfs_wicenv () { | |||
142 | depdir = d.getVar('IMGDEPLOYDIR') | 145 | depdir = d.getVar('IMGDEPLOYDIR') |
143 | bb.utils.copyfile(os.path.join(outdir, basename) + '.env', os.path.join(depdir, basename) + '.env') | 146 | bb.utils.copyfile(os.path.join(outdir, basename) + '.env', os.path.join(depdir, basename) + '.env') |
144 | } | 147 | } |
148 | addtask do_flush_pseudodb after do_image before do_image_wic | ||
145 | addtask do_rootfs_wicenv after do_image before do_image_wic | 149 | addtask do_rootfs_wicenv after do_image before do_image_wic |
146 | do_rootfs_wicenv[vardeps] += "${WICVARS}" | 150 | do_rootfs_wicenv[vardeps] += "${WICVARS}" |
147 | do_rootfs_wicenv[prefuncs] = 'set_image_size' | 151 | do_rootfs_wicenv[prefuncs] = 'set_image_size' |
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 6e87770f3a..18ecec2de9 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -201,13 +201,10 @@ class Partition(): | |||
201 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) | 201 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) |
202 | if (pseudo_dir == None): | 202 | if (pseudo_dir == None): |
203 | pseudo_dir = "%s/../pseudo" % rootfs_dir | 203 | pseudo_dir = "%s/../pseudo" % rootfs_dir |
204 | p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR", pseudo_dir) | ||
205 | p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir) | ||
206 | p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1") | ||
207 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix | 204 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix |
208 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % p_localstatedir | 205 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir |
209 | pseudo += "export PSEUDO_PASSWD=%s;" % p_passwd | 206 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir |
210 | pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp | 207 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" |
211 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") | 208 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") |
212 | 209 | ||
213 | rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, | 210 | rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, |