Skip to contentSkip to conversation

Various fixes for master

PATCH New Mark Hatle 1 participant 12 messages Feb 7, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Various fixes for master

Various fixes that apply to master.

The following changes since commit 688e9485980de0f29aa00e24ce53a3efd3a3a7cc:

qemu.bbclass: fix segfaults when running through pseudo

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib mhatle/wr-master

Jackie Huang (1):
populate_sdk_base.bbclass: add execution permission for
self-extracting archive

Jason Wessel (1):
eglibc-nativesdk: Fix buffer overrun with a relocated SDK

Jesse Zhang (6):
ghostscript: add pregenerated objarch for mipsel/mips64/mips64el
libart-lgpl: add art_config for mips64/mips64el
ghostscript: fix endianness detection
coreutils: remove dependency on coreutils-native
initscripts: Add status function to /etc/init.d/functions
udev: Add start/stop/status/restart support to init script

Jim Somerville (1):
rt-tests: fix cyclictest reported 1 sec latencies

Randy MacLeod (1):
openssl: Add mips64 configure support.

Xin Ouyang (1):
libcgroup: fix failure for absolute path

 meta/classes/populate_sdk_base.bbclass             |   3 +
 meta/recipes-connectivity/openssl/openssl.inc      |   3 +
 meta/recipes-core/coreutils/coreutils_6.9.bb       |   3 +-
 .../eglibc-2.17/relocatable_sdk_fix_openpath.patch |  41 ++++++++
 meta/recipes-core/eglibc/eglibc_2.17.bb            |   3 +-
 .../initscripts/initscripts-1.0/functions          |  15 +++
 meta/recipes-core/initscripts/initscripts_1.0.bb   |   2 +-
 meta/recipes-core/libcgroup/libcgroup_0.38.bb      |   5 +-
 meta/recipes-core/udev/udev/init                   | 113 ++++++++++++---------
 meta/recipes-core/udev/udev_182.bb                 |   2 +-
 .../ghostscript-9.05-NOT-check-endian.patch        |  40 ++------
 .../ghostscript/ghostscript/mips/objarch.h         |   2 +-
 .../ghostscript/ghostscript/mips64/objarch.h       |  40 ++++++++
 .../ghostscript/ghostscript/mips64el/objarch.h     |  40 ++++++++
 .../ghostscript/ghostscript/mipsel/objarch.h       |  40 ++++++++
 .../ghostscript/ghostscript_9.05.bb                |   9 +-
 .../gnome/libart-lgpl/mips64/art_config.h          |  10 ++
 .../gnome/libart-lgpl/mips64el/art_config.h        |  10 ++
 ...st-finish-removal-of-1-second-first-loops.patch |  58 +++++++++++
 meta/recipes-rt/rt-tests/rt-tests.inc              |   3 +-
 20 files changed, 352 insertions(+), 90 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
 create mode 100644 meta/recipes-gnome/gnome/libart-lgpl/mips64/art_config.h
 create mode 100644 meta/recipes-gnome/gnome/libart-lgpl/mips64el/art_config.h
 create mode 100644 meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#1 lore raw

PATCH 1/11 populate_sdk_base.bbclass: add execution permission for self-extracting archive

From: Jackie Huang <[email protected]>

[ CQID: WIND00392947 ]

It is not good user experience that the self-extracting archive (.sh file) has no execution permission by default.

---
 meta/classes/populate_sdk_base.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/populate_sdk_base.bbclass +3 -0
index c587af8..c025d40 100644
@@ -257,6 +257,9 @@ exit 0
 
 MARKER:
 EOF
+	# add execution permission
+	chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
 	# append the SDK tarball
 	cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
 
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#2 lore raw

PATCH 2/11 ghostscript: add pregenerated objarch for mipsel/mips64/mips64el

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00389504 ]

Generated by building and running base/genarch.c.

---
 .../ghostscript/ghostscript/mips/objarch.h         |  2 +-
 .../ghostscript/ghostscript/mips64/objarch.h       | 40 ++++++++++++++++++++++
 .../ghostscript/ghostscript/mips64el/objarch.h     | 40 ++++++++++++++++++++++
 .../ghostscript/ghostscript/mipsel/objarch.h       | 40 ++++++++++++++++++++++
 4 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h +1 -1
