All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/6] development vs. production builds
@ 2017-05-15 13:26 Patrick Ohly
  2017-05-15 13:26 ` [RFC][PATCH 1/6] build-mode.bbclass: distro-wide debug-build mode Patrick Ohly
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Patrick Ohly @ 2017-05-15 13:26 UTC (permalink / raw)
  To: openembedded-core

At OEDAM [1] I took the AR to flesh out some of my ideas for
introducing global and per-image settings for switching between
development and production builds. The goal is partly to establish
common configure options that then can be used by different layers,
partly to have some actual useful functionality attached to them
already in OE-core.

"development" builds are what a developer does when trying out a
distro or working on his own personal device. "production" is what
device manufacturer put onto the actual end-user hardware.

At OEDAM we already concluded that per-image settings are more
useful. However, sometimes a component also has compile-time choices
that cannot be changed later on in an image, and indeed I found one
example for that (kmod) in OE-core.

Therefore I have included "debug-build" DISTRO_FEATURES support. It's a
bit similar to manpages.bbclass, but in contrast to that (currently)
is meant to be inherited globally - that's partly due to
misunderstanding how manpages.bbclass was meant to be used. This can
be changed, for now I just want to demonstrate that such a distro
feature is not entirely useless, and what effect it could have already
in OE-core.

In refkit, we also switch globally between development and production
builds via .inc files. However, I am in the process of replacing that
with the more flexible per-image IMAGE_MODE check. So from my
perspective, the IMAGE_MODE is more important and useful than the
"debug-build" DISTRO_FEATURE.

From a design perspective, the approach taken here is to let a
developer or image define what mode it wants, and default features can
be configured accordingly. That alternative would be to continue defining
features as before and use the mode to configure QA warnings or errors.

But I find that less flexible, and I suspect it would be harder to
keep track of what is meant to be usable in which mode. Developers
also would have a harder time overriding the defaults.

[1] https://www.openembedded.org/wiki/OEDAM_2017

Patrick Ohly (6):
  build-mode.bbclass: distro-wide debug-build mode
  basefiles: warn about non-production DISTRO_FEATURES in motd
  defaultsetup.conf: enable special "debug-build" DISTRO_FEATURES support
  image-mode.bbclass: per-image production/development/debug mode
  image.bbclass: include IMAGE_MODE support
  local.conf.sample: make debug-tweaks depend on IMAGE_MODE

 meta/classes/build-mode.bbclass                   | 16 ++++-
 meta/classes/image-mode.bbclass                   | 62 ++++++++++++++++-
 meta/classes/image.bbclass                        |  3 +-
 meta/conf/distro/defaultsetup.conf                |  2 +-
 meta/conf/local.conf.sample                       |  5 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb | 11 +++-
 6 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 meta/classes/build-mode.bbclass
 create mode 100644 meta/classes/image-mode.bbclass

base-commit: 9f9ebf2e1ba6eda48fb5e3f20d4ca5bbabe3dad4
-- 
git-series 0.9.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-05-17 14:19 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 13:26 [RFC][PATCH 0/6] development vs. production builds Patrick Ohly
2017-05-15 13:26 ` [RFC][PATCH 1/6] build-mode.bbclass: distro-wide debug-build mode Patrick Ohly
2017-05-15 13:26 ` [RFC][PATCH 2/6] basefiles: warn about non-production DISTRO_FEATURES in motd Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 3/6] defaultsetup.conf: enable special "debug-build" DISTRO_FEATURES support Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 4/6] image-mode.bbclass: per-image production/development/debug mode Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 5/6] image.bbclass: include IMAGE_MODE support Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 6/6] local.conf.sample: make debug-tweaks depend on IMAGE_MODE Patrick Ohly
2017-05-15 15:50   ` Khem Raj
2017-05-15 19:18     ` Patrick Ohly
2017-05-15 19:34       ` Khem Raj
2017-05-15 19:47         ` Patrick Ohly
2017-05-15 20:25           ` Khem Raj
2017-05-16  6:26             ` Patrick Ohly
2017-05-16  7:12   ` Patrick Ohly
2017-05-16  7:29 ` [RFC][PATCH 0/6] development vs. production builds Richard Purdie
2017-05-16  8:17   ` Patrick Ohly
2017-05-17  7:58     ` [PATCH v2 0/1] " Patrick Ohly
2017-05-17  7:58       ` [PATCH v2 1/1] image-mode.bbclass: common infrastructure for choosing image defaults Patrick Ohly
2017-05-17  8:38         ` Patrick Ohly
2017-05-17  9:49         ` Alexander Kanavin
2017-05-17 10:47           ` Patrick Ohly
2017-05-17 12:56             ` Alexander Kanavin
2017-05-17 13:39               ` Patrick Ohly
2017-05-17 14:17                 ` Alexander Kanavin
2017-05-16  7:35 ` [RFC][PATCH 0/6] development vs. production builds Mike Looijmans
2017-05-16  8:21   ` Patrick Ohly
2017-05-16 11:49     ` Alexander Kanavin
2017-05-16 13:47       ` Patrick Ohly
2017-05-16 14:02         ` Alexander Kanavin
2017-05-16 14:25           ` Patrick Ohly
2017-05-16 16:27             ` Alexander Kanavin

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.