All of lore.kernel.org
 help / color / mirror / Atom feed
* looking for OE recipe examples to demonstrate "externalsrc" usage
@ 2021-05-28 11:49 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2021-05-28 11:49 UTC (permalink / raw)
  To: OE Core mailing list


  the scenario: existing codebase where lots of (Makefile-based)
source components each exist in their own local directory and are,
little by little, being transmogrified into OE recipes but in a very
cumbersome way.

  almost all of those source directories are massively contaminated
with hard-coded references to internal helper ".mk" makefiles to
assist in the local building, which flies in the face of OE wanting
pristine, unadulterated source as a starting point, with all local
customization happening in the recipe file. as it is, rather than
defining recipe files that take advantage of "externalsrc", those
recipe files simply set SRC_URI to point at the source directory, then
add some internal hackery to manually copy the generated artifacts
into ${D}. it's messy, and it seems to really make a mess of
dependencies, so here's my cunning plan.

  at a minimum, maintainers will be advised that their source
directories must be cleansed of all local references, and makefiles
can accept settings only through the environment, at which point the
corresponding recipe file can then be written properly using
"externalsrc."

  i want to add some samples of this to the current layer just so
developers can see how this works (recipes and source just for
examination, not for incorporation into the build). so it occurred
that i should just find some really simple, Makefile-based recipes in
OE, bitbake the fetch/unpack/patch steps, then just copy the resulting
source from WORKDIR elsewhere, and modify the recipe file to point at
it using externalsrc.

  as an example i've already put in place, there's the dmidecode
recipe:

http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/dmidecode/dmidecode_3.3.bb?h=master

and its top-level Makefile:

https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/Makefile

again, the only purpose of this is to present some examples of some
component source directory that is "externalsrc-ready", and stealing
some OE recipes seems to be by far the easiest way to do this.
(whether or not you like the dmidecode Makefile is not the point. :-)

  a couple other examples i've stolen are squashfs-tools:

http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb

and ic2-tools:

http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/i2c-tools/i2c-tools_4.2.bb

both of which transform nicely to using externalsrc.

  to the current layer i'm working with, i'm going to add a
"recipes-externalsrc" directory, whose purpose is to simply
demonstrate the proper use of this class, so i'm open to more
suggestions of OE recipes that would make for good examples, perhaps
getting increasingly complicated along the way (all Makefile-based for
now).

  thoughts? suggestions?

rday

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-28 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 11:49 looking for OE recipe examples to demonstrate "externalsrc" usage Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.