index 359097f..b8b637c 100644
@@ -17,7 +17,7 @@
 #define ARCH_LOG2_SIZEOF_INT 2
 #define ARCH_LOG2_SIZEOF_LONG 2
 #define ARCH_LOG2_SIZEOF_LONG_LONG 3
-#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_GX_COLOR_INDEX 4
 #define ARCH_SIZEOF_PTR 4
 #define ARCH_SIZEOF_FLOAT 4
 #define ARCH_SIZEOF_DOUBLE 8
meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h new file +40 -0
new file mode 100644
index 0000000..0d0a16b
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h new file +40 -0
new file mode 100644
index 0000000..a05de29
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h new file +40 -0
new file mode 100644
index 0000000..29f90dd
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 4
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#3 lore raw

PATCH 3/11 libart-lgpl: add art_config for mips64/mips64el

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00389505 ]

Generated by gen_art_config.sh

---
 meta/recipes-gnome/gnome/libart-lgpl/mips64/art_config.h   | 10 ++++++++++
 meta/recipes-gnome/gnome/libart-lgpl/mips64el/art_config.h | 10 ++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-gnome/gnome/libart-lgpl/mips64/art_config.h
 create mode 100644 meta/recipes-gnome/gnome/libart-lgpl/mips64el/art_config.h
meta/recipes-gnome/gnome/libart-lgpl/mips64/art_config.h new file +10 -0
new file mode 100644
index 0000000..d10cd95
@@ -0,0 +1,10 @@
+/* Automatically generated by gen_art_config */
+
+#define ART_SIZEOF_CHAR 1
+#define ART_SIZEOF_SHORT 2
+#define ART_SIZEOF_INT 4
+#define ART_SIZEOF_LONG 8
+
+typedef unsigned char art_u8;
+typedef unsigned short art_u16;
+typedef unsigned int art_u32;
meta/recipes-gnome/gnome/libart-lgpl/mips64el/art_config.h new file +10 -0
new file mode 100644
index 0000000..d10cd95
@@ -0,0 +1,10 @@
+/* Automatically generated by gen_art_config */
+
+#define ART_SIZEOF_CHAR 1
+#define ART_SIZEOF_SHORT 2
+#define ART_SIZEOF_INT 4
+#define ART_SIZEOF_LONG 8
+
+typedef unsigned char art_u8;
+typedef unsigned short art_u16;
+typedef unsigned int art_u32;
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#4 lore raw

PATCH 4/11 openssl: Add mips64 configure support.

In reply to Mark Hatle

From: Randy MacLeod <[email protected]>

Add mips64 configure support but assume mips(32) userspace.

---
 meta/recipes-connectivity/openssl/openssl.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-connectivity/openssl/openssl.inc +3 -0
index e1e7b65..af1922e 100644
@@ -95,6 +95,9 @@ do_configure () {
 	linux-mipsel)
 		target=debian-mipsel
 		;;
+        linux-*-mips64)
+               target=linux-mips
+                ;;
 	linux-powerpc)
 		target=linux-ppc
 		;;
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#5 lore raw

PATCH 5/11 ghostscript: fix endianness detection

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00394747 ]

The original patch removes endianness detection completely, causing lcms to be built against the wrong endian. Instead, pass the correct endian through the recipe using SITEINFO_ENDIANNESS.

---
 .../ghostscript-9.05-NOT-check-endian.patch        | 40 +++++-----------------
 .../ghostscript/ghostscript_9.05.bb                |  9 ++++-
 2 files changed, 17 insertions(+), 32 deletions(-)
meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch +9 -31
index ab4326f..c79063f 100644
@@ -4,15 +4,14 @@ So remove the check for Yocto.
 Upstream-Status: Pending
 
 Signed-off-by: Kang Kai <[email protected]>
+Signed-off-by: Sen Zhang <[email protected]>
 
