From: Jörg Sommer <[email protected]>

The build of u-boot fails, if `UBOOT_MACHINE` (instead of `UBOOT_CONFIG`) is
used. U-boot doe not like the setting of `O=$S` in the make call, which
happen when `UBOOT_MACHINE` is used. Therefore, use a dedicated build
directory to circumvent the conflict `$B == $S`.

Yocto build message:

```
| if [ -f 
/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git/.config
 -o -d 
/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git/include/config
 ]; then \
|       echo >&2 "  
/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git
 is not clean, please run 'make mrproper'"; \
|       echo >&2 "  in the 
'/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git'
 directory.";\
|       /bin/false; \
| fi;
|   
/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git
 is not clean, please run 'make mrproper'
|   in the 
'/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git'
 directory.
| make[1]: Leaving directory 
'/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git'
| make[1]: *** 
[/build/tmp/work/da850_funkwerk_rp1_eval_board-fwkos-linux-gnueabi/u-boot-variscite/1.0-r0.fwkos.6/git/Makefile:1928:
 prepare3] Error 1
| ERROR: oe_runmake failed
```

U-Boot test:

```
% 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 <[email protected]>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index fc36c21ec2..bdc4b60e43 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -9,6 +9,8 @@ inherit uboot-config uboot-extlinux-config uboot-sign deploy 
python3native kerne
 
 DEPENDS += "swig-native"
 
+B = "${WORKDIR}/build"
+
 EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc 
${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}" V=1'
 EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
 EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} 
STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201594): 
https://lists.openembedded.org/g/openembedded-core/message/201594
Mute This Topic: https://lists.openembedded.org/mt/107051173/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to