From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: joerg.sommer@navimatix.de, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2] u-boot: set B = WORKDIR/build
Date: Fri, 05 Jul 2024 11:03:54 +0100 [thread overview]
Message-ID: <b62c397649ef55f847345288c10db34a372b6f8c.camel@linuxfoundation.org> (raw)
In-Reply-To: <4641ec5ba60aa447167bbee07fac87a3f6da3aea.1720172390.git.joerg.sommer@navimatix.de>
On Fri, 2024-07-05 at 11:39 +0200, Jörg Sommer via lists.openembedded.org wrote:
> From: Jörg Sommer <joerg.sommer@navimatix.de>
>
> 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 <joerg.sommer@navimatix.de>
> ---
> 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}'
>
I did a little digging as I wondered why this wasn't already the case.
That variable is set in u-boot-common.inc along with a cleandirs for B.
Are you able to use that common inc file? I didn't check the situation
on older releases.
Cheers,
Richard
next prev parent reply other threads:[~2024-07-05 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Richard Purdie [this message]
2024-07-05 10:35 ` [OE-core] " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b62c397649ef55f847345288c10db34a372b6f8c.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=joerg.sommer@navimatix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox