Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Alexander Shiyan <eagle.alexander923@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] boot/barebox: Fix building of internal scripts
Date: Fri, 28 Jul 2023 22:42:38 +0200	[thread overview]
Message-ID: <20230728224238.2a49c5e0@windsurf> (raw)
In-Reply-To: <20230724080409.29778-1-eagle.alexander923@gmail.com>

Hello Alexander,

On Mon, 24 Jul 2023 11:04:09 +0300
Alexander Shiyan <eagle.alexander923@gmail.com> wrote:

> Some barebox targets need to use internal scripts, for example rockchip64
> uses scripts/rkimage which requires the pkg-config package to look up the
> openssl options. Because buildroot hides the host pkg-config tool, the
> scripts cannot be built correctly.
> To solve this problem, let's use the pkg-config host environment and add
> BR2_TARGET_BAREBOX_NEEDS_OPENSSL and BR2_TARGET_BAREBOX_NEEDS_LIBUSB options
> if barebox scripts should use the openssl or libusb host libraries.

I've reworded this because it was a bit unclear. You're insisting on
pkg-config in the explanation, while really what matters is
host-openssl and host-libusb.

New commit message looks like this:

commit 624d50b20cf4bf4a67ad6274263f85927660f8c4 (HEAD -> master, official/master)
Author: Alexander Shiyan <eagle.alexander923@gmail.com>
Date:   Mon Jul 24 11:04:09 2023 +0300

    boot/barebox: add optional dependencies on host-openssl and host-libusb
    
    Some barebox targets need to build host tools (for example rockchip64
    uses scripts/rkimage) that require some host libraries, such as
    host-openssl or host-libusb. These are detected by the Barebox build
    system using pkg-config.
    
    In order to allow supporting such Barebox configurations, we add two
    new options: BR2_TARGET_BAREBOX_NEEDS_OPENSSL and
    BR2_TARGET_BAREBOX_NEEDS_LIBUSB that respectively allow to ensure that
    host-openssl and/or host-libusb are built before Barebox.
    
    Additionally, $(1)_MAKE_ENV is adjusted to ensure that when pkg-config
    is run by the Barebox build system, it finds host libraries. This is
    similar to what is done in U-Boot.
    
> +ifeq ($(BR2_TARGET_BAREBOX_NEEDS_OPENSSL),y)
> +BAREBOX_DEPENDENCIES += host-openssl
> +endif
> +
> +ifeq ($(BR2_TARGET_BAREBOX_NEEDS_LIBUSB),y)
> +BAREBOX_DEPENDENCIES += host-libusb
> +endif

You forgot host-pkgconf in both cases. Without this, you have
host-openssl and/or host-libusb installed but pkg-config is not there
to allow detecting them. I fixed that up when applying.

Thanks for your work!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2023-07-28 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  8:04 [Buildroot] [PATCH v2] boot/barebox: Fix building of internal scripts Alexander Shiyan
2023-07-28 20:42 ` Thomas Petazzoni via buildroot [this message]

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=20230728224238.2a49c5e0@windsurf \
    --to=buildroot@buildroot.org \
    --cc=eagle.alexander923@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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