* [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc
@ 2012-08-16 22:28 Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 1/6] utils.py: Modify and rename distro_features_backfill python function Andrei Gherzan
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
V2:
Remove: 3f88694 subversion: Add gettext to DEPENDS as msgfmt is needed at compile time
Sent as (it should be) a different pull request.
I dropped the idea of maching Busybox HW dependent. A bad idea indeed.
Now, hwclock init script is packaged separately and pulled into image
only if MACHINE_FEATURES contains rtc value. The inclusion of rtc is
done in a BACKFILL way.
The following changes since commit af847d36375aa53f0c1ee2a00c97ba9f38837d1b:
bitbake: bitbake: build.py: Add stampdir argument to cached_mtime_noerror (2012-08-16 12:27:41 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ag/backfill-busybox
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/backfill-busybox
Andrei Gherzan (6):
utils.py: Modify and rename distro_features_backfill python function
bitbake.conf: Use the new form of features_backfill function
bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to
MACHINE_FEATURES
bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL
task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc
busybox: Package hwclock.sh initscript separately
meta/conf/bitbake.conf | 5 ++++-
meta/lib/oe/utils.py | 9 ++++++---
meta/recipes-core/busybox/busybox.inc | 5 +++--
meta/recipes-core/tasks/task-core-boot.bb | 1 +
4 files changed, 14 insertions(+), 6 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [V2 PATCH 1/6] utils.py: Modify and rename distro_features_backfill python function
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 2/6] bitbake.conf: Use the new form of features_backfill function Andrei Gherzan
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
This function was written to be used with DISTRO_FEATURES. This behavior
is usefull with MACHINE_FEATURES as well.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/lib/oe/utils.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index e14743f..8d3efe4 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -87,15 +87,18 @@ def inherits(d, *classes):
"""Return True if the metadata inherits any of the specified classes"""
return any(bb.data.inherits_class(cls, d) for cls in classes)
-def distro_features_backfill(d):
+def features_backfill(var,d):
+ # This construct allows the addition of new features to variable specified
+ # as var
+ # Example for var = "DISTRO_FEATURES"
# This construct allows the addition of new features to DISTRO_FEATURES
# that if not present would disable existing functionality, without
# disturbing distributions that have already set DISTRO_FEATURES.
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
- backfill = (d.getVar("DISTRO_FEATURES_BACKFILL", True) or "").split()
- considered = (d.getVar("DISTRO_FEATURES_BACKFILL_CONSIDERED", True) or "").split()
+ backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
+ considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
addfeatures = []
for feature in backfill:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [V2 PATCH 2/6] bitbake.conf: Use the new form of features_backfill function
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 1/6] utils.py: Modify and rename distro_features_backfill python function Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 3/6] bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to MACHINE_FEATURES Andrei Gherzan
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
This function was modified in order to be used with other
variables then DISTRO_FEATURES. Use this new function name and
add the parameter needed.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/conf/bitbake.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 8074684..296ebc1 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -722,7 +722,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
DISTRO_FEATURES_BACKFILL = "pulseaudio"
-DISTRO_FEATURES_append = "${@oe.utils.distro_features_backfill(d)}"
+DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
COMBINED_FEATURES = "\
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [V2 PATCH 3/6] bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to MACHINE_FEATURES
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 1/6] utils.py: Modify and rename distro_features_backfill python function Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 2/6] bitbake.conf: Use the new form of features_backfill function Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 4/6] bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL Andrei Gherzan
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
This is works the way DISTRO_FEATURES_BACKFILL does.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/conf/bitbake.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 296ebc1..4773d50 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -724,6 +724,9 @@ IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
DISTRO_FEATURES_BACKFILL = "pulseaudio"
DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
+MACHINE_FEATURES_BACKFILL = ""
+MACHINE_FEATURES_append = "${@oe.utils.features_backfill("MACHINE_FEATURES",d)}"
+
COMBINED_FEATURES = "\
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [V2 PATCH 4/6] bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
` (2 preceding siblings ...)
2012-08-16 22:28 ` [V2 PATCH 3/6] bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to MACHINE_FEATURES Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc Andrei Gherzan
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
This was done this way so that the current machine configuration
would remain unaffected.
The rtc MACHINE_FEATURE will specify if a real time clock is avalaible.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/conf/bitbake.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 4773d50..bc2d47d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -724,7 +724,7 @@ IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
DISTRO_FEATURES_BACKFILL = "pulseaudio"
DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
-MACHINE_FEATURES_BACKFILL = ""
+MACHINE_FEATURES_BACKFILL = "rtc"
MACHINE_FEATURES_append = "${@oe.utils.features_backfill("MACHINE_FEATURES",d)}"
COMBINED_FEATURES = "\
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
` (3 preceding siblings ...)
2012-08-16 22:28 ` [V2 PATCH 4/6] bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-09-03 8:03 ` Paul Eggleton
2012-08-16 22:28 ` [V2 PATCH 6/6] busybox: Package hwclock.sh initscript separately Andrei Gherzan
2012-08-17 22:23 ` [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Saul Wold
6 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
For machines with no hardware clock it makes no sense to have this
init stript. Moreover, we avoid a boot error in this way.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/recipes-core/tasks/task-core-boot.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/tasks/task-core-boot.bb b/meta/recipes-core/tasks/task-core-boot.bb
index 6487436..2947509 100644
--- a/meta/recipes-core/tasks/task-core-boot.bb
+++ b/meta/recipes-core/tasks/task-core-boot.bb
@@ -34,6 +34,7 @@ RDEPENDS_task-core-boot = "\
base-files \
base-passwd \
busybox \
+ ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \
${VIRTUAL-RUNTIME_initscripts} \
${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
modutils-initscripts \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [V2 PATCH 6/6] busybox: Package hwclock.sh initscript separately
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
` (4 preceding siblings ...)
2012-08-16 22:28 ` [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc Andrei Gherzan
@ 2012-08-16 22:28 ` Andrei Gherzan
2012-08-17 22:23 ` [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Saul Wold
6 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-08-16 22:28 UTC (permalink / raw)
To: openembedded-core
We package this separately to be able to pull this in only if this makes
sense for the MACHINE.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/recipes-core/busybox/busybox.inc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 78239a2..5a5b383 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -14,15 +14,16 @@ SECTION = "base"
export EXTRA_CFLAGS = "${CFLAGS}"
export EXTRA_LDFLAGS = "${LDFLAGS}"
-PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev"
+PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*"
FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
+FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
-INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock""
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
INITSCRIPT_NAME_${PN}-syslog = "syslog"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
` (5 preceding siblings ...)
2012-08-16 22:28 ` [V2 PATCH 6/6] busybox: Package hwclock.sh initscript separately Andrei Gherzan
@ 2012-08-17 22:23 ` Saul Wold
6 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-08-17 22:23 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 08/16/2012 03:28 PM, Andrei Gherzan wrote:
> V2:
> Remove: 3f88694 subversion: Add gettext to DEPENDS as msgfmt is needed at compile time
> Sent as (it should be) a different pull request.
>
> I dropped the idea of maching Busybox HW dependent. A bad idea indeed.
> Now, hwclock init script is packaged separately and pulled into image
> only if MACHINE_FEATURES contains rtc value. The inclusion of rtc is
> done in a BACKFILL way.
>
> The following changes since commit af847d36375aa53f0c1ee2a00c97ba9f38837d1b:
>
> bitbake: bitbake: build.py: Add stampdir argument to cached_mtime_noerror (2012-08-16 12:27:41 +0100)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib ag/backfill-busybox
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/backfill-busybox
>
> Andrei Gherzan (6):
> utils.py: Modify and rename distro_features_backfill python function
> bitbake.conf: Use the new form of features_backfill function
> bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to
> MACHINE_FEATURES
> bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL
> task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc
> busybox: Package hwclock.sh initscript separately
>
> meta/conf/bitbake.conf | 5 ++++-
> meta/lib/oe/utils.py | 9 ++++++---
> meta/recipes-core/busybox/busybox.inc | 5 +++--
> meta/recipes-core/tasks/task-core-boot.bb | 1 +
> 4 files changed, 14 insertions(+), 6 deletions(-)
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc
2012-08-16 22:28 ` [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc Andrei Gherzan
@ 2012-09-03 8:03 ` Paul Eggleton
2012-09-03 11:30 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggleton @ 2012-09-03 8:03 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: openembedded-core
On Friday 17 August 2012 01:28:51 Andrei Gherzan wrote:
> For machines with no hardware clock it makes no sense to have this
> init stript. Moreover, we avoid a boot error in this way.
>
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> ---
> meta/recipes-core/tasks/task-core-boot.bb | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/tasks/task-core-boot.bb
> b/meta/recipes-core/tasks/task-core-boot.bb index 6487436..2947509 100644
> --- a/meta/recipes-core/tasks/task-core-boot.bb
> +++ b/meta/recipes-core/tasks/task-core-boot.bb
> @@ -34,6 +34,7 @@ RDEPENDS_task-core-boot = "\
> base-files \
> base-passwd \
> busybox \
> + ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)}
> \ ${VIRTUAL-RUNTIME_initscripts} \
> ${@base_contains("MACHINE_FEATURES", "keyboard",
> "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ modutils-initscripts \
Why did this get added to task-core-boot? This is meant only to contain items
that are essential for booting; I'm not sure that support for the rtc
qualifies.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc
2012-09-03 8:03 ` Paul Eggleton
@ 2012-09-03 11:30 ` Andrei Gherzan
0 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2012-09-03 11:30 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
On Mon, Sep 3, 2012 at 11:03 AM, Paul Eggleton <
paul.eggleton@linux.intel.com> wrote:
> On Friday 17 August 2012 01:28:51 Andrei Gherzan wrote:
> > For machines with no hardware clock it makes no sense to have this
> > init stript. Moreover, we avoid a boot error in this way.
> >
> > Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> > ---
> > meta/recipes-core/tasks/task-core-boot.bb | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-core/tasks/task-core-boot.bb
> > b/meta/recipes-core/tasks/task-core-boot.bb index 6487436..2947509
> 100644
> > --- a/meta/recipes-core/tasks/task-core-boot.bb
> > +++ b/meta/recipes-core/tasks/task-core-boot.bb
> > @@ -34,6 +34,7 @@ RDEPENDS_task-core-boot = "\
> > base-files \
> > base-passwd \
> > busybox \
>
busybox-hwclock contains the hwclock init script. Before this change that
script was included in busybox main package which was added to this task. I
didn't want to move this package as this change would have been a different
commit - to move stuff from stuff - and because i didn't want to break
anything around.
ag
> > + ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "",
> d)}
> > \ ${VIRTUAL-RUNTIME_initscripts} \
> > ${@base_contains("MACHINE_FEATURES", "keyboard",
> > "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ modutils-initscripts \
>
> Why did this get added to task-core-boot? This is meant only to contain
> items
> that are essential for booting; I'm not sure that support for the rtc
> qualifies.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
[-- Attachment #2: Type: text/html, Size: 2679 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-09-03 11:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16 22:28 [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 1/6] utils.py: Modify and rename distro_features_backfill python function Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 2/6] bitbake.conf: Use the new form of features_backfill function Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 3/6] bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to MACHINE_FEATURES Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 4/6] bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 5/6] task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc Andrei Gherzan
2012-09-03 8:03 ` Paul Eggleton
2012-09-03 11:30 ` Andrei Gherzan
2012-08-16 22:28 ` [V2 PATCH 6/6] busybox: Package hwclock.sh initscript separately Andrei Gherzan
2012-08-17 22:23 ` [V2 PATCH 0/6] Don't have hwclock init scripts for machines without rtc Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox