On Wed, 2024-06-26 at 15:34 +0200, Quentin Schulz wrote:
> Hi Richard,
> 
> On 6/26/24 3:20 PM, Richard Purdie via lists.openembedded.org wrote:
> > On Mon, 2024-06-24 at 00:32 +0300, Leon Anavi via lists.openembedded.org 
> > wrote:
> > > Replace references of WORKDIR with UNPACKDIR for U-Boot script
> > > and variable UBOOT_ENV_BINARY, for example for boot.scr.
> > > 
> > > Signed-off-by: Leon Anavi <leon.an...@konsulko.com>
> > > ---
> > >   meta/recipes-bsp/u-boot/u-boot.inc | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
> > > b/meta/recipes-bsp/u-boot/u-boot.inc
> > > index 45d700fbdd..9a91a0e3d8 100644
> > > --- a/meta/recipes-bsp/u-boot/u-boot.inc
> > > +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> > > @@ -92,7 +92,7 @@ do_compile () {
> > >   
> > >       if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]
> > >       then
> > > -        ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d 
> > > ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY}
> > > +        ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d 
> > > ${UNPACKDIR}/${UBOOT_ENV_SRC} ${UNPACKDIR}/${UBOOT_ENV_BINARY}
> > >       fi
> > >   }
> > 
> > 
> > If that command is writing a file, the written file should remain in
> > WORKDIR, not UNPACKDIR. I suspect the SRC should probably therefore be
> > changed but not the BINARY?
> 
> WORKDIR still isn't cleaned between builds of a recipe I assume? While 
> migrating to UNPACKDIR gets rid of patches that were once in SRC_URI but 
> aren't anymore (or other files for that matter), using WORKDIR as a 
> temporary directory between tasks is going to be an issue depending on 
> how the other tasks are going to behave. If the logic using the file is 
> the same as the logic for creating the file then it shouldn't be an 
> issue. But if the logic using the file is just checking whether the file 
> exists, then using WORKDIR is an issue since it won't be cleaned between 
> builds of the same recipe.

Correct.

> Maybe we should go for ${B} instead?

${B} would probably be an improvement, yes.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201167): 
https://lists.openembedded.org/g/openembedded-core/message/201167
Mute This Topic: https://lists.openembedded.org/mt/106839442/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to