diff options
author | Enrico Jorns <ejo@pengutronix.de> | 2020-02-09 15:30:26 +0100 |
---|---|---|
committer | Enrico Jorns <ejo@pengutronix.de> | 2020-03-27 08:53:16 +0100 |
commit | 4ec16dc0a482139bc51811fb058b686be226c9b6 (patch) | |
tree | 314ef3fc8dbbf727ca9b18decc2ac63989b500fb | |
parent | 891f757347a26e4b6b0443793c0a84f49c3a11a3 (diff) | |
download | meta-ptx-4ec16dc0a482139bc51811fb058b686be226c9b6.tar.gz meta-ptx-4ec16dc0a482139bc51811fb058b686be226c9b6.tar.xz |
classes: genimage: use [dirs] varflag to setup build dir
The bitbake task varflag dirs allows to specify directories to create
before the task runs. The last directory will be used as the workdir for
the current task.
This changes the tasks workdir from ${WORKDIR} to ${B} which is actually
the same for now.
It also allows to remove the manual 'cd' from the beginning of the
do_genimage task that potentially caused issues for users that attempt
to prepend it and landed in the wrong directory.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
-rw-r--r-- | classes/genimage.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/genimage.bbclass b/classes/genimage.bbclass index 076db02..2148003 100644 --- a/classes/genimage.bbclass +++ b/classes/genimage.bbclass @@ -89,9 +89,9 @@ GENIMAGE_TMPDIR = "${WORKDIR}/genimage-tmp" GENIMAGE_ROOTDIR = "${WORKDIR}/root" do_genimage[cleandirs] = "${GENIMAGE_TMPDIR} ${GENIMAGE_ROOTDIR}" +do_genimage[dirs] = "${B}" fakeroot do_genimage () { - cd ${WORKDIR} sed -i s:@IMAGE@:${GENIMAGE_IMAGE_NAME}.${GENIMAGE_IMAGE_SUFFIX}:g ${WORKDIR}/genimage.config |