Skip to contentSkip to conversation

hwclock and a fix

PATCH Superseded Andrei Gherzan 2 participants 10 messages Aug 16, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hwclock and a fix

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.

This pull req. adds a fix which i got into it while working on this - add gettext to subversion's DEPENDS.

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 (7):
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
subversion: Add gettext to DEPENDS as msgfmt is needed at compile
time
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 +
 .../subversion/subversion_1.7.2.bb                 |    4 +++-
 5 files changed, 17 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/7 utils.py: Modify and rename distro_features_backfill python function

This function was written to be used with DISTRO_FEATURES. This behavior is usefull with MACHINE_FEATURES as well.

---
 meta/lib/oe/utils.py |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/lib/oe/utils.py +6 -3
index e14743f..8d3efe4 100644
@@ -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:
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/7 bitbake.conf: Use the new form of features_backfill function

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.

---
 meta/conf/bitbake.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index 8074684..296ebc1 100644
@@ -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)} \
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/7 bitbake.conf: Add MACHINE_FEATURES_BACKFILL and append to MACHINE_FEATURES

In reply to Andrei Gherzan

This is works the way DISTRO_FEATURES_BACKFILL does.

---
 meta/conf/bitbake.conf |    3 +++
 1 file changed, 3 insertions(+)
meta/conf/bitbake.conf +3 -0
index 296ebc1..4773d50 100644
@@ -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)} \
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/7 bitbake.conf: Add rtc to MACHINE_FEATURES_BACKFILL

In reply to Andrei Gherzan

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.

---
 meta/conf/bitbake.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index 4773d50..bc2d47d 100644
@@ -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 = "\
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 5/7 subversion: Add gettext to DEPENDS as msgfmt is needed at compile time

In reply to Andrei Gherzan

Avoid error:
| /bin/bash: <path>/tmp/sysroots/i686-linux/usr/bin/msgfmt: No such file or directory

| make: *** [subversion/po/de.mo] Error 127
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
---
 .../subversion/subversion_1.7.2.bb                 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/subversion/subversion_1.7.2.bb +3 -1
index 4f71de5..6b72e73 100644
@@ -5,9 +5,11 @@ RDEPENDS_${PN} = "neon"
 LICENSE = "Apache-2"
 HOMEPAGE = "http://subversion.tigris.org"
 
+DEPENDS = "gettext"
+
 BBCLASSEXTEND = "native"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://libtool2.patch \
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 5/7] subversion: Add gettext to DEPENDS as msgfmt is needed at compile time

Quoted 3 lines · Andrei Gherzan

Avoid error:
| /bin/bash: <path>/tmp/sysroots/i686-linux/usr/bin/msgfmt: No such file or directory

shouldn't this be gettext-native or inherit gettext then?

Quoted 34 lines
| make: *** [subversion/po/de.mo] Error 127
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
---
 .../subversion/subversion_1.7.2.bb                 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/subversion/subversion_1.7.2.bb +3 -1
index 4f71de5..6b72e73 100644
@@ -5,9 +5,11 @@ RDEPENDS_${PN} = "neon"
 LICENSE = "Apache-2"
 HOMEPAGE = "http://subversion.tigris.org"
 
+DEPENDS = "gettext"
+
 BBCLASSEXTEND = "native"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://libtool2.patch \
Signature · 7 lines
1.7.9.5


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw

Re: [PATCH 5/7] subversion: Add gettext to DEPENDS as msgfmt is needed at compile time

Quoted 9 lines · Martin Jansa
Quoted 2 lines · Andrei Gherzan

Avoid error:
| /bin/bash: <path>/tmp/sysroots/i686-linux/usr/bin/msgfmt: No such file

or

Quoted 1 line

directory

shouldn't this be gettext-native or inherit gettext then?

Bad patch - not a lame excuse i just realized this now. This is what

happens if i mix stuff together... sorry.

Quoted 45 lines

Review

Quoted 10 lines
| make: *** [subversion/po/de.mo] Error 127
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
---
 .../subversion/subversion_1.7.2.bb                 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

subversion_1.7.2.bb

Quoted 20 lines

index 4f71de5..6b72e73 100644

meta/recipes-devtools/subversion/subversion_1.7.2.bb +3 -2
@@ -5,9 +5,11 @@ RDEPENDS_${PN} = "neon"
 LICENSE = "Apache-2"
 HOMEPAGE = "http://subversion.tigris.org"
 
+DEPENDS = "gettext"
+
 BBCLASSEXTEND = "native"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://libtool2.patch \
--

1.7.9.5

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--
Martin 'JaMa' Jansa jabber: [email protected]

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#8 lore raw

PATCH 6/7 task-core-boot: Add busybox-hwclock if MACHINE_FEATURES contains rtc

In reply to Andrei Gherzan

For machines with no hardware clock it makes no sense to have this init stript. Moreover, we avoid a boot error in this way.

---
 meta/recipes-core/tasks/task-core-boot.bb |    1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/tasks/task-core-boot.bb +1 -0
index 6487436..2947509 100644
@@ -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 \
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH 7/7 busybox: Package hwclock.sh initscript separately

In reply to Andrei Gherzan

We package this separately to be able to pull this in only if this makes sense for the MACHINE.

---
 meta/recipes-core/busybox/busybox.inc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/busybox/busybox.inc +3 -2
index 78239a2..5a5b383 100644
@@ -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"
Signature · 1 line
1.7.9.5