---- ghostscript-9.05/base/configure.ac.orig	2012-03-14 15:28:30.828956872 +0800
-+++ ghostscript-9.05/base/configure.ac	2012-03-14 15:29:05.060957357 +0800
-@@ -1739,25 +1739,25 @@
- dnl check for big/little endian for LCMS
- dnl --------------------------------------------------
+--- ghostscript-9.05/base/configure.ac.orig     2013-01-06 10:02:08.699479511 +0800
++++ ghostscript-9.05/base/configure.ac  2013-01-06 10:01:52.275382106 +0800
+@@ -1741,13 +1741,13 @@
+ 
+ AC_MSG_CHECKING([for big endian])
  
--AC_MSG_CHECKING([for big endian])
--
 -AC_RUN_IFELSE(
 -  [AC_LANG_PROGRAM([#include <stdio.h>], [
 -   static const int one = 1;
@@ -20,18 +19,6 @@ Signed-off-by: Kang Kai <[email protected]>
 -  ])],
 -  [LCMS_BIGENDIAN=1],
 -  [LCMS_BIGENDIAN=0])
--
--if test "x$LCMS_BIGENDIAN" != "x0"; then
--  LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
--  LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
--  AC_MSG_RESULT(yes)
--else
--  LCMS_ENDIAN=
--  LCMS2_ENDIAN=
--  AC_MSG_RESULT(no)
--fi
-+dnl AC_MSG_CHECKING([for big endian])
-+dnl 
 +dnl AC_RUN_IFELSE(
 +dnl   [AC_LANG_PROGRAM([#include <stdio.h>], [
 +dnl    static const int one = 1;
@@ -39,16 +26,7 @@ Signed-off-by: Kang Kai <[email protected]>
 +dnl   ])],
 +dnl   [LCMS_BIGENDIAN=1],
 +dnl   [LCMS_BIGENDIAN=0])
-+dnl 
-+dnl if test "x$LCMS_BIGENDIAN" != "x0"; then
-+dnl   LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-+dnl   LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
-+dnl   AC_MSG_RESULT(yes)
-+dnl else
-+dnl   LCMS_ENDIAN=
-+dnl   LCMS2_ENDIAN=
-+dnl   AC_MSG_RESULT(no)
-+dnl fi
- 
  
- AC_SUBST(LCMS_ENDIAN)
+ if test "x$LCMS_BIGENDIAN" != "x0"; then
+   LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
+
meta/recipes-extended/ghostscript/ghostscript_9.05.bb +8 -1
index 93c503f..9ec5712 100644
@@ -15,7 +15,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c5326026692dbed183f0558f926580f8"
 
-PR = "r5"
+PR = "r6"
 
 DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
 DEPENDS_class-native = ""
