Skip to content

Commit

Permalink
freertos-variscite: Fix compile failure when do_compile is rerun
Browse files Browse the repository at this point in the history
do_compile could be rerun on a previous built tree, the do_compile of
this recipe however is doing renaming and moving of files and then
assuming the pristine condition is hard because it would have run
these operations in prior run, in second run it does not find the
${S}/boards/${CM_BOARD}/demo_apps/disable_cache/ dir and find cmd fails
to execute

| find: ‘/mnt/b/yoe/master/build/tmp/work/imx8qm_var_som-yoe-linux/freertos-variscite/2.9.x-r0/git/boards/som_mx8qm/demo_apps/disable_cache/hello_world’: No such file or directory
| WARNING: /mnt/b/yoe/master/build/tmp/work/imx8qm_var_som-yoe-linux/freertos-variscite/2.9.x-r0/temp/run.do_compile.406532:151 exit 1 from 'find /mnt/b/yoe/master/build/tmp/work/imx8qm_var_
som-yoe-linux/freertos-variscite/2.9.x-r0/git/boards/som_mx8qm/demo_apps/disable_cache/ -name '*hello_world*' -exec sh -c 'mv "$1" "$(echo "$1" | sed s/hello_world/disable_cache/)"' _ {} \;'

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Jul 25, 2023
1 parent 91661b4 commit 2feb474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes-bsp/freertos-variscite/freertos-variscite.inc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ do_compile() {
# Rename hello_world strings to disable_cache
grep -rl hello_world ${S}/boards/${CM_BOARD}/demo_apps/disable_cache | xargs sed -i 's/hello_world/disable_cache/g'
# Rename hello_world files to disable_cache
find ${S}/boards/${CM_BOARD}/demo_apps/disable_cache/ -name '*hello_world*' -exec sh -c 'mv "$1" "$(echo "$1" | sed s/hello_world/disable_cache/)"' _ {} \;
if [ -e ${S}/boards/${CM_BOARD}/demo_apps/disable_cache ]; then
find ${S}/boards/${CM_BOARD}/demo_apps/disable_cache/ -name '*hello_world*' -exec sh -c 'mv "$1" "$(echo "$1" | sed s/hello_world/disable_cache/)"' _ {} \;
fi
fi

# Build all demos in CM_DEMOS
Expand Down

0 comments on commit 2feb474

Please sign in to comment.