openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] u-boot: do not pass O=$B, if $B = $S
@ 2024-07-04 19:18 joerg.sommer
  2024-07-04 19:38 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: joerg.sommer @ 2024-07-04 19:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

The u-boot Makefile (even v2024.07) doesn't like it, when `O=…` is the same
directory as the source directory and complains about a dirty source
directory; see below. This happens when `UBOOT_MACHINE` is set and not
`UBOOT_CONFIG`.

```
% make O=$PWD all
make[1]: Entering directory '/home/joerg/git/u-boot'
  UPD     include/generated/timestamp_autogenerated.h
  Using /home/joerg/git/u-boot as source for U-Boot
  /home/joerg/git/u-boot is not clean, please run 'make mrproper'
  in the '/home/joerg/git/u-boot' directory.
make[1]: *** [/home/joerg/git/u-boot/Makefile:1928: prepare3] Error 1
make[1]: Leaving directory '/home/joerg/git/u-boot'
make: *** [Makefile:177: sub-make] Error 2
```

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


Would it be possible to get this patch into kirkstone and scarthgap?


diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index fc36c21ec2..8172551c0c 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -82,11 +82,15 @@ do_compile () {
         done
         unset i
     else
-        oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
+        if [ "${S}" != "${B}" ]; then
+            O="O=${B}"
+        fi
+
+        oe_runmake -C ${S} ${O:+"$O"} ${UBOOT_MAKE_TARGET}
 
         # Generate the uboot-initial-env
         if [ -n "${UBOOT_INITIAL_ENV}" ]; then
-            oe_runmake -C ${S} O=${B} u-boot-initial-env
+            oe_runmake -C ${S} ${O:+"$O"} u-boot-initial-env
         fi
     fi
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-05 10:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 19:18 [PATCH] u-boot: do not pass O=$B, if $B = $S joerg.sommer
2024-07-04 19:38 ` [OE-core] " Richard Purdie
2024-07-05  9:36   ` [PATCH] u-boot: set B = WORKDIR/build joerg.sommer
2024-07-05  9:39   ` [PATCH v2] " joerg.sommer
2024-07-05 10:03     ` [OE-core] " Richard Purdie
2024-07-05 10:35       ` Jörg Sommer
2024-07-05  9:41   ` [OE-core] [PATCH] u-boot: do not pass O=$B, if $B = $S Jörg Sommer
2024-07-05  9:50     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).