Patchwork [PATCHv2,1/1] conf: Create distro overridable IMAGE varibales

login
register
mail settings
Submitter Khem Raj
Date May 17, 2011, 9:53 p.m.
Message ID <69cc3dbe4f5d1158edfa9347356875abcbbead4d.1305668854.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/4277/
State New, archived
Headers show

Comments

Khem Raj - May 17, 2011, 9:53 p.m.
With default-setup being pulled in via bitbake.conf and task-core-boot
being pulled into all images in distros, we need
to have some variables that distro's can override if need be
This is a backport from angstrom/OE. It will help distros which
e.g. would like to use busybox-mdev instead of udev and similarly
for login manager these variables can be defined in distro policies

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/image.bbclass                      |    9 ++++++++-
 meta/conf/distro/include/default-distrovars.inc |   13 +++++++++++++
 meta/recipes-core/tasks/task-core-boot.bb       |    4 ----
 3 files changed, 21 insertions(+), 5 deletions(-)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2469442..d360a18 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -5,7 +5,14 @@  inherit imagetest-${IMAGETEST}
 
 LICENSE = "MIT"
 PACKAGES = ""
-RDEPENDS += "${IMAGE_INSTALL}"
+
+IMAGE_BOOT ?= "${IMAGE_INITSCRIPTS} \
+               ${IMAGE_DEV_MANAGER} \
+               ${IMAGE_INIT_MANAGER} \
+               ${IMAGE_LOGIN_MANAGER}"
+
+
+RDEPENDS += "${IMAGE_INSTALL} ${IMAGE_BOOT}"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 9b1d0ee..3b78d66 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -6,6 +6,19 @@  OEINCLUDELOGS ?= "yes"
 KERNEL_CONSOLE ?= "ttyS0"
 
 PCMCIA_MANAGER ?= "pcmciautils"
+#
+# udev, devfsd, busybox-mdev (from busybox) or none
+#
+IMAGE_DEV_MANAGER ?= "udev"
+#
+# sysvinit, upstart
+#
+IMAGE_INIT_MANAGER ?= "sysvinit"
+IMAGE_INITSCRIPTS ?= "initscripts"
+#
+# tinylogin, getty
+#
+IMAGE_LOGIN_MANAGER ?= "tinylogin"
 
 IMAGE_LINGUAS ?= "en-us en-gb"
 LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
diff --git a/meta/recipes-core/tasks/task-core-boot.bb b/meta/recipes-core/tasks/task-core-boot.bb
index 5aea771..b575e4d 100644
--- a/meta/recipes-core/tasks/task-core-boot.bb
+++ b/meta/recipes-core/tasks/task-core-boot.bb
@@ -21,13 +21,9 @@  RDEPENDS_task-core-boot = "\
     base-files \
     base-passwd \
     busybox \
-    initscripts \
     ${@base_contains("MACHINE_FEATURES", "keyboard", "keymaps", "", d)} \
     modutils-initscripts \
     netbase \
-    sysvinit \
-    tinylogin \
-    udev \
     ${VIRTUAL-RUNTIME_update-alternatives} \
     ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"