@@ -63,6 +63,13 @@ do_configure_prepend () {
 	if [ -e ${WORKDIR}/objarch.h ]; then
 		cp ${WORKDIR}/objarch.h obj/arch.h
 	fi
+	if [ ${SITEINFO_ENDIANNESS} = "le" ]; then
+		export LCMS_BIGENDIAN="0"
+		export LCMS2_BIGENDIAN="0"
+	else
+		export LCMS_BIGENDIAN="1"
+		export LCMS2_BIGENDIAN="1"
+	fi
 }
 
 do_configure_append () {
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#6 lore raw

PATCH 6/11 eglibc-nativesdk: Fix buffer overrun with a relocated SDK

In reply to Mark Hatle

From: Jason Wessel <[email protected]>

When ld-linux-*.so.2 is relocated to a path that is longer than the original fixed location, the dynamic loader will crash in open_path because it implicitly assumes that max_dirnamelen is a fixed size that never changes.

The allocated buffer will not be large enough to contain the directory path string which is larger than the fixed location provided at build time.

---
 .../eglibc-2.17/relocatable_sdk_fix_openpath.patch | 41 ++++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.17.bb            |  3 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch
meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch new file +41 -0
new file mode 100644
index 0000000..f164f8f
@@ -0,0 +1,41 @@
+Upstream-Status: Inappropriate [SDK specific]
+
+eglibc-nativesdk: Fix buffer overrun with a relocated SDK
+
+When ld-linux-*.so.2 is relocated to a path that is longer than the
+original fixed location, the dynamic loader will crash in open_path
+because it implicitly assumes that max_dirnamelen is a fixed size that
+never changes.
+
+The allocated buffer will not be large enough to contain the directory
+path string which is larger than the fixed location provided at build
+time.
+
+Signed-off-by: Jason Wessel <[email protected]>
+
+---
+ elf/dl-load.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name
+        given on the command line when rtld is run directly.  */
+     return -1;
+ 
++  do
++    {
++      struct r_search_path_elem *this_dir = *dirs;
++      if (this_dir->dirnamelen > max_dirnamelen)
++	{
++	  max_dirnamelen = this_dir->dirnamelen;
++	}
++    }
++  while (*++dirs != NULL);
++
+   buf = alloca (max_dirnamelen + max_capstrlen + namelen);
++
++  dirs = sps->dirs;
+   do
+     {
+       struct r_search_path_elem *this_dir = *dirs;
meta/recipes-core/eglibc/eglibc_2.17.bb +2 -1
index 7bdb267..fb49ac4 100644
@@ -1,6 +1,6 @@
 require eglibc.inc
 
-PR = "r2"
+PR = "r3"
 
 DEPENDS += "gperf-native kconfig-frontends-native"
 
@@ -45,6 +45,7 @@ LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
 
 SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
             file://relocatable_sdk.patch \
+            file://relocatable_sdk_fix_openpath.patch \
             "
 S = "${WORKDIR}/eglibc-${PV}/libc"
 B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#7 lore raw

PATCH 7/11 coreutils: remove dependency on coreutils-native

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00397793 ]

It's not reasonable to build such a low-level package. Remove the dependency so that we always use the host version.

The 8.14 recipe doesn't have such dependency so needs no change.

---
 meta/recipes-core/coreutils/coreutils_6.9.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-core/coreutils/coreutils_6.9.bb +1 -2
index 37d8dc9..c0778ba 100644
@@ -8,8 +8,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://src/ls.c;beginline=4;endline=16;md5=15ed60f67b1db5fedd5dbc37cf8a9543"
-PR = "r4"
-DEPENDS = "coreutils-native-${PV}"
+PR = "r5"
 DEPENDS_class-native = "gettext-native"
 
 inherit autotools gettext
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#8 lore raw

PATCH 8/11 rt-tests: fix cyclictest reported 1 sec latencies

In reply to Mark Hatle

From: Jim Somerville <[email protected]>

[ CQID: WIND00391769 ]

Huge latencies reported close to 1 second when certain options are used in cyclictest.

Extend the original commit to remove the 1 second hardcoded timer values from the RELTIME and ITIMER options. Use the the actual interval instead.

---
 ...st-finish-removal-of-1-second-first-loops.patch | 58 ++++++++++++++++++++++
 meta/recipes-rt/rt-tests/rt-tests.inc              |  3 +-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch
meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch new file +58 -0
new file mode 100644
index 0000000..ea4f3cc
@@ -0,0 +1,58 @@
+From 8959451a8ec5dc83dcb2dba6701abe8bf419e12c Mon Sep 17 00:00:00 2001
+Message-Id: <8959451a8ec5dc83dcb2dba6701abe8bf419e12c.1358783585.git.Jim.Somerville@windriver.com>
+From: Jim Somerville <[email protected]>
+Date: Mon, 21 Jan 2013 10:50:18 -0500
+Subject: [PATCH 1/1] cyclictest: finish removal of 1 second first loops
+
+Observation:
+Huge latencies reported close to 1 second when certain options
+are used in cyclictest.
+
+Problem:
+[ commit da4956cbcaf7945554f30e4d3a9be09b1431b19a
+    use interval on first loop instead of 1 second ]
+removed the 1 second first timing loop out of the main path
+in cyclictest but left it in two other paths, namely the ones
+triggered by these two options:
+-r       --relative        use relative timer instead of absolute
+-s       --system          use sys_nanosleep and sys_setitimer
+This causes huge latencies of close to 1 second to be reported
+by cyclictest with certain uses of those two options.
+
+Fix:
+Extend the original commit to remove the 1 second hardcoded
+timer values from the RELTIME and ITIMER options.  Use the
+the actual interval instead.
+
+Signed-off-by: Jim Somerville <[email protected]>
+---
+ src/cyclictest/cyclictest.c |    6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
+index 11b6cea..8487409 100644
+--- a/src/cyclictest/cyclictest.c
++++ b/src/cyclictest/cyclictest.c
+@@ -741,17 +741,15 @@ void *timerthread(void *param)
+ 		if (par->timermode == TIMER_ABSTIME)
+ 			tspec.it_value = next;
+ 		else {
+-			tspec.it_value.tv_nsec = 0;
+-			tspec.it_value.tv_sec = 1;
++			tspec.it_value = interval;
+ 		}
+ 		timer_settime(timer, par->timermode, &tspec, NULL);
+ 	}
+ 
+ 	if (par->mode == MODE_SYS_ITIMER) {
+-		itimer.it_value.tv_sec = 1;
+-		itimer.it_value.tv_usec = 0;
+ 		itimer.it_interval.tv_sec = interval.tv_sec;
+ 		itimer.it_interval.tv_usec = interval.tv_nsec / 1000;
++		itimer.it_value = itimer.it_interval;
+ 		setitimer (ITIMER_REAL, &itimer, NULL);
+ 	}
+ 
+-- 
+1.7.4.1
+
meta/recipes-rt/rt-tests/rt-tests.inc +2 -1
index 513ddaf..3ae7602 100644
@@ -7,9 +7,10 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
            file://0001-rt-tests-Allow-for-user-specified-PYLIB.patch \
            file://0002-rt-tests-Break-out-install_hwlatdetect.patch \
            file://added-missing-dependencies.patch \
