mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Alexander Dahl <ada@thorsis.com>
Cc: ptxdist@pengutronix.de, m.tretter@pengutronix.de,
	Michael Riesch <michael.riesch@wolfvision.net>
Subject: Re: [ptxdist] [PATCH v6 3/5] scripts: add helper to inject files into a source directory
Date: Thu, 2 May 2024 12:08:00 +0200	[thread overview]
Message-ID: <ZjNmAPeMPykelQJH@pengutronix.de> (raw)
In-Reply-To: <2397228.ElGaqSPkdT@ada-pc>

On Fri, Apr 19, 2024 at 11:48:51AM +0200, Alexander Dahl wrote:
> sorry for digging up this old discussion, but I kind of want to use this 
> approach and … see below.
> 
> Am Samstag, 29. Januar 2022, 08:03:28 CEST schrieb Michael Riesch:
> > Some packages may require certain files that are maintained
> > or generated outside of their source repository. For example,
> > binary firmware blobs could be excluded from the sources due
> > to licensing issues. Add a helper that allows to inject certain
> > files into the source directory (usually in the prepare stage).
> 
> Currently trying to build recent U-Boot for i.MX8 and i.MX9 based boards which 
> require additional firmware.  However I still want to build OOT to keep my 
> source tree clean, especially when building with an external tree (after 
> `ptxdist local-src u-boot $HOME/src/u-boot`).
> 
> Now U-Boot needs those binaries in the build tree, it does not work using this 
> nice inject mechanism putting it in the source tree.
> 
> > 
> > Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
> > ---
> > 
> > Notes:
> >     v6:
> >     - replaced 'break' with 'return'
> > 
> >  rules/post/ptxd_make_world_inject.make | 19 ++++++++++++
> >  scripts/lib/ptxd_make_world_inject.sh  | 42 ++++++++++++++++++++++++++
> >  2 files changed, 61 insertions(+)
> >  create mode 100644 rules/post/ptxd_make_world_inject.make
> >  create mode 100644 scripts/lib/ptxd_make_world_inject.sh
> > 
> > diff --git a/rules/post/ptxd_make_world_inject.make
> > b/rules/post/ptxd_make_world_inject.make new file mode 100644
> > index 000000000..b7d28e92f
> > --- /dev/null
> > +++ b/rules/post/ptxd_make_world_inject.make
> > @@ -0,0 +1,19 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2021 by Michael Riesch <michael.riesch@wolfvision.net>
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +world/inject/env = \
> > +	$(call world/env, $(1)) \
> > +	pkg_inject_path="$($(1)_INJECT_PATH)" \
> > +	pkg_inject_files="$($(1)_INJECT_FILES)" \
> > +	pkg_source="$($(1)_DIR)"
> 
> Here <PKG>_DIR is assigned to pkg_source which makes the source dir the target 
> folder.
> 
> Did anyone already think of how to extend this approach to be more flexible 
> for the target folder?  Maybe even without damaging existing use cases?
> 
> Maybe adding a new optional variable <PKG>_INJECT_DEST which defaults to 
> <PKG>_DIR and can be overridden?

Makes sense to me. I would have named it <PKG>_INJECT_DIR but either is
fine with me. And if it's empty, set it to pkg_dir in
ptxd_make_world_inject()

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-05-02 10:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29  7:03 [ptxdist] [PATCH v6 0/5] Add support for Rockchip firmware blobs Michael Riesch
2022-01-29  7:03 ` [ptxdist] [PATCH v6 1/5] platforms: add section for non-free " Michael Riesch
2022-01-30 15:49   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-29  7:03 ` [ptxdist] [PATCH v6 2/5] add package for rockchip firmware binaries Michael Riesch
2022-01-29  7:03 ` [ptxdist] [PATCH v6 3/5] scripts: add helper to inject files into a source directory Michael Riesch
2022-01-30 15:49   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-04-19  9:48   ` [ptxdist] [PATCH v6 3/5] " Alexander Dahl
2024-05-02 10:08     ` Michael Olbrich [this message]
2024-04-23 13:52   ` Alexander Dahl
2024-04-23 16:27     ` Michael Riesch
2022-01-29  7:03 ` [ptxdist] [PATCH v6 4/5] barebox: add integration of firmware blobs Michael Riesch
2022-01-30 15:49   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-29  7:03 ` [ptxdist] [RFC PATCH v6 5/5] barebox.rockchip: add binary firmware blobs for quartz64 and rk3568-evb1 Michael Riesch

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=ZjNmAPeMPykelQJH@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ada@thorsis.com \
    --cc=m.tretter@pengutronix.de \
    --cc=michael.riesch@wolfvision.net \
    --cc=ptxdist@pengutronix.de \
    /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