Skip to content

Commit

Permalink
genimage.bbclass: Switch away from S = WORKDIR
Browse files Browse the repository at this point in the history
Aligns with the changes and recommendations in oe-core.

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
  • Loading branch information
ejoerns committed Jun 4, 2024
1 parent b5e4d7e commit 2e30d6f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions classes-recipe/genimage.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ PACKAGES = ""

PACKAGE_ARCH = "${MACHINE_ARCH}"

S = "${WORKDIR}"
S = "${WORKDIR}/sources"
UNPACKDIR = "${S}"

B = "${WORKDIR}/genimage-${PN}"

Expand Down Expand Up @@ -133,7 +134,7 @@ GENIMAGE_OPTS ??= ""
do_genimage_preprocess[cleandirs] = "${GENIMAGE_TMPDIR} ${GENIMAGE_ROOTDIR} ${B}"

do_configure () {
if ! grep -q "@IMAGE@" ${WORKDIR}/${GENIMAGE_CONFIG}; then
if ! grep -q "@IMAGE@" ${S}/${GENIMAGE_CONFIG}; then
bbnote "${GENIMAGE_CONFIG} does not contain @IMAGE@ marker"
fi
}
Expand All @@ -149,7 +150,7 @@ python do_genimage_preprocess () {

import re

infile = d.getVar('WORKDIR') + "/" + d.getVar('GENIMAGE_CONFIG')
infile = d.getVar('S') + "/" + d.getVar('GENIMAGE_CONFIG')
outfile = d.getVar('B') + "/.config"

with open(infile, "r+") as input:
Expand All @@ -170,7 +171,7 @@ fakeroot do_genimage () {
--config ${B}/.config \
--tmppath ${GENIMAGE_TMPDIR} \
--inputpath ${DEPLOY_DIR_IMAGE} \
--includepath ${WORKDIR} \
--includepath ${S} \
--outputpath ${B} \
--rootpath ${GENIMAGE_ROOTDIR} \
${GENIMAGE_OPTS}
Expand Down

0 comments on commit 2e30d6f

Please sign in to comment.