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