+           file://cyclictest-finish-removal-of-1-second-first-loops.patch \
 "
 
-INC_PR = "r1"
+INC_PR = "r2"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#9 lore raw

PATCH 9/11 libcgroup: fix failure for absolute path

In reply to Mark Hatle

From: Xin Ouyang <[email protected]>

[ CQID: WIND00401091 ]

While using sstate or some other conditions, there may be no image directory in the builddir, so the absolute path of libcgroup.so.1 will cause build failures.

---
 meta/recipes-core/libcgroup/libcgroup_0.38.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/libcgroup/libcgroup_0.38.bb +3 -2
index fca604b..32b87e6 100644
@@ -3,7 +3,7 @@ SECTION = "libs"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
-PR = "r0"
+PR = "r1"
 
 inherit autotools pkgconfig
 
@@ -29,7 +29,8 @@ do_install_append() {
 	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
 		mkdir -p ${D}/${base_libdir}/
 		mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
-		ln -sf ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+		ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
 	fi
 	# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
 	if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#10 lore raw

PATCH 10/11 initscripts: Add status function to /etc/init.d/functions

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00388860 ]

Many initscripts want a simple way to display status information. Add the 'status' function to the functions file.

---
 meta/recipes-core/initscripts/initscripts-1.0/functions | 15 +++++++++++++++
 meta/recipes-core/initscripts/initscripts_1.0.bb        |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts-1.0/functions +15 -0
index dd7da2b..944e3a5 100644
@@ -42,3 +42,18 @@ machine_id() { # return the machine ID
 killproc() { # kill the named process(es)
 	pid=`pidofproc $1` && kill $pid
 }
+
+status() {
+    local pid
+    if [ "$#" = 0 ]; then
+        echo "Usage: status {program}"
+        return 1
+    fi
+    pid=`pidofproc $1`
+    if [ -n "$pid" ]; then
+        echo "$1 (pid $pid) is running..."
+    else
+        echo "$1 is stopped"
+    fi
+    return 3
+}
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index 68f8034..649e182 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r139"
+PR = "r140"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
Signature · 1 line
1.8.1.2.545.g2f19ada
author
#11 lore raw

PATCH 11/11 udev: Add start/stop/status/restart support to init script

In reply to Mark Hatle

From: Jesse Zhang <[email protected]>

[ CQID: WIND00388860 ]

Add the ability to use "stop", "start", "restart" and "status" with the udev initscript.

---
 meta/recipes-core/udev/udev/init   | 113 +++++++++++++++++++++----------------
 meta/recipes-core/udev/udev_182.bb |   2 +-
 2 files changed, 65 insertions(+), 50 deletions(-)
meta/recipes-core/udev/udev/init +64 -49
index 1934d11..8ac1ff7 100644
@@ -9,6 +9,8 @@
 # Short-Description: Start udevd, populate /dev and load drivers.
 ### END INIT INFO
 
+. /etc/init.d/functions
+
 export TZ=/etc/localtime
 
 [ -d /sys/class ] || exit 1
@@ -27,60 +29,73 @@ readfile () {
    fi
 }
 
-kill_udevd() {
-	pid=`pidof -x udevd`
-	[ -n "$pid" ] && kill $pid
-}
-
-export ACTION=add
-# propagate /dev from /sys
-echo "Starting udev"
-
-# mount the tmpfs on /dev, if not already done
-LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
-	mount -n -o mode=0755 -t tmpfs none "/dev"
-}
-[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
-[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
-mount -a -t tmpfs 2>/dev/null
-mkdir -p /var/volatile/run
+case "$1" in
+  start)
+    export ACTION=add
+    # propagate /dev from /sys
+    echo "Starting udev"
 
-# cache handling
-if [ "$DEVCACHE" != "" ]; then
-	readfile /proc/version
-	VERSION="$READDATA"
-	readfile /proc/cmdline
-	CMDLINE="$READDATA"
-	readfile /proc/devices
-	DEVICES="$READDATA"
-	readfile /proc/atags
-	ATAGS="$READDATA"
+    # mount the tmpfs on /dev, if not already done
+    LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
+            mount -n -o mode=0755 -t tmpfs none "/dev"
+    }
+    [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
+    [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
+    mount -a -t tmpfs 2>/dev/null
+    mkdir -p /var/volatile/run
 
-	if [ -e $DEVCACHE ]; then
-		readfile /etc/udev/cache.data
-		if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then
-			(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
-			not_first_boot=1
-		fi
+    # cache handling
+    if [ "$DEVCACHE" != "" ]; then
+            readfile /proc/version
+            VERSION="$READDATA"
+            readfile /proc/cmdline
+            CMDLINE="$READDATA"
+            readfile /proc/devices
+            DEVICES="$READDATA"
+            readfile /proc/atags
+            ATAGS="$READDATA"
 
-		echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
-	fi
-fi
+            if [ -e $DEVCACHE ]; then
+                    readfile /etc/udev/cache.data
+                    if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then
+                            (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
+                            not_first_boot=1
+                    fi
 
-# make_extra_nodes
-kill_udevd > "/dev/null" 2>&1
+                    echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
+            fi
+    fi
 
-# trigger the sorted events
-echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
-/lib/udev/udevd -d
+    # make_extra_nodes
+    killproc udevd > "/dev/null" 2>&1
 
-/usr/bin/udevadm control --env=STARTUP=1
-if [ "$not_first_boot" != "" ];then
-	/usr/bin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
-	(/usr/bin/udevadm settle --timeout=3; /usr/bin/udevadm control --env=STARTUP=)&
-else
-	/usr/bin/udevadm trigger --action=add
-	/usr/bin/udevadm settle
-fi
+    # trigger the sorted events
+    echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+    /lib/udev/udevd -d
 
+    /usr/sbin/udevadm control --env=STARTUP=1
+    if [ "$not_first_boot" != "" ];then
+            /usr/sbin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
+            (/usr/sbin/udevadm settle --timeout=3; /sbin/udevadm control --env=STARTUP=)&
+    else
+            /usr/sbin/udevadm trigger --action=add
+            /usr/sbin/udevadm settle
+    fi
+    ;;
+  stop)
+    echo "Stopping udevd"
+    start-stop-daemon --stop --name udevd --quiet
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  status)
+    status udevd
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|status|restart}"
+    exit 1
+esac
 exit 0
meta/recipes-core/udev/udev_182.bb +1 -1
index cf0f126..56d412e 100644
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r4"
+PR = "r5"
 
 # module-init-tools from kmod_git will provide libkmod runtime
 DEPENDS += "module-init-tools"
Signature · 1 line
1.8.1.2.545.g2f19ada