[OE-core] [PATCH v4] perf: Correct the substitution of python shebangs

2020-02-21 Thread zhe.he
From: He Zhe 

To make the native python3 always used,

- Use sed one-liner instead
- Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the
  following warning.

File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata'

This issue is first reported by Joel Stanley 
The sed one-liner is credited to Anuj Mittal 

Signed-off-by: He Zhe 
---
v4: Use find to make it also work with older kernels that does not have 
bpf_helpers_doc.py

 meta/recipes-kernel/perf/perf.bb | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b06693d..10a5b88260 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -239,11 +239,8 @@ do_configure_prepend () {
 fi
 
 # use /usr/bin/env instead of version specific python
-for s in `find ${S}/tools/perf/ -name '*.py'`; do
-sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 
'bpf_helpers_doc.py'`; do
+sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
 done
 
 # unistd.h can be out of sync between libc-headers and the captured 
version in the perf source
-- 
2.24.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: Work around yocto bug 13424

2020-02-16 Thread zhe.he
From: He Zhe 

Before Yocto bug 13424 is fixed, devupstream cannot work with multilib.
To provide git based lttng-modules recipe for latest source code, let's
just include tarball based recipe and overwrite related variables.

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb | 12 
 meta/recipes-kernel/lttng/lttng-modules_git.bb| 11 +++
 2 files changed, 11 insertions(+), 12 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules_git.bb

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
index c833ff7..4e75c6e 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
@@ -29,15 +29,3 @@ python do_package_prepend() {
 if not os.path.exists(os.path.join(d.getVar('D'), 
d.getVar('nonarch_base_libdir')[1:], 'modules')):
 bb.warn("%s: no modules were created; this may be due to 
CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
 }
-
-BBCLASSEXTEND = "devupstream:target"
-LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
-DEFAULT_PREFERENCE_class-devupstream = "-1"
-SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.11 \
-   file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
-   file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
-   "
-SRCREV_class-devupstream = "6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a"
-PV_class-devupstream = "2.11.1+git${SRCPV}"
-S_class-devupstream = "${WORKDIR}/git"
-SRCREV_FORMAT ?= "lttng_git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules_git.bb 
b/meta/recipes-kernel/lttng/lttng-modules_git.bb
new file mode 100644
index 000..c6d1924
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules_git.bb
@@ -0,0 +1,11 @@
+require lttng-modules_2.11.1.bb
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
+DEFAULT_PREFERENCE = "-1"
+SRC_URI = "git://git.lttng.org/lttng-modules;branch=stable-2.11 \
+   file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+   file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+   "
+SRCREV = "6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a"
+PV = "2.11.1+git${SRCPV}"
+S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] perf: Correct the substitution of python shebangs

2020-02-13 Thread zhe.he
From: He Zhe 

To make the native python3 is always used,

- Use sed one-liner instead
- Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the
  following warning.

File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata'

This issue is first reported by Joel Stanley 
The sed one-liner is credited to Anuj Mittal 

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/perf/perf.bb | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b06693d..a6fb51d3db 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -239,11 +239,8 @@ do_configure_prepend () {
 fi
 
 # use /usr/bin/env instead of version specific python
-for s in `find ${S}/tools/perf/ -name '*.py'`; do
-sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+for s in `find ${S}/tools/perf/ -name '*.py'` 
${S}/scripts/bpf_helpers_doc.py; do
+sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
 done
 
 # unistd.h can be out of sync between libc-headers and the captured 
version in the perf source
-- 
2.24.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] perf: Correct the substitution of python shebangs

2020-02-13 Thread zhe.he
From: He Zhe 

To make the native python3 is always used,

- Move the substitution of /usr/bin/python3 to first, otherwise the
  possible original /usr/bin/python3 would be changed to
  /usr/bin/env python33.
- Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the
  following warning.

File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata'

This issue is first reported by Joel Stanley 
The sed one-liner is credited to Anuj Mittal 

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/perf/perf.bb | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b06693d..a6fb51d3db 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -239,11 +239,8 @@ do_configure_prepend () {
 fi
 
 # use /usr/bin/env instead of version specific python
-for s in `find ${S}/tools/perf/ -name '*.py'`; do
-sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
-sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+for s in `find ${S}/tools/perf/ -name '*.py'` 
${S}/scripts/bpf_helpers_doc.py; do
+sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
 done
 
 # unistd.h can be out of sync between libc-headers and the captured 
version in the perf source
-- 
2.24.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perf: Correct the substitution of python shebangs

2020-02-13 Thread zhe.he
From: He Zhe 

To make the native python3 are always used,

- Move the substitution of /usr/bin/python3 to first, otherwise the
  possible original /usr/bin/python3 would be changed to
  /usr/bin/env python33.
- Add substitution for ${S}/scripts/

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/perf/perf.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 6d1b066..14a9090 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -240,10 +240,17 @@ do_configure_prepend () {
 
 # use /usr/bin/env instead of version specific python
 for s in `find ${S}/tools/perf/ -name '*.py'`; do
+sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
 sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
 sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
 sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
+done
+
+for s in `find ${S}/scripts/ -name '*.py'`; do
 sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
+sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
+sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
 done
 
 # unistd.h can be out of sync between libc-headers and the captured 
version in the perf source
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] linux-yocto-dev: Add paravirt_kvm support for qemux86-64

2020-02-11 Thread zhe.he
From: He Zhe 

This feature includes paravirtualized KVM guest support, including
KVMCLOCK for enhancing clock accuracy of guest OS. With it we can prevent
the following error.

"clocksource: timekeeping watchdog on CPU3: Marking clocksource 'tsc' as
unstable because the skew is too large"

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb 
b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index afda849..c364a97 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -48,7 +48,7 @@ KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc 
features/taskstats/ta
 KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc 
features/drm-bochs/drm-bochs.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " 
cfg/x32.scc", "" ,d)}"
 
 KERNEL_VERSION_SANITY_SKIP = "1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] cryptodev-module: Fix build failure with kernel v5.5

2020-02-10 Thread zhe.he
From: He Zhe 

Backport from upstream to fix the following build failure.

cryptlib.c:162:37: error: 'crypto_ablkcipher_type' undeclared
(first use in this function); did you mean 'crypto_skcipher_tfm'?
162 |   if ((tfm->__crt_alg->cra_type == _ablkcipher_type)
| ^~
| crypto_skcipher_tfm
cryptlib.c:169:25: error: 'struct crypto_alg' has no member named
'cra_ablkcipher'
169 |alg = >__crt_alg->cra_ablkcipher;
| ^~
cryptlib.c:170:21: error: dereferencing pointer to incomplete type
'struct ablkcipher_alg'
170 |min_keysize = alg->min_keysize;
| ^~

Signed-off-by: He Zhe 
---
 .../cryptodev/cryptodev-module_1.10.bb|  1 +
 ...-cryptlib.c-fix-build-on-kernel-v5.5.patch | 49 +++
 2 files changed, 50 insertions(+)
 create mode 100644 
meta/recipes-kernel/cryptodev/files/0001-cryptlib.c-fix-build-on-kernel-v5.5.patch

diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb 
b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
index 552eb6abaa..89b52d8d95 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
@@ -9,6 +9,7 @@ DEPENDS += "cryptodev-linux"
 
 SRC_URI += " \
 file://0001-Disable-installing-header-file-provided-by-another-p.patch \
+file://0001-cryptlib.c-fix-build-on-kernel-v5.5.patch \
 "
 
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git 
a/meta/recipes-kernel/cryptodev/files/0001-cryptlib.c-fix-build-on-kernel-v5.5.patch
 
b/meta/recipes-kernel/cryptodev/files/0001-cryptlib.c-fix-build-on-kernel-v5.5.patch
new file mode 100644
index 00..1af9aed8d8
--- /dev/null
+++ 
b/meta/recipes-kernel/cryptodev/files/0001-cryptlib.c-fix-build-on-kernel-v5.5.patch
@@ -0,0 +1,49 @@
+From 98b163a23f6b9fbdc18c3644cf94a75cdcd0cc80 Mon Sep 17 00:00:00 2001
+From: Andrei Botila 
+Date: Wed, 27 Nov 2019 09:53:37 +0200
+Subject: [PATCH] cryptlib.c: fix build on kernel v5.5+
+
+Starting with kernel v5.5-rc1 ablkcipher and blkcipher are removed and
+symmetric key operations will rely solely on skcipher:
+commit d63007eb954 ("crypto: ablkcipher - remove deprecated and unused 
ablkcipher support").
+
+When cryptodev will use higher kernel versions > 5.4 will need to use the
+skcipher interface instead.
+
+Signed-off-by: Andrei Botila 
+
+Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/
+commit/98b163a23f6b9fbdc18c3644cf94a75cdcd0cc80]
+
+Signed-off-by: He Zhe 
+
+---
+ cryptlib.c | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cryptlib.c b/cryptlib.c
+index 4a87037..e2a4198 100644
+--- a/cryptlib.c
 b/cryptlib.c
+@@ -159,6 +159,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const 
char *alg_name,
+ 
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
+   tfm = crypto_skcipher_tfm(out->async.s);
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 4, 0))
+   if ((tfm->__crt_alg->cra_type == _ablkcipher_type)
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
+   || (tfm->__crt_alg->cra_type == _givcipher_type)
+@@ -169,7 +170,9 @@ int cryptodev_cipher_init(struct cipher_data *out, const 
char *alg_name,
+   alg = >__crt_alg->cra_ablkcipher;
+   min_keysize = alg->min_keysize;
+   max_keysize = alg->max_keysize;
+-  } else {
++  } else
++#endif
++  {
+   struct skcipher_alg *alg;
+ 
+   alg = crypto_skcipher_alg(out->async.s);
+-- 
+2.7.4
+
-- 
2.24.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: update to 2.11.1

2020-02-03 Thread zhe.he
From: He Zhe 

Fix build failure with kernel v5.5.
Remove patch as issues fixed upstream.

Signed-off-by: He Zhe 
---
 ...modules_2.11.0.bb => lttng-modules_2.11.1.bb} | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.11.0.bb => 
lttng-modules_2.11.1.bb} (68%)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
similarity index 68%
rename from meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
index 3465a43d38..c833ff7009 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
@@ -11,14 +11,10 @@ COMPATIBLE_HOST = 
'(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
-   
file://0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch \
-   
file://0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch \
-   file://0003-Fix-sunrpc-use-signed-integer-for-client-id.patch \
-   file://0004-sunrpc-introduce-lttng_get_clid-helper.patch \
"
 
-SRC_URI[md5sum] = "46ec6c566e65cf27b391a1bb643e11b4"
-SRC_URI[sha256sum] = 
"98af92d8c2e00f4eb63bc637a6967103cf6997434493f36e7a535a491e4fad5f"
+SRC_URI[md5sum] = "0d964723c8765b39835e5e6efc60a604"
+SRC_URI[sha256sum] = 
"d3e5648937e59dee983ef844f9316c55e9961f9dc8515b9260c473bbb70696c1"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
@@ -35,13 +31,13 @@ python do_package_prepend() {
 }
 
 BBCLASSEXTEND = "devupstream:target"
-LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3"
+LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
 DEFAULT_PREFERENCE_class-devupstream = "-1"
-SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.10 \
+SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.11 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
"
-SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
-PV_class-devupstream = "2.10.10+git${SRCPV}"
+SRCREV_class-devupstream = "6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a"
+PV_class-devupstream = "2.11.1+git${SRCPV}"
 S_class-devupstream = "${WORKDIR}/git"
 SRCREV_FORMAT ?= "lttng_git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: update to 2.11.1

2020-02-03 Thread zhe.he
From: He Zhe 

Fix build failure with kernel v5.5.
Remove patch as issues fixed upstream.

Signed-off-by: He Zhe 
---
 ...modules_2.11.0.bb => lttng-modules_2.11.1.bb} | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.11.0.bb => 
lttng-modules_2.11.1.bb} (68%)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
similarity index 68%
rename from meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
index 3465a43d38..c833ff7009 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
@@ -11,14 +11,10 @@ COMPATIBLE_HOST = 
'(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
-   
file://0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch \
-   
file://0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch \
-   file://0003-Fix-sunrpc-use-signed-integer-for-client-id.patch \
-   file://0004-sunrpc-introduce-lttng_get_clid-helper.patch \
"
 
-SRC_URI[md5sum] = "46ec6c566e65cf27b391a1bb643e11b4"
-SRC_URI[sha256sum] = 
"98af92d8c2e00f4eb63bc637a6967103cf6997434493f36e7a535a491e4fad5f"
+SRC_URI[md5sum] = "0d964723c8765b39835e5e6efc60a604"
+SRC_URI[sha256sum] = 
"d3e5648937e59dee983ef844f9316c55e9961f9dc8515b9260c473bbb70696c1"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
@@ -35,13 +31,13 @@ python do_package_prepend() {
 }
 
 BBCLASSEXTEND = "devupstream:target"
-LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3"
+LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
 DEFAULT_PREFERENCE_class-devupstream = "-1"
-SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.10 \
+SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.11 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
"
-SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
-PV_class-devupstream = "2.10.10+git${SRCPV}"
+SRCREV_class-devupstream = "6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a"
+PV_class-devupstream = "2.11.1+git${SRCPV}"
 S_class-devupstream = "${WORKDIR}/git"
 SRCREV_FORMAT ?= "lttng_git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] lttng-modules: update to 2.11.1

2020-02-02 Thread zhe.he
From: He Zhe 

Fix build failure with kernel v5.5.
Remove patches as issues fixed upstream.

Signed-off-by: He Zhe 
---
 ...ops-when-trace-sunrpc_task-events-in.patch |  94 -
 ...rpc_clnt-dereference-in-rpc_task_que.patch |  44 --
 ...rpc-use-signed-integer-for-client-id.patch | 105 --
 ...nrpc-introduce-lttng_get_clid-helper.patch | 130 --
 ...ules_2.11.0.bb => lttng-modules_2.11.1.bb} |  16 +--
 5 files changed, 6 insertions(+), 383 deletions(-)
 delete mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
 delete mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch
 delete mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch
 delete mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0004-sunrpc-introduce-lttng_get_clid-helper.patch
 rename meta/recipes-kernel/lttng/{lttng-modules_2.11.0.bb => 
lttng-modules_2.11.1.bb} (68%)

diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
deleted file mode 100644
index bdbc4f811e..00
--- 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 1ff7013bcf7f068cf4371d12d758f9c0fd16a619 Mon Sep 17 00:00:00 2001
-From: Quanyang Wang 
-Date: Thu, 5 Dec 2019 15:35:32 +0800
-Subject: [PATCH 1/4] Fix: SUNRPC: Fix oops when trace sunrpc_task events in
- nfs client
-
-See upstream commit :
-
-   commit 2ca310fc4160ed0420da65534a21ae77b24326a8
-   Author: Ditang Chen 
-   Date: Fri, 7 Mar 2014 13:27:57 +0800
-   Subject: SUNRPC: Fix oops when trace sunrpc_task events in nfs client
-
-   When tracking sunrpc_task events in nfs client, the clnt pointer may be 
NULL.
-
-   [  139.269266] BUG: unable to handle kernel NULL pointer dereference at 
0004
-   [  139.269915] IP: [] 
ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc]
-   [  139.269915] PGD 1d293067 PUD 1d294067 PMD 0
-   [  139.269915] Oops:  [#1] SMP
-   [  139.269915] Modules linked in: nfsv4 dns_resolver nfs lockd sunrpc 
fscache sg ppdev e1000
-   serio_raw pcspkr parport_pc parport i2c_piix4 i2c_core microcode xfs 
libcrc32c sd_mod sr_mod
-   cdrom ata_generic crc_t10dif crct10dif_common pata_acpi ahci libahci 
ata_piix libata dm_mirror
-   dm_region_hash dm_log dm_mod
-   [  139.269915] CPU: 0 PID: 59 Comm: kworker/0:2 Not tainted 
3.10.0-84.el7.x86_64 #1
-   [  139.269915] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS 
VirtualBox 12/01/2006
-   [  139.269915] Workqueue: rpciod rpc_async_schedule [sunrpc]
-   [  139.269915] task: 88001b598000 ti: 88001b632000 task.ti: 
88001b632000
-   [  139.269915] RIP: 0010:[]  [] 
ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc]
-   [  139.269915] RSP: 0018:88001b633d70  EFLAGS: 00010206
-   [  139.269915] RAX: 88001dfc5338 RBX: 88001cc37a00 RCX: 
88001dfc5334
-   [  139.269915] RDX: 88001dfc5338 RSI:  RDI: 
88001dfc533c
-   [  139.269915] RBP: 88001b633db0 R08: 002c R09: 
000a
-   [  139.269915] R10: 00062180 R11: 0020759fb9dc R12: 
a0292c20
-   [  139.269915] R13: 88001dfc5334 R14:  R15: 

-   [  139.269915] FS:  () GS:88001fc0() 
knlGS:
-   [  139.269915] CS:  0010 DS:  ES:  CR0: 8005003b
-   [  139.269915] CR2: 0004 CR3: 1d29 CR4: 
06f0
-   [  139.269915] DR0:  DR1:  DR2: 

-   [  139.269915] DR3:  DR6: 0ff0 DR7: 
0400
-   [  139.269915] Stack:
-   [  139.269915]  1b633d98 0246 88001df1dc00 
88001cc37a00
-   [  139.269915]  88001bc35e60  88001ffa0a48 
88001bc35ee0
-   [  139.269915]  88001b633e08 a02704b5 0001 
88001cc37a70
-   [  139.269915] Call Trace:
-   [  139.269915]  [] __rpc_execute+0x1d5/0x400 [sunrpc]
-   [  139.269915]  [] rpc_async_schedule+0x26/0x30 
[sunrpc]
-   [  139.269915]  [] process_one_work+0x17b/0x460
-   [  139.269915]  [] worker_thread+0x11b/0x400
-   [  139.269915]  [] ? rescuer_thread+0x3e0/0x3e0
-   [  139.269915]  [] kthread+0xc0/0xd0
-   [  139.269915]  [] ? 
kthread_create_on_node+0x110/0x110
-   [  139.269915]  [] ret_from_fork+0x7c/0xb0
-   [  139.269915]  [] ? 
kthread_create_on_node+0x110/0x110
-   [  139.269915] Code: 4c 8b 45 c8 48 8d 7d d0 89 4d 

[OE-core] [PATCH] lttng-modules: update to 2.11.1

2020-02-02 Thread zhe.he
From: He Zhe 

Fix build failure with kernel v5.5.
Remove patch as issues fixed upstream.

Signed-off-by: He Zhe 
---
 ...modules_2.11.0.bb => lttng-modules_2.11.1.bb} | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.11.0.bb => 
lttng-modules_2.11.1.bb} (68%)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
similarity index 68%
rename from meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
index 3465a43d38..c833ff7009 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.1.bb
@@ -11,14 +11,10 @@ COMPATIBLE_HOST = 
'(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
-   
file://0001-Fix-SUNRPC-Fix-oops-when-trace-sunrpc_task-events-in.patch \
-   
file://0002-Fix-sunrpc-null-rpc_clnt-dereference-in-rpc_task_que.patch \
-   file://0003-Fix-sunrpc-use-signed-integer-for-client-id.patch \
-   file://0004-sunrpc-introduce-lttng_get_clid-helper.patch \
"
 
-SRC_URI[md5sum] = "46ec6c566e65cf27b391a1bb643e11b4"
-SRC_URI[sha256sum] = 
"98af92d8c2e00f4eb63bc637a6967103cf6997434493f36e7a535a491e4fad5f"
+SRC_URI[md5sum] = "0d964723c8765b39835e5e6efc60a604"
+SRC_URI[sha256sum] = 
"d3e5648937e59dee983ef844f9316c55e9961f9dc8515b9260c473bbb70696c1"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
@@ -35,13 +31,13 @@ python do_package_prepend() {
 }
 
 BBCLASSEXTEND = "devupstream:target"
-LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3"
+LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
 DEFAULT_PREFERENCE_class-devupstream = "-1"
-SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.10 \
+SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.11 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
"
-SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
-PV_class-devupstream = "2.10.10+git${SRCPV}"
+SRCREV_class-devupstream = "6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a"
+PV_class-devupstream = "2.11.1+git${SRCPV}"
 S_class-devupstream = "${WORKDIR}/git"
 SRCREV_FORMAT ?= "lttng_git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix nm01 faliure

2020-01-19 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following runtime failure.

The latest nm v2.33.1 outputs symbols addresses without prefix zeros
for "nm -f posix", which causes the following error.
nm01 5 TFAIL: Got wrong format with -f bsd

Signed-off-by: He Zhe 
---
 ...ix-zeros-of-the-addresses-output-by-.patch | 43 +++
 meta/recipes-extended/ltp/ltp_20190930.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
new file mode 100644
index 00..fe5e7314e0
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,43 @@
+From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Tue, 31 Dec 2019 15:02:48 +0800
+Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
+ before comparing
+
+The latest nm v2.33.1 outputs symbols addresses without prefix zeros
+for "nm -f posix", which causes the following error.
+nm01 5 TFAIL: Got wrong format with -f bsd
+
+Let's remove the prefix zeros before comparing.
+
+Upstream-Status: Backport [59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45]
+
+Signed-off-by: He Zhe 
+Reviewed-by: Li Wang 
+Reviewed-by: Petr Vorel 
+Tested-by: Petr Vorel 
+---
+ testcases/commands/nm/nm01.sh | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/commands/nm/nm01.sh b/testcases/commands/nm/nm01.sh
+index 30c41bd..fd9d3d9 100755
+--- a/testcases/commands/nm/nm01.sh
 b/testcases/commands/nm/nm01.sh
+@@ -84,8 +84,11 @@ test5()
+   EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
+   EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
+ 
+-  ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
+-  ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_bsd.out \> trimmed_nm_bsd.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_posix.out \> trimmed_nm_posix.out
++
++  ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
++  ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
+ 
+   if diff nm1.out nm2.out > /dev/null; then
+   tst_res TPASS "Got BSD format with -f bsd"
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190930.bb 
b/meta/recipes-extended/ltp/ltp_20190930.bb
index e56bb575d2..2853b1c819 100644
--- a/meta/recipes-extended/ltp/ltp_20190930.bb
+++ b/meta/recipes-extended/ltp/ltp_20190930.bb
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
file://0001-testcases-fix-an-absent-format-string-issue.patch \
file://0001-Add-more-musl-exclusions.patch \
+   
file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix nm01 faliure

2020-01-18 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following runtime failure.

The latest nm v2.33.1 outputs symbols addresses without prefix zeros
for "nm -f posix", which causes the following error.
nm01 5 TFAIL: Got wrong format with -f bsd

(From OE-Core rev: 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45)

Signed-off-by: He Zhe 
---
 ...ix-zeros-of-the-addresses-output-by-.patch | 41 +++
 meta/recipes-extended/ltp/ltp_20190930.bb |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
new file mode 100644
index 00..a98a104384
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,41 @@
+From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Tue, 31 Dec 2019 15:02:48 +0800
+Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
+ before comparing
+
+The latest nm v2.33.1 outputs symbols addresses without prefix zeros
+for "nm -f posix", which causes the following error.
+nm01 5 TFAIL: Got wrong format with -f bsd
+
+Let's remove the prefix zeros before comparing.
+
+Signed-off-by: He Zhe 
+Reviewed-by: Li Wang 
+Reviewed-by: Petr Vorel 
+Tested-by: Petr Vorel 
+---
+ testcases/commands/nm/nm01.sh | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/commands/nm/nm01.sh b/testcases/commands/nm/nm01.sh
+index 30c41bd..fd9d3d9 100755
+--- a/testcases/commands/nm/nm01.sh
 b/testcases/commands/nm/nm01.sh
+@@ -84,8 +84,11 @@ test5()
+   EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
+   EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
+ 
+-  ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
+-  ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_bsd.out \> trimmed_nm_bsd.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_posix.out \> trimmed_nm_posix.out
++
++  ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
++  ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
+ 
+   if diff nm1.out nm2.out > /dev/null; then
+   tst_res TPASS "Got BSD format with -f bsd"
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190930.bb 
b/meta/recipes-extended/ltp/ltp_20190930.bb
index e56bb575d2..2853b1c819 100644
--- a/meta/recipes-extended/ltp/ltp_20190930.bb
+++ b/meta/recipes-extended/ltp/ltp_20190930.bb
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
file://0001-testcases-fix-an-absent-format-string-issue.patch \
file://0001-Add-more-musl-exclusions.patch \
+   
file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: nm01: Remove prefix zeros of the addresses output by nm before comparing

2020-01-06 Thread zhe.he
From: He Zhe 

The latest nm v2.33.1 outputs symbols addresses without prefix zeros
for "nm -f posix", which causes the following error.
nm01 5 TFAIL: Got wrong format with -f bsd

Backport a patch to fix it.

Signed-off-by: He Zhe 
---
v2: Add ltp prefix to the patch title

 ...-prefix-zeros-of-the-addresses-output-by-.patch | 43 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
new file mode 100644
index 000..502ea69
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,43 @@
+From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Tue, 31 Dec 2019 15:02:48 +0800
+Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
+ before comparing
+
+The latest nm v2.33.1 outputs symbols addresses without prefix zeros
+for "nm -f posix", which causes the following error.
+nm01 5 TFAIL: Got wrong format with -f bsd
+
+Let's remove the prefix zeros before comparing.
+
+Upstream-Status: Backport 
[http://lists.linux.it/pipermail/ltp/2020-January/014884.html]
+
+Signed-off-by: He Zhe 
+Reviewed-by: Li Wang 
+Reviewed-by: Petr Vorel 
+Tested-by: Petr Vorel 
+---
+ testcases/commands/nm/nm01 | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/commands/nm/nm01 b/testcases/commands/nm/nm01
+index 30c41bd..fd9d3d9 100755
+--- a/testcases/commands/nm/nm01
 b/testcases/commands/nm/nm01
+@@ -84,8 +84,11 @@ test5()
+   EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
+   EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
+ 
+-  ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
+-  ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_bsd.out \> trimmed_nm_bsd.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_posix.out \> trimmed_nm_posix.out
++
++  ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
++  ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
+ 
+   if diff nm1.out nm2.out > /dev/null; then
+   tst_res TPASS "Got BSD format with -f bsd"
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index 60f749b..f70687f 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -51,6 +51,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \

file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \

file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
+   
file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] nm01: Remove prefix zeros of the addresses output by nm before comparing

2020-01-06 Thread zhe.he
From: He Zhe 

The latest nm v2.33.1 outputs symbols addresses without prefix zeros
for "nm -f posix", which causes the following error.
nm01 5 TFAIL: Got wrong format with -f bsd

Backport a patch to fix it.

Signed-off-by: He Zhe 
---
 ...ix-zeros-of-the-addresses-output-by-.patch | 43 +++
 meta/recipes-extended/ltp/ltp_20190517.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
new file mode 100644
index 00..502ea69055
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,43 @@
+From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Tue, 31 Dec 2019 15:02:48 +0800
+Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
+ before comparing
+
+The latest nm v2.33.1 outputs symbols addresses without prefix zeros
+for "nm -f posix", which causes the following error.
+nm01 5 TFAIL: Got wrong format with -f bsd
+
+Let's remove the prefix zeros before comparing.
+
+Upstream-Status: Backport 
[http://lists.linux.it/pipermail/ltp/2020-January/014884.html]
+
+Signed-off-by: He Zhe 
+Reviewed-by: Li Wang 
+Reviewed-by: Petr Vorel 
+Tested-by: Petr Vorel 
+---
+ testcases/commands/nm/nm01 | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/commands/nm/nm01 b/testcases/commands/nm/nm01
+index 30c41bd..fd9d3d9 100755
+--- a/testcases/commands/nm/nm01
 b/testcases/commands/nm/nm01
+@@ -84,8 +84,11 @@ test5()
+   EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
+   EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
+ 
+-  ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
+-  ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_bsd.out \> trimmed_nm_bsd.out
++  ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' 
nm_posix.out \> trimmed_nm_posix.out
++
++  ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
++  ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
+ 
+   if diff nm1.out nm2.out > /dev/null; then
+   tst_res TPASS "Got BSD format with -f bsd"
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index 60f749b4c0..f70687fc44 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -51,6 +51,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \

file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \

file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
+   
file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.24.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] linux-dummy: Add package kernel

2019-10-31 Thread zhe.he
From: He Zhe 

Some package like packagegroup-core-boot may ask for package kernel. Let
linux-dummy rprovide package kernel to fix the following build failure.

ERROR: Nothing RPROVIDES 'kernel' (but
.../meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or
otherwise requires it)

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/linux/linux-dummy.bb | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-dummy.bb 
b/meta/recipes-kernel/linux/linux-dummy.bb
index 62cf6f5ea6..20d7ed815d 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -8,19 +8,22 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = 
"file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
 
 PROVIDES += "virtual/kernel"
+RPROVIDES_${PN} += "kernel lib32-kernel"
 
 PACKAGES_DYNAMIC += "^kernel-module-.*"
 PACKAGES_DYNAMIC += "^kernel-image-.*"
 PACKAGES_DYNAMIC += "^kernel-firmware-.*"
 
-PACKAGES += "kernel-modules kernel-vmlinux"
+PACKAGES += "kernel-modules kernel-vmlinux kernel"
 FILES_kernel-modules = ""
 ALLOW_EMPTY_kernel-modules = "1"
 DESCRIPTION_kernel-modules = "Kernel modules meta package"
 FILES_kernel-vmlinux = ""
 ALLOW_EMPTY_kernel-vmlinux = "1"
 DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
-
+FILES_kernel = ""
+ALLOW_EMPTY_kernel = "1"
+DESCRIPTION_kernel = "Kernel meta package"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix overcommit_memory failure

2019-10-29 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following runtime failure.

mem.c:814: INFO: set overcommit_memory to 0
overcommit_memory.c:213: FAIL: alloc passed, expected to fail

Signed-off-by: He Zhe 
---
 ...memory-update-for-mm-fix-false-positive-O.patch | 57 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch
 
b/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch
new file mode 100644
index 000..bed8471
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch
@@ -0,0 +1,57 @@
+From d656a447893dccc310c975a239f482278550c3e0 Mon Sep 17 00:00:00 2001
+From: Jan Stancek 
+Date: Tue, 21 May 2019 10:10:44 +0200
+Subject: [PATCH] overcommit_memory: update for "mm: fix false-positive
+ OVERCOMMIT_GUESS failures"
+
+commit 8c7829b04c52 ("mm: fix false-positive OVERCOMMIT_GUESS failures")
+changes logic of __vm_enough_memory(), simplifying it to:
+When in GUESS mode, catch wild allocations by comparing their request
+size to total amount of ram and swap in the system.
+
+Testcase currently allocates mem_total + swap_total, which doesn't trigger
+new condition. Make it more extreme, but assuming free_total / 2 will PASS,
+and 2*sum_total will FAIL.
+
+Signed-off-by: Jan Stancek 
+Acked-by: Cyril Hrubis 
+
+Upstream-Status: Backport 
[https://github.com/linux-test-project/ltp/commit/d656a447893dccc310c975a239f482278550c3e0]
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/mem/tunable/overcommit_memory.c | 11 ---
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c 
b/testcases/kernel/mem/tunable/overcommit_memory.c
+index 555298f..345764d 100644
+--- a/testcases/kernel/mem/tunable/overcommit_memory.c
 b/testcases/kernel/mem/tunable/overcommit_memory.c
+@@ -36,11 +36,10 @@
+  *
+  * The program is designed to test the two tunables:
+  *
+- * When overcommit_memory = 0, allocatable memory can't overextends
+- * the amount of free memory. I choose the three cases:
++ * When overcommit_memory = 0, allocatable memory can't overextend
++ * the amount of total memory:
+  * a. less than free_total:free_total / 2, alloc should pass.
+- * b. greater than free_total: free_total * 2, alloc should fail.
+- * c. equal to sum_total:  sum_tatal,  alloc should fail
++ * b. greater than sum_total:   sum_total * 2, alloc should fail.
+  *
+  * When overcommit_memory = 1, it can alloc enough much memory, I
+  * choose the three cases:
+@@ -164,9 +163,7 @@ static void overcommit_memory_test(void)
+ 
+   update_mem();
+   alloc_and_check(free_total / 2, EXPECT_PASS);
+-  update_mem();
+-  alloc_and_check(free_total * 2, EXPECT_FAIL);
+-  alloc_and_check(sum_total, EXPECT_FAIL);
++  alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ 
+   /* start to test overcommit_memory=1 */
+   set_sys_tune("overcommit_memory", 1, 1);
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index 4650715..5915b1c 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \

file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
+   
file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] ltp: Fix hang of cve test cases

2019-09-29 Thread zhe.he
From: He Zhe 

Backport a patch to the fix possible hang caused by the case of CVE-2017-17052.

CVE: CVE-2017-17052

Signed-off-by: He Zhe 
---
 ...-2017-17052-Avoid-unsafe-exits-in-threads.patch | 64 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
new file mode 100644
index 000..cc40081
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
@@ -0,0 +1,64 @@
+From e3a8502d0a4f8a44ddd02ca4b2efc097133fb9f7 Mon Sep 17 00:00:00 2001
+From: Mathias Fiedler 
+Date: Fri, 23 Aug 2019 12:46:48 +0200
+Subject: [PATCH] cve-2017-17052: Avoid unsafe exits in threads
+
+According to manpage exit(3) calling exit is not thread-safe.
+And with glibc 2.28 (and probably also with glibc >=2.27) sometimes
+child processes created in fork_thread can get stuck on process exit in
+glibc's __run_exit_handlers trying to acquire some lock which was in
+locked state while the fork was created. This can happen when exit is
+called in mmap_thread concurrently to the fork.
+While the main process will still return with PASSED some of its
+children are left behind.
+
+Comparing the source code with the original program as described in the
+commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a of linux kernel >=4.13
+the exits in mmap_thread and fork_thread should not be necessary to
+trigger the original bug.
+
+Therefore those exit calls are removed. The mmap_thread and fork_thread
+should still exit when their corresponding main thread in do_test_fork
+calls exit_group. The remaining exit in do_test_fork will be called in
+the main thread without any concurrent thread in the same process.
+
+Signed-off-by: Mathias Fiedler 
+Acked-by: Cyril Hrubis 
+Acked-by: Jan Stancek 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/9f0b452c1af4bcb54da35711eb3fa77334a350b4]
+
+CVE: CVE-2017-17052
+
+Signed-off-by: He Zhe 
+---
+ testcases/cve/cve-2017-17052.c | 5 -
+ 1 file changed, 5 deletions(-)
+
+diff --git a/testcases/cve/cve-2017-17052.c b/testcases/cve/cve-2017-17052.c
+index d7da7e919..18cd2a6d7 100644
+--- a/testcases/cve/cve-2017-17052.c
 b/testcases/cve/cve-2017-17052.c
+@@ -58,8 +58,6 @@ static void *mmap_thread(void *arg)
+   for (;;) {
+   SAFE_MMAP(NULL, 0x100, PROT_READ,
+   MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+-  if (*do_exit)
+-  exit(0);
+   }
+ 
+   return arg;
+@@ -67,9 +65,6 @@ static void *mmap_thread(void *arg)
+ 
+ static void *fork_thread(void *arg)
+ {
+-  if (*do_exit)
+-  exit(0);
+-
+   usleep(rand() % 1);
+   SAFE_FORK();
+ 
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index e9a588f..4650715 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -48,6 +48,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \

file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \

file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
+   file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: Fix hang of cve test cases

2019-09-29 Thread zhe.he
From: He Zhe 

Backport a patch to the fix possible hang caused by the case of CVE-2017-17052.

CVE: CVE-2017-17052

Signed-off-by: He Zhe 
---
 ...-2017-17052-Avoid-unsafe-exits-in-threads.patch | 62 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 63 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
new file mode 100644
index 000..1b66238
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
@@ -0,0 +1,62 @@
+From e3a8502d0a4f8a44ddd02ca4b2efc097133fb9f7 Mon Sep 17 00:00:00 2001
+From: Mathias Fiedler 
+Date: Fri, 23 Aug 2019 12:46:48 +0200
+Subject: [PATCH] cve-2017-17052: Avoid unsafe exits in threads
+
+According to manpage exit(3) calling exit is not thread-safe.
+And with glibc 2.28 (and probably also with glibc >=2.27) sometimes
+child processes created in fork_thread can get stuck on process exit in
+glibc's __run_exit_handlers trying to acquire some lock which was in
+locked state while the fork was created. This can happen when exit is
+called in mmap_thread concurrently to the fork.
+While the main process will still return with PASSED some of its
+children are left behind.
+
+Comparing the source code with the original program as described in the
+commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a of linux kernel >=4.13
+the exits in mmap_thread and fork_thread should not be necessary to
+trigger the original bug.
+
+Therefore those exit calls are removed. The mmap_thread and fork_thread
+should still exit when their corresponding main thread in do_test_fork
+calls exit_group. The remaining exit in do_test_fork will be called in
+the main thread without any concurrent thread in the same process.
+
+Signed-off-by: Mathias Fiedler 
+Acked-by: Cyril Hrubis 
+Acked-by: Jan Stancek 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/9f0b452c1af4bcb54da35711eb3fa77334a350b4]
+
+Signed-off-by: He Zhe 
+---
+ testcases/cve/cve-2017-17052.c | 5 -
+ 1 file changed, 5 deletions(-)
+
+diff --git a/testcases/cve/cve-2017-17052.c b/testcases/cve/cve-2017-17052.c
+index d7da7e919..18cd2a6d7 100644
+--- a/testcases/cve/cve-2017-17052.c
 b/testcases/cve/cve-2017-17052.c
+@@ -58,8 +58,6 @@ static void *mmap_thread(void *arg)
+   for (;;) {
+   SAFE_MMAP(NULL, 0x100, PROT_READ,
+   MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+-  if (*do_exit)
+-  exit(0);
+   }
+ 
+   return arg;
+@@ -67,9 +65,6 @@ static void *mmap_thread(void *arg)
+ 
+ static void *fork_thread(void *arg)
+ {
+-  if (*do_exit)
+-  exit(0);
+-
+   usleep(rand() % 1);
+   SAFE_FORK();
+ 
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index e9a588f..4650715 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -48,6 +48,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \

file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \

file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
+   file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix hang of cve test cases

2019-09-29 Thread zhe.he
From: He Zhe 

Backport a patch to the fix possible hang caused by the case of cve-2017-17052.

Signed-off-by: He Zhe 
---
 ...-2017-17052-Avoid-unsafe-exits-in-threads.patch | 62 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 63 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
new file mode 100644
index 000..1b66238
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch
@@ -0,0 +1,62 @@
+From e3a8502d0a4f8a44ddd02ca4b2efc097133fb9f7 Mon Sep 17 00:00:00 2001
+From: Mathias Fiedler 
+Date: Fri, 23 Aug 2019 12:46:48 +0200
+Subject: [PATCH] cve-2017-17052: Avoid unsafe exits in threads
+
+According to manpage exit(3) calling exit is not thread-safe.
+And with glibc 2.28 (and probably also with glibc >=2.27) sometimes
+child processes created in fork_thread can get stuck on process exit in
+glibc's __run_exit_handlers trying to acquire some lock which was in
+locked state while the fork was created. This can happen when exit is
+called in mmap_thread concurrently to the fork.
+While the main process will still return with PASSED some of its
+children are left behind.
+
+Comparing the source code with the original program as described in the
+commit 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a of linux kernel >=4.13
+the exits in mmap_thread and fork_thread should not be necessary to
+trigger the original bug.
+
+Therefore those exit calls are removed. The mmap_thread and fork_thread
+should still exit when their corresponding main thread in do_test_fork
+calls exit_group. The remaining exit in do_test_fork will be called in
+the main thread without any concurrent thread in the same process.
+
+Signed-off-by: Mathias Fiedler 
+Acked-by: Cyril Hrubis 
+Acked-by: Jan Stancek 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/9f0b452c1af4bcb54da35711eb3fa77334a350b4]
+
+Signed-off-by: He Zhe 
+---
+ testcases/cve/cve-2017-17052.c | 5 -
+ 1 file changed, 5 deletions(-)
+
+diff --git a/testcases/cve/cve-2017-17052.c b/testcases/cve/cve-2017-17052.c
+index d7da7e919..18cd2a6d7 100644
+--- a/testcases/cve/cve-2017-17052.c
 b/testcases/cve/cve-2017-17052.c
+@@ -58,8 +58,6 @@ static void *mmap_thread(void *arg)
+   for (;;) {
+   SAFE_MMAP(NULL, 0x100, PROT_READ,
+   MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+-  if (*do_exit)
+-  exit(0);
+   }
+ 
+   return arg;
+@@ -67,9 +65,6 @@ static void *mmap_thread(void *arg)
+ 
+ static void *fork_thread(void *arg)
+ {
+-  if (*do_exit)
+-  exit(0);
+-
+   usleep(rand() % 1);
+   SAFE_FORK();
+ 
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index e9a588f..4650715 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -48,6 +48,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \

file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \

file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
+   file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches

2019-09-03 Thread zhe.he
From: He Zhe 

Backport a patch to fix the following failure.
rt_sigtimedwait011  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
(.../sigwaitinfo01.c: 148): Unexpected failure:
TEST_ERRNO=EINVAL(22): Invalid argument

Signed-off-by: He Zhe 
---
v2: Rebase

 ...sigtimedwait01-Fix-wrong-sigset-length-fo.patch | 46 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
new file mode 100644
index 000..0e56c08
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch
@@ -0,0 +1,46 @@
+From a5046625eaeed2d3fba456c3ba84c6c141c2ad7c Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Thu, 29 Aug 2019 21:09:46 +0800
+Subject: [PATCH] syscall/rt_sigtimedwait01: Fix wrong sigset length for MIPS
+
+rt_sigtimedwait01 fails as follow on MIPS arches
+rt_sigtimedwait011  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
+(.../sigwaitinfo01.c: 148): Unexpected failure:
+TEST_ERRNO=EINVAL(22): Invalid argument
+
+As this case purposely bypasses glibc, it should align with the size of kernel
+definition of sigset_t which is different from other arches.
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
+
+This patch turns to use _NSIG which is always right for all arches.
+
+Upstream-Status: Backport [a5046625eaeed2d3fba456c3ba84c6c141c2ad7c]
+
+Suggested-by: Jan Stancek 
+Acked-by: Jan Stancek 
+Acked-by: Cyril Hrubis 
+Signed-off-by: He Zhe 
+Signed-off-by: Petr Vorel 
+---
+ testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c 
b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+index 5a32ce1..6a30c27 100644
+--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
 b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+@@ -128,9 +128,8 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t 
* info,
+ static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ struct timespec *timeout)
+ {
+-
+-  /* The last argument is (number_of_signals)/(bits_per_byte), which are 
64 and 8, resp. */
+-  return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
++  /* _NSIG is always the right number of bits of signal map for all 
arches */
++  return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, _NSIG/8);
+ }
+ #endif
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index 69d75d5..e9a588f 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -47,6 +47,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \

file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \
+   
file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng: babeltrace: Fix negative clock offset

2019-09-02 Thread zhe.he
From: He Zhe 

Backport a patch to fix negative clock offset with the following errors, when
when using lttng to view traces.
[error] ctf_clock_declaration_visit: unexpected unary expression for clock 
offset
[error] ctf_visitor_construct_metadata: clock declaration error
[error] Error in CTF metadata constructor -22

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/lttng/babeltrace_1.5.7.bb  |   4 +-
 ...andle-negative-time-and-offset-from-Epoch.patch | 853 +
 2 files changed, 856 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-kernel/lttng/files/0001-Handle-negative-time-and-offset-from-Epoch.patch

diff --git a/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb 
b/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
index 05ef6d0..4b9343d 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
 
 DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
 
-SRC_URI = 
"git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5"
+SRC_URI = 
"git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5 \
+   file://0001-Handle-negative-time-and-offset-from-Epoch.patch \
+  "
 SRCREV = "d4014aeef4b89a4aaab1af42d7b0d143d62da0ff"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)$"
 
diff --git 
a/meta/recipes-kernel/lttng/files/0001-Handle-negative-time-and-offset-from-Epoch.patch
 
b/meta/recipes-kernel/lttng/files/0001-Handle-negative-time-and-offset-from-Epoch.patch
new file mode 100644
index 000..f93fea7
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/files/0001-Handle-negative-time-and-offset-from-Epoch.patch
@@ -0,0 +1,853 @@
+From d6480f9dc6a6f6536da6c3df59006ba67ef0f622 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers 
+Date: Wed, 14 Aug 2019 13:24:31 +0800
+Subject: [PATCH] Handle negative time and offset from Epoch
+
+Handle cases where a trace have a negative offset from Epoch.
+If Epoch is arbitrary (e.g. embedded system starting at 0, without any
+network access), the "0" can be used as correlation point between
+various components, and some components could start before the
+correlation point. Therefore, especially in traces where the time is
+meant to be shown in nanoseconds or cycles from the correlation point,
+it also makes sense to have a negative time value.
+
+It introduces API-breaking changes in the C and Python APIs, since we
+need to be able to return negative time values, which were previously
+used as errors (-1ULL).
+
+The --offset and --offset-ns command line parameters can now take
+negative offset (seconds and nanoseconds) values too.
+
+The [sec.ns] format is used as fallback so we don't attempt to pass
+a negative time value to POSIX time-formatting APIs.
+
+This also fixes an inaccurate return value in an error path of
+bt_ctf_event_populate_event_header().
+
+Signed-off-by: Mathieu Desnoyers 
+
+Upstream-Status: Backport[61cf588beae752e5ddfc60b6b5310f769ac9e852]
+
+Signed-off-by: He Zhe 
+---
+ converter/babeltrace.c |   4 +-
+ formats/ctf-text/ctf-text.c|   2 +-
+ formats/ctf/ctf.c  | 115 +++--
+ formats/ctf/events-private.h   |  11 +-
+ formats/ctf/events.c   |  11 +-
+ .../ctf/metadata/ctf-visitor-generate-io-struct.c  |   2 +-
+ include/babeltrace/babeltrace-internal.h   |   8 +-
+ include/babeltrace/clock-internal.h|   2 +-
+ include/babeltrace/ctf-ir/clock-internal.h |   2 +-
+ include/babeltrace/ctf/events.h|   8 +-
+ include/babeltrace/ctf/types.h |   6 +-
+ include/babeltrace/format.h|  10 +-
+ include/babeltrace/trace-handle-internal.h |   8 +-
+ include/babeltrace/trace-handle.h  |  25 +++--
+ lib/context.c  |  44 +---
+ lib/trace-handle.c |  40 +++
+ tests/lib/test_ctf_writer.c|   6 +-
+ tests/lib/test_seek.c  |  26 ++---
+ 18 files changed, 209 insertions(+), 121 deletions(-)
+
+diff --git a/converter/babeltrace.c b/converter/babeltrace.c
+index ef783ed..2ac1617 100644
+--- a/converter/babeltrace.c
 b/converter/babeltrace.c
+@@ -375,7 +375,7 @@ static int parse_options(int argc, char **argv)
+   goto end;
+   }
+   errno = 0;
+-  opt_clock_offset = strtoull(str, , 0);
++  opt_clock_offset = strtoll(str, , 0);
+   if (*endptr != '\0' || str == endptr || errno != 0) {
+   fprintf(stderr, "[error] Incorrect 
--clock-offset argument: %s\n", str);
+   ret = -EINVAL;
+@@ -400,7 +400,7 

[OE-core] [PATCH 2/2] qemu: Fix dependency of PACKAGECONFIG libcurl

2019-08-29 Thread zhe.he
From: He Zhe 

When PACKAGECONFIG libcurl is enabled, we would get the following build failure.
ERROR: Nothing PROVIDES 'libcurl' (but perf.bb DEPENDS on or otherwise requires 
it). Close matches:

The dependency should be curl.

Signed-off-by: He Zhe 
---
 meta/recipes-devtools/qemu/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 3eeba6e..241f9db 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -132,7 +132,7 @@ PACKAGECONFIG[xen] = 
"--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenc
 PACKAGECONFIG[vnc-sasl] = "--enable-vnc 
--enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
 PACKAGECONFIG[vnc-jpeg] = "--enable-vnc 
--enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
 PACKAGECONFIG[vnc-png] = "--enable-vnc 
--enable-vnc-png,--disable-vnc-png,libpng,"
-PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
+PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
 PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
 PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
 PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] qemu: Add pkg-config handling for libgcrypt

2019-08-29 Thread zhe.he
From: He Zhe 

When PACKAGECONFIG libgcrypt is enabled, we would get the following error.

ERROR: /usr/bin/libgcrypt-config should not be used, use an alternative such as 
pkg-config

In oe-core, libgcrypt has been turned to be configured with pkg-config instead
of libgcrypt-config, but qemu configure script does not contain pkg-config
related part for libgcrypt to handle it.

Signed-off-by: He Zhe 
---
 meta/recipes-devtools/qemu/qemu.inc|  1 +
 ...ure-Add-pkg-config-handling-for-libgcrypt.patch | 93 ++
 2 files changed, 94 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index d2dd2bc..3eeba6e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -22,6 +22,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0007-apic-fixup-fallthrough-to-PIC.patch \

file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
file://0009-Fix-webkitgtk-builds.patch \
+   file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
"
 UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar"
 
diff --git 
a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
 
b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
new file mode 100644
index 000..a8ab7da
--- /dev/null
+++ 
b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -0,0 +1,93 @@
+From 5214dd4461f2090ef0965b4d2518f49927d61cbc Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 28 Aug 2019 19:56:28 +0800
+Subject: [Qemu-devel] [PATCH] configure: Add pkg-config handling for libgcrypt
+
+libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
+handling for libgcrypt.
+
+Upstream-Status: Denied 
[https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html]
+
+Signed-off-by: He Zhe 
+---
+ configure | 48 
+ 1 file changed, 40 insertions(+), 8 deletions(-)
+
+diff --git a/configure b/configure
+index e44e454..0f362a7 100755
+--- a/configure
 b/configure
+@@ -2875,6 +2875,30 @@ has_libgcrypt() {
+ return 0
+ }
+ 
++has_libgcrypt_pkgconfig() {
++if ! has $pkg_config ; then
++return 1
++fi
++
++if ! $pkg_config --list-all | grep libgcrypt > /dev/null 2>&1 ; then
++return 1
++fi
++
++if test -n "$cross_prefix" ; then
++host=$($pkg_config --variable=host libgcrypt)
++if test "${host%-gnu}-" != "${cross_prefix%-gnu}" ; then
++print_error "host($host) does not match 
cross_prefix($cross_prefix)"
++return 1
++fi
++fi
++
++if ! $pkg_config --atleast-version=1.5.0 libgcrypt ; then
++print_error "libgcrypt version is $($pkg_config --modversion 
libgcrypt)"
++return 1
++fi
++
++return 0
++}
+ 
+ if test "$nettle" != "no"; then
+ pass="no"
+@@ -2902,7 +2926,14 @@ fi
+ 
+ if test "$gcrypt" != "no"; then
+ pass="no"
+-if has_libgcrypt; then
++if has_libgcrypt_pkgconfig; then
++gcrypt_cflags=$($pkg_config --cflags libgcrypt)
++if test "$static" = "yes" ; then
++gcrypt_libs=$($pkg_config --libs --static libgcrypt)
++else
++gcrypt_libs=$($pkg_config --libs libgcrypt)
++fi
++elif has_libgcrypt; then
+ gcrypt_cflags=$(libgcrypt-config --cflags)
+ gcrypt_libs=$(libgcrypt-config --libs)
+ # Debian has removed -lgpg-error from libgcrypt-config
+@@ -2912,15 +2943,16 @@ if test "$gcrypt" != "no"; then
+ then
+ gcrypt_libs="$gcrypt_libs -lgpg-error"
+ fi
++fi
+ 
+-# Link test to make sure the given libraries work (e.g for static).
+-write_c_skeleton
+-if compile_prog "" "$gcrypt_libs" ; then
+-LIBS="$gcrypt_libs $LIBS"
+-QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags"
+-pass="yes"
+-fi
++# Link test to make sure the given libraries work (e.g for static).
++write_c_skeleton
++if compile_prog "" "$gcrypt_libs" ; then
++  LIBS="$gcrypt_libs $LIBS"
++  QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags"
++  pass="yes"
+ fi
++
+ if test "$pass" = "yes"; then
+ gcrypt="yes"
+ cat > $TMPC << EOF
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: cve/meltdown.c: Fix kernel symbol finding

2019-08-28 Thread zhe.he
From: He Zhe 

Backport a patch to fix the following error.
safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272

Signed-off-by: He Zhe 
---
v2: Adjust context based on top of ltp in oe-core

 ...-cve-meltdown.c-Fix-kernel-symbol-finding.patch | 81 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
 
b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
new file mode 100644
index 000..94f6f5a
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
@@ -0,0 +1,81 @@
+From fbeda82f440a0098be42dd668cbc47212a86ab48 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Aug 2019 16:27:24 +0800
+Subject: [PATCH] cve/meltdown.c: Fix kernel symbol finding
+
+meltdown case fails as below.
+safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272
+
+find_kernel_symbol is defined to try twice with each of /proc/kallsyms and
+/boot/System.map-%s. Currently if the symbol is not found in /proc/kallsyms,
+when kernel option CONFIG_KALLSYMS_ALL is disabled, it would stop the case
+immediately due to SAFE_FILE_LINES_SCANF.
+
+This patch turns to use FILE_LINES_SCANF to give find_kernel_symbol second
+chance.
+
+[jstancek] Fix also condition introduced in 7709d2ae92ea, even if
+   /proc/kallsyms is disabled, we still want to try System.map.
+
+Signed-off-by: He Zhe 
+Signed-off-by: Jan Stancek 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/c2049b5c874bc071f8185bffb5fd7dcb042d9ec8]
+
+Remove the hunk for upstream 7709d2ae92ea ("cve/meltdown.c: abort the test if 
kallsyms was not enabled")
+that has been covered by this patch.
+
+Signed-off-by: He Zhe 
+---
+ testcases/cve/meltdown.c | 13 ++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c
+index a53ea9b..22651a6 100644
+--- a/testcases/cve/meltdown.c
 b/testcases/cve/meltdown.c
+@@ -267,9 +267,15 @@ find_symbol_in_file(const char *filename, const char 
*symname)
+   int ret, read;
+   char fmt[strlen(symname) + 64];
+ 
++  tst_res(TINFO, "Looking for %s in %s", symname, filename);
++  if (access(filename, F_OK) == -1) {
++  tst_res(TINFO, "%s not available", filename);
++  return 0;
++  }
++
+   sprintf(fmt, "%%lx %%c %s%%c", symname);
+ 
+-  ret = SAFE_FILE_LINES_SCANF(filename, fmt, , , );
++  ret = FILE_LINES_SCANF(filename, fmt, , , );
+   if (ret)
+   return 0;
+ 
+@@ -287,13 +293,11 @@ find_kernel_symbol(const char *name)
+   if (addr)
+   return addr;
+ 
+-  tst_res(TINFO, "not found '%s' in /proc/kallsyms", name);
+   if (uname() < 0)
+   tst_brk(TBROK | TERRNO, "uname");
+ 
+   sprintf(systemmap, "/boot/System.map-%s", utsname.release);
+ 
+-  tst_res(TINFO, "looking in '%s'\n", systemmap);
+   addr = find_symbol_in_file(systemmap, name);
+   return addr;
+ }
+@@ -308,6 +312,9 @@ static void setup(void)
+   saved_cmdline_addr = find_kernel_symbol("saved_command_line");
+   tst_res(TINFO, "_command_line == 0x%lx", saved_cmdline_addr);
+ 
++  if (!saved_cmdline_addr)
++  tst_brk(TCONF, "saved_command_line not found");
++
+   spec_fd = SAFE_OPEN("/proc/cmdline", O_RDONLY);
+ 
+   memset(target_array, 1, sizeof(target_array));
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index b0e2f96..76c45f0 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0002-check-for-RES_USE_INET6-during-configure.patch \

file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
+   file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] qemu: Fix build failure with packageconfig libcurl

2019-08-27 Thread zhe.he
From: He Zhe 

ERROR: Nothing PROVIDES 'libcurl' (but
/build/layers/oe-core/meta/recipes-kernel/perf/perf.bb DEPENDS on or otherwise
requires it).

The name of build dependency of packageconfig libcurl should be curl.

Signed-off-by: He Zhe 
---
 meta/recipes-devtools/qemu/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index d2dd2bc..ad46d18 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -131,7 +131,7 @@ PACKAGECONFIG[xen] = 
"--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenc
 PACKAGECONFIG[vnc-sasl] = "--enable-vnc 
--enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
 PACKAGECONFIG[vnc-jpeg] = "--enable-vnc 
--enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
 PACKAGECONFIG[vnc-png] = "--enable-vnc 
--enable-vnc-png,--disable-vnc-png,libpng,"
-PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
+PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
 PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
 PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
 PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: cve/meltdown.c: Fix kernel symbol finding

2019-08-26 Thread zhe.he
From: He Zhe 

Backport a patch to fix the following error.
safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272

Signed-off-by: He Zhe 
---
 ...-cve-meltdown.c-Fix-kernel-symbol-finding.patch | 83 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 84 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
 
b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
new file mode 100644
index 000..c639c40
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch
@@ -0,0 +1,83 @@
+From c2049b5c874bc071f8185bffb5fd7dcb042d9ec8 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Aug 2019 16:27:24 +0800
+Subject: [PATCH] cve/meltdown.c: Fix kernel symbol finding
+
+meltdown case fails as below.
+safe_file_ops.c:219: BROK: Expected 3 conversions got 2 at meltdown.c:272
+
+find_kernel_symbol is defined to try twice with each of /proc/kallsyms and
+/boot/System.map-%s. Currently if the symbol is not found in /proc/kallsyms,
+when kernel option CONFIG_KALLSYMS_ALL is disabled, it would stop the case
+immediately due to SAFE_FILE_LINES_SCANF.
+
+This patch turns to use FILE_LINES_SCANF to give find_kernel_symbol second
+chance.
+
+[jstancek] Fix also condition introduced in 7709d2ae92ea, even if
+   /proc/kallsyms is disabled, we still want to try System.map.
+
+Upstream-Status: Backport  
  
+[https://github.com/linux-test-project/ltp/commit/c2049b5c874bc071f8185bffb5fd7dcb042d9ec8]
+
+Signed-off-by: He Zhe 
+Signed-off-by: Jan Stancek 
+---
+ testcases/cve/meltdown.c | 18 ++
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c
+index f78c38b..863f1a9 100644
+--- a/testcases/cve/meltdown.c
 b/testcases/cve/meltdown.c
+@@ -253,9 +253,15 @@ find_symbol_in_file(const char *filename, const char 
*symname)
+   int ret, read;
+   char fmt[strlen(symname) + 64];
+ 
++  tst_res(TINFO, "Looking for %s in %s", symname, filename);
++  if (access(filename, F_OK) == -1) {
++  tst_res(TINFO, "%s not available", filename);
++  return 0;
++  }
++
+   sprintf(fmt, "%%lx %%c %s%%c", symname);
+ 
+-  ret = SAFE_FILE_LINES_SCANF(filename, fmt, , , );
++  ret = FILE_LINES_SCANF(filename, fmt, , , );
+   if (ret)
+   return 0;
+ 
+@@ -269,20 +275,13 @@ find_kernel_symbol(const char *name)
+   struct utsname utsname;
+   unsigned long addr;
+ 
+-  if (access("/proc/kallsyms", F_OK) == -1)
+-  tst_brk(TCONF, "/proc/kallsyms not enabled");
+-
+   addr = find_symbol_in_file("/proc/kallsyms", name);
+   if (addr)
+   return addr;
+ 
+-  tst_res(TINFO, "not found '%s' in /proc/kallsyms", name);
+   if (uname() < 0)
+   tst_brk(TBROK | TERRNO, "uname");
+-
+   sprintf(systemmap, "/boot/System.map-%s", utsname.release);
+-
+-  tst_res(TINFO, "looking in '%s'\n", systemmap);
+   addr = find_symbol_in_file(systemmap, name);
+   return addr;
+ }
+@@ -297,6 +296,9 @@ static void setup(void)
+   saved_cmdline_addr = find_kernel_symbol("saved_command_line");
+   tst_res(TINFO, "_command_line == 0x%lx", saved_cmdline_addr);
+ 
++  if (!saved_cmdline_addr)
++  tst_brk(TCONF, "saved_command_line not found");
++
+   spec_fd = SAFE_OPEN("/proc/cmdline", O_RDONLY);
+ 
+   memset(target_array, 1, sizeof(target_array));
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index b0e2f96..76c45f0 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0002-check-for-RES_USE_INET6-during-configure.patch \

file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
+   file://0001-cve-meltdown.c-Fix-kernel-symbol-finding.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [oe-core] [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches

2019-08-23 Thread zhe.he
From: He Zhe 

Add a patch to fix the following failure.
rt_sigtimedwait011  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
(.../sigwaitinfo01.c: 148): Unexpected failure:
TEST_ERRNO=EINVAL(22): Invalid argument

Signed-off-by: He Zhe 
---
 ..._sigwaitinfo01-Fix-failure-for-MIPS-arche.patch | 49 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
new file mode 100644
index 000..9a0df74
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
@@ -0,0 +1,49 @@
+From b4193bc3fdeb278abc54944b4773ffa45ee432af Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Fri, 23 Aug 2019 14:34:43 +0800
+Subject: [LTP] [PATCH] syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
+
+rt_sigtimedwait01 fails as follow on MIPS arches
+rt_sigtimedwait011  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
+(.../sigwaitinfo01.c: 148): Unexpected failure:
+TEST_ERRNO=EINVAL(22): Invalid argument
+
+As this case purposely bypasses glibc, it should align with the size of kernel
+definition of sigset_t which is different from other arches.
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
+
+This patch adds specific case for MIPS.
+
+Upstream-Status: Submitted 
[http://lists.linux.it/pipermail/ltp/2019-August/013313.html]
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 13 ++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c 
b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+index 5a32ce1..5c2fa99 100644
+--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
 b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+@@ -128,9 +128,16 @@ static int my_sigtimedwait(const sigset_t * set, 
siginfo_t * info,
+ static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ struct timespec *timeout)
+ {
+-
+-  /* The last argument is (number_of_signals)/(bits_per_byte), which are 
64 and 8, resp. */
+-  return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
++  /* The last argument is (number_of_signals)/(bits_per_byte), which are 
64 and 8, resp,
++   * except for MIPS which are 128 and 8, resp.
++   */
++  return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout,
++#ifdef __mips__
++  16
++#else
++  8
++#endif
++  );
+ }
+ #endif
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index b0e2f96..14c1219 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0002-check-for-RES_USE_INET6-during-configure.patch \

file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
+   
file://0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [oe-core][PATCH 2/2] ltp: Fix ustat02 failure

2019-08-19 Thread zhe.he
From: He Zhe 

Backport a patch to fix the following failure.
ustat02.c:44: FAIL: ustat(2) failed to produce expected error; 14, errno: 
EFAULT: EINVAL

Signed-off-by: He Zhe 
---
 ...02-Fix-EFAULT-in-32bit-compatibility-mode.patch | 36 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
 
b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
new file mode 100644
index 000..c936b78
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
@@ -0,0 +1,36 @@
+From 156776a3e29491b363fdc9811912e1298655d060 Mon Sep 17 00:00:00 2001
+From: Steven Price 
+Date: Fri, 19 Jul 2019 13:48:17 +0100
+Subject: [PATCH] ustat02: Fix EFAULT in 32bit compatibility mode
+
+The size of dev_t is larger than 32 bits which causes the dev argument
+to be passed incorrectly. On Arm this means that the EFAULT test case
+actually returns EINVAL because the device number isn't recognised.
+
+Signed-off-by: Steven Price 
+Acked-by: Li Wang 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/156776a3e29491b363fdc9811912e1298655d060]
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/ustat/ustat02.c 
b/testcases/kernel/syscalls/ustat/ustat02.c
+index 9bbe4f3..1a0e9e0 100644
+--- a/testcases/kernel/syscalls/ustat/ustat02.c
 b/testcases/kernel/syscalls/ustat/ustat02.c
+@@ -36,7 +36,7 @@ int TST_TOTAL = ARRAY_SIZE(tc);
+ 
+ void run(unsigned int test)
+ {
+-  TEST(tst_syscall(__NR_ustat, *tc[test].dev, tc[test].buf));
++  TEST(tst_syscall(__NR_ustat, (unsigned int)*tc[test].dev, 
tc[test].buf));
+ 
+   if ((TST_RET == -1) && (TST_ERR == tc[test].exp_errno))
+   tst_res(TPASS | TTERRNO, "ustat(2) expected failure");
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index f6c7de6..b0e2f96 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \
file://0002-check-for-RES_USE_INET6-during-configure.patch \

file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
+   file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [oe-core][PATCH 1/2] ltp: Fix tgkill03 failure

2019-08-19 Thread zhe.he
From: He Zhe 

Backport a patch to fix the followig failure.
tgkill03.c:94: FAIL: Defunct tid should have failed with ESRCH: SUCCESS

Signed-off-by: He Zhe 
---
 ...kill03-wait-for-defunct-tid-to-get-detach.patch | 75 ++
 meta/recipes-extended/ltp/ltp_20190517.bb  |  1 +
 2 files changed, 76 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch
new file mode 100644
index 000..6ea2615
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch
@@ -0,0 +1,75 @@
+From e747d0456adc080a1d31fb653bda9dc491795c80 Mon Sep 17 00:00:00 2001
+From: Jan Stancek 
+Date: Sun, 16 Jun 2019 11:14:16 +0200
+Subject: [PATCH] syscalls/tgkill03: wait for defunct tid to get detached
+
+Case where defunct tid is used has been observed to sporadically fail:
+  tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS
+
+glibc __pthread_timedjoin_ex() waits for CLONE_CHILD_CLEARTID to clear tid,
+and then resumes. Kernel clears it (glibc pd->tid) at:
+  do_exit
+exit_mm
+  mm_release
+put_user(0, tsk->clear_child_tid);
+
+but kernel tid is still valid, presumably until:
+  release_task
+__exit_signal
+  __unhash_process
+detach_pid
+
+To avoid race wait until /proc//task/ disappears.
+
+Signed-off-by: Jan Stancek 
+Reviewed-by: Li Wang 
+Acked-by: Sumit Garg 
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/e747d0456adc080a1d31fb653bda9dc491795c80]
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/tgkill/tgkill03.c | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/tgkill/tgkill03.c 
b/testcases/kernel/syscalls/tgkill/tgkill03.c
+index f5bbdc5..593a217 100644
+--- a/testcases/kernel/syscalls/tgkill/tgkill03.c
 b/testcases/kernel/syscalls/tgkill/tgkill03.c
+@@ -7,6 +7,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ 
+ #include "tst_safe_pthread.h"
+@@ -42,6 +43,7 @@ static void setup(void)
+ {
+   sigset_t sigusr1;
+   pthread_t defunct_thread;
++  char defunct_tid_path[PATH_MAX];
+ 
+   sigemptyset();
+   sigaddset(, SIGUSR1);
+@@ -55,8 +57,9 @@ static void setup(void)
+   TST_CHECKPOINT_WAIT(0);
+ 
+   SAFE_PTHREAD_CREATE(_thread, NULL, defunct_thread_func, NULL);
+-
+   SAFE_PTHREAD_JOIN(defunct_thread, NULL);
++  sprintf(defunct_tid_path, "/proc/%d/task/%d", getpid(), defunct_tid);
++  TST_RETRY_FN_EXP_BACKOFF(access(defunct_tid_path, R_OK), -1, 15);
+ }
+ 
+ static void cleanup(void)
+@@ -108,4 +111,5 @@ static struct tst_test test = {
+   .setup = setup,
+   .cleanup = cleanup,
+   .test = run,
++  .timeout = 20,
+ };
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb 
b/meta/recipes-extended/ltp/ltp_20190517.bb
index c62f261..f6c7de6 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -43,6 +43,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch \

file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \
file://0002-check-for-RES_USE_INET6-during-configure.patch \
+   
file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel: qemuarmv5: Update machine overrides of KERNEL_DEVICETREE

2019-06-18 Thread zhe.he
From: He Zhe 

The original BSP qemuarm has been renamed to qemuarmv5. Update the machine
overrides accordingly to avoid not generating dtb.

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/linux/linux-yocto-dev.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb| 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb  | 2 +-
 meta/recipes-kernel/linux/linux-yocto_4.19.bb  | 2 +-
 meta/recipes-kernel/linux/linux-yocto_5.0.bb   | 1 -
 7 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb 
b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 3a055c1..8c83620 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -41,7 +41,7 @@ DEPENDS += "openssl-native util-linux-native"
 
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
 # Functionality flags
 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc 
features/taskstats/taskstats.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
index 0836dc7..a4facfe 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
@@ -33,7 +33,7 @@ LINUX_KERNEL_TYPE = "preempt-rt"
 
 COMPATIBLE_MACHINE = 
"(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
 # Functionality flags
 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc 
features/taskstats/taskstats.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
index b5e415f..8bd9d74 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
@@ -33,7 +33,7 @@ LINUX_KERNEL_TYPE = "preempt-rt"
 
 COMPATIBLE_MACHINE = 
"(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
 # Functionality flags
 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc 
features/taskstats/taskstats.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
index 4ca11d7..e668854 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
@@ -29,4 +29,4 @@ COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
 # Functionality flags
 KERNEL_FEATURES = ""
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
index a9c463c..226a90c 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
@@ -29,4 +29,4 @@ COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
 # Functionality flags
 KERNEL_FEATURES = ""
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.19.bb 
b/meta/recipes-kernel/linux/linux-yocto_4.19.bb
index cda4ecf..014d689 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.19.bb
@@ -36,7 +36,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
 COMPATIBLE_MACHINE = 
"qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.0.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.0.bb
index 8aec315..bb7ed56 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.0.bb
@@ -38,7 +38,6 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
 KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
 COMPATIBLE_MACHINE = 
"qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] lttng-modules: Add git based recipe

2019-06-17 Thread zhe.he
From: He Zhe 

The git based recipe is for those who want to build lttng-modules with bleeding
edge kernel, to avoid regularly backporting patches from upstream.

Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
the tar ball one.

Signed-off-by: He Zhe 
---
v2: Correct a typo in SOB in 0001
v3: Use devupstream to make it more clean and clear
v4: Use top commit ID instead of AUTOREV, update license checksum, update 
branch in SRCREV and PV

 meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
index c1cc339..6e2d655 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
@@ -11,7 +11,6 @@ inherit module
 
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 
-#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
@@ -34,3 +33,13 @@ python do_package_prepend() {
 bb.warn("%s: no modules were created; this may be due to 
CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
 }
 
+BBCLASSEXTEND = "devupstream:target"
+LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3"
+DEFAULT_PREFERENCE_class-devupstream = "-1"
+SRC_URI_class-devupstream = 
"git://git.lttng.org/lttng-modules;branch=stable-2.10 \
+   file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+   file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+   "
+SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
+PV_class-devupstream = "2.10.10+git${SRCPV}"
+S_class-devupstream = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] lttng-modules: Add git based recipe

2019-06-12 Thread zhe.he
From: He Zhe 

The git based recipe is for those who want to build lttng-modules with bleeding
edge kernel, to avoid regularly backporting patches from upstream.

Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
the tar ball one.

Signed-off-by: He Zhe 
---
v2: Correct a typo in SOB in 0001
v3: Use devupstream to make it more clean and clear

 meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
index 70a6843..dfd166a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
@@ -11,7 +11,6 @@ inherit module
 
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 
-#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
@@ -34,3 +33,13 @@ python do_package_prepend() {
 bb.warn("%s: no modules were created; this may be due to 
CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
 }
 
+BBCLASSEXTEND = "devupstream:target"
+LIC_FILES_CHKSUM_class-devupstream = 
"file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
+DEFAULT_PREFERENCE_class-devupstream = "-1"
+SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
+   file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+   file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+   "
+SRCREV_class-devupstream = "${AUTOREV}"
+PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
+S_class-devupstream = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: Add git based recipe

2019-06-12 Thread zhe.he
From: He Zhe 

This is based on meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb and is for
those who want to build lttng-modules with bleeding edge kernel, to avoid
regularly backporting patches from upstream.

Note that PREFERRED_VERSION needs to be set to select this recipe instead of the
tar ball one.

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/lttng/lttng-modules_git.bb | 34 ++
 1 file changed, 34 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules_git.bb

diff --git a/meta/recipes-kernel/lttng/lttng-modules_git.bb 
b/meta/recipes-kernel/lttng/lttng-modules_git.bb
new file mode 100644
index 000..966d342
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules_git.bb
@@ -0,0 +1,34 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
+DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer 
modules"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128 \
+"
+DEFAULT_PREFERENCE = "-1"
+
+inherit module
+
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
+
+SRC_URI = "git://git.lttng.org/lttng-modules;branch=master \
+   file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+   file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+   "
+SRCREV = "${AUTOREV}"
+PV = "2.11.0-rc+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+export INSTALL_MOD_DIR="kernel/lttng-modules"
+
+EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
+
+do_install_append() {
+   # Delete empty directories to avoid QA failures if no modules were built
+   find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+if not os.path.exists(os.path.join(d.getVar('D'), 
d.getVar('nonarch_base_libdir')[1:], 'modules')):
+bb.warn("%s: no modules were created; this may be due to 
CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
+}
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] lttng-modules: Backport patches to fix compilation failures since kernel v5.1

2019-06-11 Thread zhe.he
From: He Zhe 

For the moment,
0001~0004 are on master branch only.
0005~0007 are on stable-2.11 branch, but v2.11 has not been released yet.

Signed-off-by: He Zhe 
---
v2: Correct a typo in SOB for 0001*.patch

 ...ove-wrapper-definitions-for-obsolete-RCU..patch |  47 
 ...ix-timer-trace-Improve-timer-tracing-v5.2.patch |  80 +++
 .../0003-Fix-pipe-stop-using-can_merge-v5.1.patch  |  42 
 ...ix-mm-create-the-new-vm_fault_t-type-v5.1.patch |  65 ++
 ...an-drop-may_writepage-and-classzone_idx-f.patch |  92 
 ...only-read-from-dev-random-after-its-pool-.patch |  76 ++
 ...start-and-number-from-syscall_get_argumen.patch | 259 +
 meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb  |   7 +
 8 files changed, 668 insertions(+)
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0003-Fix-pipe-stop-using-can_merge-v5.1.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0004-Fix-mm-create-the-new-vm_fault_t-type-v5.1.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0005-fix-mm-vmscan-drop-may_writepage-and-classzone_idx-f.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-only-read-from-dev-random-after-its-pool-.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0007-Fix-Remove-start-and-number-from-syscall_get_argumen.patch

diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
new file mode 100644
index 000..de572a9
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
@@ -0,0 +1,47 @@
+From 92da05ce1f73488a57e7fd79e9c03113cefdb76f Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Mon, 18 Mar 2019 16:20:33 -0400
+Subject: [PATCH] Fix: rcu: Remove wrapper definitions for obsolete RCU...
+ (v5.1)
+
+See upstream commit :
+
+commit 6ba7d681aca22e53385bdb35b1d7662e61905760
+Author: Paul E. McKenney 
+Date:   Wed Jan 9 15:22:03 2019 -0800
+
+rcu: Remove wrapper definitions for obsolete RCU update functions
+
+None of synchronize_rcu_bh, synchronize_rcu_bh_expedited, call_rcu_bh,
+rcu_barrier_bh, synchronize_sched, synchronize_sched_expedited,
+call_rcu_sched, rcu_barrier_sched, get_state_synchronize_sched, and
+cond_synchronize_sched are actually used.  This commit therefore removes
+their trivial wrapper-function definitions.
+
+Signed-off-by: Mathieu Desnoyers 
+Upstream-Status: Backport
+Signed-off-by: He Zhe 
+---
+ lttng-events.c | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lttng-events.c b/lttng-events.c
+index 566080a..f4206c5 100644
+--- a/lttng-events.c
 b/lttng-events.c
+@@ -75,7 +75,12 @@ int _lttng_field_statedump(struct lttng_session *session,
+ 
+ void synchronize_trace(void)
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
++  synchronize_rcu();
++#else
+   synchronize_sched();
++#endif
++
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ #ifdef CONFIG_PREEMPT_RT_FULL
+   synchronize_rcu();
+-- 
+2.7.4
+
diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
new file mode 100644
index 000..e782ee0
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
@@ -0,0 +1,80 @@
+From d88e2fe5c3ea0d2c3055fba824be17223c418854 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Tue, 21 May 2019 16:33:10 -0400
+Subject: [PATCH] fix: timer/trace: Improve timer tracing (v5.2)
+
+See upstream commit:
+
+  commit f28d3d5346e97e60c81f933ac89ccf015430e5cf
+  Author: Anna-Maria Gleixner 
+  Date:   Thu Mar 21 13:09:21 2019 +0100
+
+timer/trace: Improve timer tracing
+
+Timers are added to the timer wheel off by one. This is required in
+case a timer is queued directly before incrementing jiffies to prevent
+early timer expiry.
+
+When reading a timer trace and relying only on the expiry time of the timer
+in the timer_start trace point and on the now in the timer_expiry_entry
+trace point, it seems that the timer fires late. With the current
+timer_expiry_entry trace point information only now=jiffies is printed but
+not the value of base->clk. This makes it impossible to draw a conclusion
+to the index of base->clk and makes it impossible to examine timer problems
+without additional trace points.
+
+Therefore add the base->clk value to the timer_expire_entry trace
+

[OE-core] [PATCH] lttng-modules: Backport patches to fix compilation failures since kernel v5.1

2019-06-11 Thread zhe.he
From: He Zhe 

For the moment,
0001~0004 are on master branch only.
0005~0007 are on stable-2.11 branch, but v2.11 has not been released yet.

Signed-off-by: He Zhe 
---
 ...ove-wrapper-definitions-for-obsolete-RCU..patch |  47 
 ...ix-timer-trace-Improve-timer-tracing-v5.2.patch |  80 +++
 .../0003-Fix-pipe-stop-using-can_merge-v5.1.patch  |  42 
 ...ix-mm-create-the-new-vm_fault_t-type-v5.1.patch |  65 ++
 ...an-drop-may_writepage-and-classzone_idx-f.patch |  92 
 ...only-read-from-dev-random-after-its-pool-.patch |  76 ++
 ...start-and-number-from-syscall_get_argumen.patch | 259 +
 meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb  |   7 +
 8 files changed, 668 insertions(+)
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0003-Fix-pipe-stop-using-can_merge-v5.1.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0004-Fix-mm-create-the-new-vm_fault_t-type-v5.1.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0005-fix-mm-vmscan-drop-may_writepage-and-classzone_idx-f.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-only-read-from-dev-random-after-its-pool-.patch
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0007-Fix-Remove-start-and-number-from-syscall_get_argumen.patch

diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
new file mode 100644
index 000..385af52
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-rcu-Remove-wrapper-definitions-for-obsolete-RCU..patch
@@ -0,0 +1,47 @@
+From 92da05ce1f73488a57e7fd79e9c03113cefdb76f Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Mon, 18 Mar 2019 16:20:33 -0400
+Subject: [PATCH] Fix: rcu: Remove wrapper definitions for obsolete RCU...
+ (v5.1)
+
+See upstream commit :
+
+commit 6ba7d681aca22e53385bdb35b1d7662e61905760
+Author: Paul E. McKenney 
+Date:   Wed Jan 9 15:22:03 2019 -0800
+
+rcu: Remove wrapper definitions for obsolete RCU update functions
+
+None of synchronize_rcu_bh, synchronize_rcu_bh_expedited, call_rcu_bh,
+rcu_barrier_bh, synchronize_sched, synchronize_sched_expedited,
+call_rcu_sched, rcu_barrier_sched, get_state_synchronize_sched, and
+cond_synchronize_sched are actually used.  This commit therefore removes
+their trivial wrapper-function definitions.
+
+Signed-off-by: Mathieu Desnoyers 
+Upstream-Status: Backport
+igned-off-by: He Zhe 
+---
+ lttng-events.c | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lttng-events.c b/lttng-events.c
+index 566080a..f4206c5 100644
+--- a/lttng-events.c
 b/lttng-events.c
+@@ -75,7 +75,12 @@ int _lttng_field_statedump(struct lttng_session *session,
+ 
+ void synchronize_trace(void)
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
++  synchronize_rcu();
++#else
+   synchronize_sched();
++#endif
++
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ #ifdef CONFIG_PREEMPT_RT_FULL
+   synchronize_rcu();
+-- 
+2.7.4
+
diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
new file mode 100644
index 000..e782ee0
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-timer-trace-Improve-timer-tracing-v5.2.patch
@@ -0,0 +1,80 @@
+From d88e2fe5c3ea0d2c3055fba824be17223c418854 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Tue, 21 May 2019 16:33:10 -0400
+Subject: [PATCH] fix: timer/trace: Improve timer tracing (v5.2)
+
+See upstream commit:
+
+  commit f28d3d5346e97e60c81f933ac89ccf015430e5cf
+  Author: Anna-Maria Gleixner 
+  Date:   Thu Mar 21 13:09:21 2019 +0100
+
+timer/trace: Improve timer tracing
+
+Timers are added to the timer wheel off by one. This is required in
+case a timer is queued directly before incrementing jiffies to prevent
+early timer expiry.
+
+When reading a timer trace and relying only on the expiry time of the timer
+in the timer_start trace point and on the now in the timer_expiry_entry
+trace point, it seems that the timer fires late. With the current
+timer_expiry_entry trace point information only now=jiffies is printed but
+not the value of base->clk. This makes it impossible to draw a conclusion
+to the index of base->clk and makes it impossible to examine timer problems
+without additional trace points.
+
+Therefore add the base->clk value to the timer_expire_entry trace
+point, to be able to calculate the index the 

[OE-core] [PATCH] systemd: Bump up SRCREV to systemd-stable top to include the fix for shutdown now hang

2019-05-09 Thread zhe.he
From: He Zhe 

"shutdown now" makes systemd hang at the following line.
[  OK  ] Stopped Session c1 of user root.

It's already been fixed by 03cb25525423 ("socket-util: make sure flush_accept() 
doesn't hang on unexpected EOPNOTSUPP")

Signed-off-by: He Zhe 
---
 meta/recipes-core/systemd/systemd.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 193087a..3a353b0 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "1e5d2d656420d0e755dbcf72aeba3c3aba54e956"
+SRCREV = "db2e367bfc3b119609f837eb973d915f6c550b2f"
 SRCBRANCH = "v242-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Review request 0/1: LIN1019-1252 run 'shutdown -P now' on vm and shutdown failed

2019-05-09 Thread zhe.he
From: zhe...@windriver.com Mon Sep 17 00:00:00 2001

Summary: LIN1019-1252 run 'shutdown -P now' on vm and shutdown failed
Tech Review: Qi Chen
Gatekeeper: Robert
Lockdown Approval (if needed): 
Branch Tag: wr-10.19-20190505

IP Statement (form link or license statement, usually automated):
Crypto URL(s) (if needed): see 
http://wiki.wrs.com/PBUeng/LinuxProductDivisionExportProcess
Parent Template (where applicable):


== Sanity Issues: (DO NOT EDIT this section) ==



== Impacted area Impact y/n ==
docs/tech-pubs  n
tests   n
build systemn
host dependencies   n
RPM/packaging   n
toolchain   n
kernel code n
user code   y
configuration files n
target configurationn
Applicable to Yocto/upstreamn
New Kernel Warnings n
Other   n


== Comments (indicate scope for each "y" above) ==
* Conditions of submission

* Documentation Changes/Release Notes
  = Doc changes

  = Release notes

* Git logs


== Testing ==
* Commands
setup.sh --machine qemux86-64 --distro wrlinux --dl-layers
. ./oe-init-build-env
bitbake wrlinux-image-glibc-std
runqemu qemux86-64 nographic
root
shutdown now

* Expected Results
shut down successfully

* Applicable to

* Tested configurations

  Archbuilt  boot boardname
  -
  MIPS  n n
  MIPS64n n
  MIPS64n32 n n
  ARM32 n n
  ARM64 n n
  x86   n n
  x86_64n y   22015
  PPC   n n
  PPC64 n n
  SPARC64   n n


== Reviewer Checklist ==
[Submitters: make sure that your review doesn't trigger any checkmarks!]
http://lxgit.wrs.com/cgit/bin.git/tree/etc/review.txt


== PULLs ==
* The branch is made of: __
  git://128.224.158.51/git/oe-core zhe/wr-10.19-20190505__1__20190509174633

* WRH-PULLs ("wrh -m" can merge it):
  git://128.224.158.51/git/oe-core__s__zhe/wr-10.19-20190505__1__20190509174633
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: file01: Fix in was not recognized

2019-04-22 Thread zhe.he
From: He Zhe 

Some file has "pie" appending after LSB or MSB, which causes mismatch and the
following error.

"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...

This patches tunes the regulation expression to include those cases.

Signed-off-by: He Zhe 
---
v1 to v2: Move Upstream-Status to right place

 .../0001-file01.sh-Fix-in-was-not-recognized.patch | 38 ++
 meta/recipes-extended/ltp/ltp_20190115.bb  |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch 
b/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch
new file mode 100644
index 000..5cd9e08
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch
@@ -0,0 +1,38 @@
+From 974e9b862e503c50501079e6586f81918e94a849 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Fri, 19 Apr 2019 17:57:48 +0800
+Subject: [PATCH] file01.sh: Fix in was not recognized
+
+Some file has "pie" appending after LSB or MSB, which causes mismatch and the
+following error.
+
+"file01 10 TFAIL: in: was not recognized"
+..."ELF 64-bit LSB pie executable"...
+
+This patches tunes the regulation expression to include those cases.
+
+Upstream-Status: Submitted 
[http://lists.linux.it/pipermail/ltp/2019-April/011758.html]
+
+Signed-off-by: He Zhe 
+---
+ testcases/commands/file/file01.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/commands/file/file01.sh 
b/testcases/commands/file/file01.sh
+index 0a8119e..55c0433 100755
+--- a/testcases/commands/file/file01.sh
 b/testcases/commands/file/file01.sh
+@@ -91,7 +91,9 @@ do_test()
+9) file_test in.m4 "M4 macro processor script, ASCII text" \
+   "ASCII M4 macro language pre-processor text";;
+   10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \
+-   "ELF .*-bit $TEST_ARCH shared object, .*";;
++   "ELF .*-bit $TEST_ARCH shared object, .*" \
++   "ELF .*-bit $TEST_ARCH pie executable, .*" \
++   "ELF .*-bit $TEST_ARCH pie shared object, .*";;
+   11) file_test in.ar "current ar archive";;
+   12) file_test in.tar "tar archive";;
+   13) file_test in.tar.gz "gzip compressed data, .*";;
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index 1d0c00b..a9e025a 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \

file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
+   file://0001-file01.sh-Fix-in-was-not-recognized.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: file01: Fix in was not recognized

2019-04-22 Thread zhe.he
From: He Zhe 

Some file has "pie" appending after LSB or MSB, which causes mismatch and the
following error.

"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...

This patches tunes the regulation expression to include those cases.

Upstream-Status: Submitted 
[http://lists.linux.it/pipermail/ltp/2019-April/011758.html]

Signed-off-by: He Zhe 
---
 .../0001-file01.sh-Fix-in-was-not-recognized.patch | 36 ++
 meta/recipes-extended/ltp/ltp_20190115.bb  |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch 
b/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch
new file mode 100644
index 000..c68f5dd
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-file01.sh-Fix-in-was-not-recognized.patch
@@ -0,0 +1,36 @@
+From 974e9b862e503c50501079e6586f81918e94a849 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Fri, 19 Apr 2019 17:57:48 +0800
+Subject: [PATCH] file01.sh: Fix in was not recognized
+
+Some file has "pie" appending after LSB or MSB, which causes mismatch and the
+following error.
+
+"file01 10 TFAIL: in: was not recognized"
+..."ELF 64-bit LSB pie executable"...
+
+This patches tunes the regulation expression to include those cases.
+
+Signed-off-by: He Zhe 
+---
+ testcases/commands/file/file01.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/commands/file/file01.sh 
b/testcases/commands/file/file01.sh
+index 0a8119e..55c0433 100755
+--- a/testcases/commands/file/file01.sh
 b/testcases/commands/file/file01.sh
+@@ -91,7 +91,9 @@ do_test()
+9) file_test in.m4 "M4 macro processor script, ASCII text" \
+   "ASCII M4 macro language pre-processor text";;
+   10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \
+-   "ELF .*-bit $TEST_ARCH shared object, .*";;
++   "ELF .*-bit $TEST_ARCH shared object, .*" \
++   "ELF .*-bit $TEST_ARCH pie executable, .*" \
++   "ELF .*-bit $TEST_ARCH pie shared object, .*";;
+   11) file_test in.ar "current ar archive";;
+   12) file_test in.tar "tar archive";;
+   13) file_test in.tar.gz "gzip compressed data, .*";;
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index 1d0c00b..a9e025a 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \

file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
+   file://0001-file01.sh-Fix-in-was-not-recognized.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] ltp: Fix setrlimit03 call succeeded unexpectedly

2019-04-19 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following error.
"setrlimit03.c:54: FAIL: call succeeded unexpectedly"

Signed-off-by: He Zhe 
---
v1 to v3: Add Upstream-Status and Signed-off-by

 ...trlimit03.c-read-proc-sys-fs-nr_open-for-.patch | 70 ++
 meta/recipes-extended/ltp/ltp_20190115.bb  |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
new file mode 100644
index 000..39623c3
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
@@ -0,0 +1,70 @@
+From db57ddc1497e72947da2b14f471ab521478ef99d Mon Sep 17 00:00:00 2001
+From: Tommi Rantala 
+Date: Thu, 31 Jan 2019 19:49:00 +0200
+Subject: [PATCH] syscalls/setrlimit03.c: read /proc/sys/fs/nr_open for
+ RLIMIT_NOFILE limit
+
+Since kernel v2.6.25 RLIMIT_NOFILE limit is no longer hardcoded to
+NR_OPEN, but can be set via /proc/sys/fs/nr_open, see kernel commit
+9cfe015aa424b3c003baba3841a60dd9b5ad319b ("get rid of NR_OPEN and
+introduce a sysctl_nr_open").
+
+nr_open default value is 1024*1024, so setrlimit03 has been passing fine
+on new kernels, only "unexpectedly succeeding" if nr_open is set to some
+larger value.
+
+Signed-off-by: Tommi Rantala 
+Reviewed-by: Cyril Hrubis 
+
+Upstream-Status: Backport [db57ddc1497e ("syscalls/setrlimit03.c: read 
/proc/sys/fs/nr_open for RLIMIT_NOFILE limit")]
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/setrlimit/setrlimit03.c | 13 +++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c 
b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+index 29b52aa..12455fe 100644
+--- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
 b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+@@ -35,7 +35,10 @@
+ # define NR_OPEN (1024*1024)
+ #endif
+ 
++#define NR_OPEN_PATH "/proc/sys/fs/nr_open"
++
+ static struct rlimit rlim1, rlim2;
++static unsigned int nr_open = NR_OPEN;
+ 
+ static struct tcase {
+   struct rlimit *rlimt;
+@@ -51,7 +54,10 @@ static void verify_setrlimit(unsigned int n)
+ 
+   TEST(setrlimit(RLIMIT_NOFILE, tc->rlimt));
+   if (TST_RET != -1) {
+-  tst_res(TFAIL, "call succeeded unexpectedly");
++  tst_res(TFAIL, "call succeeded unexpectedly "
++  "(nr_open=%u rlim_cur=%lu rlim_max=%lu)", nr_open,
++  (unsigned long)(tc->rlimt->rlim_cur),
++  (unsigned long)(tc->rlimt->rlim_max));
+   return;
+   }
+ 
+@@ -65,10 +71,13 @@ static void verify_setrlimit(unsigned int n)
+ 
+ static void setup(void)
+ {
++  if (!access(NR_OPEN_PATH, F_OK))
++  SAFE_FILE_SCANF(NR_OPEN_PATH, "%u", _open);
++
+   SAFE_GETRLIMIT(RLIMIT_NOFILE, );
+   rlim2.rlim_max = rlim1.rlim_cur;
+   rlim2.rlim_cur = rlim1.rlim_max + 1;
+-  rlim1.rlim_max = NR_OPEN + 1;
++  rlim1.rlim_max = nr_open + 1;
+ }
+ 
+ static struct tst_test test = {
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index ddf97e2..1d0c00b 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \
+   
file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: Fix setrlimit03 call succeeded unexpectedly

2019-04-19 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following error.
"setrlimit03.c:54: FAIL: call succeeded unexpectedly"

Signed-off-by: He Zhe 
---
 ...trlimit03.c-read-proc-sys-fs-nr_open-for-.patch | 67 ++
 meta/recipes-extended/ltp/ltp_20190115.bb  |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
new file mode 100644
index 000..3a689ca
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
@@ -0,0 +1,67 @@
+From db57ddc1497e72947da2b14f471ab521478ef99d Mon Sep 17 00:00:00 2001
+From: Tommi Rantala 
+Date: Thu, 31 Jan 2019 19:49:00 +0200
+Subject: [PATCH] syscalls/setrlimit03.c: read /proc/sys/fs/nr_open for
+ RLIMIT_NOFILE limit
+
+Since kernel v2.6.25 RLIMIT_NOFILE limit is no longer hardcoded to
+NR_OPEN, but can be set via /proc/sys/fs/nr_open, see kernel commit
+9cfe015aa424b3c003baba3841a60dd9b5ad319b ("get rid of NR_OPEN and
+introduce a sysctl_nr_open").
+
+nr_open default value is 1024*1024, so setrlimit03 has been passing fine
+on new kernels, only "unexpectedly succeeding" if nr_open is set to some
+larger value.
+
+Signed-off-by: Tommi Rantala 
+Reviewed-by: Cyril Hrubis 
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/setrlimit/setrlimit03.c | 13 +++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c 
b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+index 29b52aa..12455fe 100644
+--- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
 b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+@@ -35,7 +35,10 @@
+ # define NR_OPEN (1024*1024)
+ #endif
+ 
++#define NR_OPEN_PATH "/proc/sys/fs/nr_open"
++
+ static struct rlimit rlim1, rlim2;
++static unsigned int nr_open = NR_OPEN;
+ 
+ static struct tcase {
+   struct rlimit *rlimt;
+@@ -51,7 +54,10 @@ static void verify_setrlimit(unsigned int n)
+ 
+   TEST(setrlimit(RLIMIT_NOFILE, tc->rlimt));
+   if (TST_RET != -1) {
+-  tst_res(TFAIL, "call succeeded unexpectedly");
++  tst_res(TFAIL, "call succeeded unexpectedly "
++  "(nr_open=%u rlim_cur=%lu rlim_max=%lu)", nr_open,
++  (unsigned long)(tc->rlimt->rlim_cur),
++  (unsigned long)(tc->rlimt->rlim_max));
+   return;
+   }
+ 
+@@ -65,10 +71,13 @@ static void verify_setrlimit(unsigned int n)
+ 
+ static void setup(void)
+ {
++  if (!access(NR_OPEN_PATH, F_OK))
++  SAFE_FILE_SCANF(NR_OPEN_PATH, "%u", _open);
++
+   SAFE_GETRLIMIT(RLIMIT_NOFILE, );
+   rlim2.rlim_max = rlim1.rlim_cur;
+   rlim2.rlim_cur = rlim1.rlim_max + 1;
+-  rlim1.rlim_max = NR_OPEN + 1;
++  rlim1.rlim_max = nr_open + 1;
+ }
+ 
+ static struct tst_test test = {
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index ddf97e2..1d0c00b 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \
+   
file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix setrlimit03 call succeeded unexpectedly

2019-04-19 Thread zhe.he
From: He Zhe 

Backport a patch from upstream to fix the following error.
"setrlimit03.c:54: FAIL: call succeeded unexpectedly"

Signed-off-by: He Zhe 
---
 ...trlimit03.c-read-proc-sys-fs-nr_open-for-.patch | 66 ++
 meta/recipes-extended/ltp/ltp_20190115.bb  |  1 +
 2 files changed, 67 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
new file mode 100644
index 000..1191e88
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
@@ -0,0 +1,66 @@
+From db57ddc1497e72947da2b14f471ab521478ef99d Mon Sep 17 00:00:00 2001
+From: Tommi Rantala 
+Date: Thu, 31 Jan 2019 19:49:00 +0200
+Subject: [PATCH] syscalls/setrlimit03.c: read /proc/sys/fs/nr_open for
+ RLIMIT_NOFILE limit
+
+Since kernel v2.6.25 RLIMIT_NOFILE limit is no longer hardcoded to
+NR_OPEN, but can be set via /proc/sys/fs/nr_open, see kernel commit
+9cfe015aa424b3c003baba3841a60dd9b5ad319b ("get rid of NR_OPEN and
+introduce a sysctl_nr_open").
+
+nr_open default value is 1024*1024, so setrlimit03 has been passing fine
+on new kernels, only "unexpectedly succeeding" if nr_open is set to some
+larger value.
+
+Signed-off-by: Tommi Rantala 
+Reviewed-by: Cyril Hrubis 
+---
+ testcases/kernel/syscalls/setrlimit/setrlimit03.c | 13 +++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c 
b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+index 29b52aa..12455fe 100644
+--- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
 b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+@@ -35,7 +35,10 @@
+ # define NR_OPEN (1024*1024)
+ #endif
+ 
++#define NR_OPEN_PATH "/proc/sys/fs/nr_open"
++
+ static struct rlimit rlim1, rlim2;
++static unsigned int nr_open = NR_OPEN;
+ 
+ static struct tcase {
+   struct rlimit *rlimt;
+@@ -51,7 +54,10 @@ static void verify_setrlimit(unsigned int n)
+ 
+   TEST(setrlimit(RLIMIT_NOFILE, tc->rlimt));
+   if (TST_RET != -1) {
+-  tst_res(TFAIL, "call succeeded unexpectedly");
++  tst_res(TFAIL, "call succeeded unexpectedly "
++  "(nr_open=%u rlim_cur=%lu rlim_max=%lu)", nr_open,
++  (unsigned long)(tc->rlimt->rlim_cur),
++  (unsigned long)(tc->rlimt->rlim_max));
+   return;
+   }
+ 
+@@ -65,10 +71,13 @@ static void verify_setrlimit(unsigned int n)
+ 
+ static void setup(void)
+ {
++  if (!access(NR_OPEN_PATH, F_OK))
++  SAFE_FILE_SCANF(NR_OPEN_PATH, "%u", _open);
++
+   SAFE_GETRLIMIT(RLIMIT_NOFILE, );
+   rlim2.rlim_max = rlim1.rlim_cur;
+   rlim2.rlim_cur = rlim1.rlim_max + 1;
+-  rlim1.rlim_max = NR_OPEN + 1;
++  rlim1.rlim_max = nr_open + 1;
+ }
+ 
+ static struct tst_test test = {
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index ddf97e2..1d0c00b 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \
+   
file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] linux-libc-headers: Fix build failure by using fixed temporary file instead of pipe

2018-11-21 Thread zhe.he
From: He Zhe 

This is a workaround for the following possible build failure.

*** Compiler lacks asm-goto support.. Stop.

When building linux-libc-headers we need to use binutils on build machine.
binutils v2.31 introduces a bug that could cause scripts/gcc-goto.sh to fail
when running in an environment where /tmp is rarely used, e.g. in docker.

Signed-off-by: He Zhe 
---
v2: Improve commit log
v3: Shorten long lines as patchwork suggested
v4: Shorten subject line...

 ...-fixed-temporary-file-instead-of-pipe-for.patch | 70 ++
 .../linux-libc-headers/linux-libc-headers_4.18.bb  |  4 ++
 2 files changed, 74 insertions(+)
 create mode 100644 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch

diff --git 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
new file mode 100644
index 000..0d8fa80
--- /dev/null
+++ 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
@@ -0,0 +1,70 @@
+From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Nov 2018 15:12:43 +0800
+Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for
+ here-doc
+
+There was a bug of "as" in binutils that when it checks if the input file and
+output file are the same one, it would not check if they are on the same block
+device. The check is introduced by the following commit in v2.31.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+67f846b59b32f3d704c601669409c2584383fea9
+
+The here-doc usage in this script creates temporary file in /tmp. When we run 
in
+an environment where /tmp has rarely been used, the newly created temporary 
file
+may have a very low inode number. If the inode number was 6 which is the same 
as
+/dev/null, the as would wrongly think the input file and the output file are 
the
+same and report the following error.
+
+*** Compiler lacks asm-goto support.. Stop.
+
+One observed case happened in docker where the /tmp could be so rarely used 
that
+very low number inode may be allocated and triggers the error.
+
+The fix below for the bug only exists on the master branch of binutils so far
+and has not been released from upstream. As the convict is introduced since
+v2.31, only v2.31 is affected.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+2a50366ded329bfb39d387253450c9d5302c3503
+
+When building linux-libc-headers we need to use "as" in binutils which does not
+contain the fix for the moment. To work around the error, we create a fixed
+temporary file to contain the program being tested.
+
+This patch also removes ">/dev/null 2>&1" so we will have more direct error
+information in case something else wrong happened.
+
+Upstream-Status: Inappropriate [A work around for binutils v2.31]
+
+Signed-off-by: He Zhe 
+---
+ scripts/gcc-goto.sh | 7 ++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
+index 083c526..0aaf1b4 100755
+--- a/scripts/gcc-goto.sh
 b/scripts/gcc-goto.sh
+@@ -3,7 +3,9 @@
+ # Test for gcc 'asm goto' support
+ # Copyright (C) 2010, Jason Baron 
+ 
+-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
++TMPFILE=`mktemp -p .`
++
++cat << "END" > ${TMPFILE}
+ int main(void)
+ {
+ #if defined(__arm__) || defined(__aarch64__)
+@@ -20,3 +22,6 @@ entry:
+   return 0;
+ }
+ END
++
++$@ -x c ${TMPFILE} -c -o /dev/null && echo "y"
++rm ${TMPFILE}
+-- 
+2.7.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
index eb7bee7..00420aa 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
@@ -9,5 +9,9 @@ SRC_URI_append_libc-musl = "\
 file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
"
 
+SRC_URI_append = "\
+file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \
+"
+
 SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"
 SRC_URI[sha256sum] = 
"19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] linux-libc-headers: Fix build failure by using fixed temporary file instead of pipe for here-doc

2018-11-21 Thread zhe.he
From: He Zhe 

This is a workaround for the following possible build failure.

*** Compiler lacks asm-goto support.. Stop.

When building linux-libc-headers we need to use binutils on build machine.
binutils v2.31 introduces a bug that could cause scripts/gcc-goto.sh to fail
when running in an environment where /tmp is rarely used, e.g. in docker.

Signed-off-by: He Zhe 
---
v2: Improve commit log
v3: Shorten long lines as patchwork suggested

 ...-fixed-temporary-file-instead-of-pipe-for.patch | 70 ++
 .../linux-libc-headers/linux-libc-headers_4.18.bb  |  4 ++
 2 files changed, 74 insertions(+)
 create mode 100644 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch

diff --git 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
new file mode 100644
index 000..0d8fa80
--- /dev/null
+++ 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
@@ -0,0 +1,70 @@
+From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Nov 2018 15:12:43 +0800
+Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for
+ here-doc
+
+There was a bug of "as" in binutils that when it checks if the input file and
+output file are the same one, it would not check if they are on the same block
+device. The check is introduced by the following commit in v2.31.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+67f846b59b32f3d704c601669409c2584383fea9
+
+The here-doc usage in this script creates temporary file in /tmp. When we run 
in
+an environment where /tmp has rarely been used, the newly created temporary 
file
+may have a very low inode number. If the inode number was 6 which is the same 
as
+/dev/null, the as would wrongly think the input file and the output file are 
the
+same and report the following error.
+
+*** Compiler lacks asm-goto support.. Stop.
+
+One observed case happened in docker where the /tmp could be so rarely used 
that
+very low number inode may be allocated and triggers the error.
+
+The fix below for the bug only exists on the master branch of binutils so far
+and has not been released from upstream. As the convict is introduced since
+v2.31, only v2.31 is affected.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+2a50366ded329bfb39d387253450c9d5302c3503
+
+When building linux-libc-headers we need to use "as" in binutils which does not
+contain the fix for the moment. To work around the error, we create a fixed
+temporary file to contain the program being tested.
+
+This patch also removes ">/dev/null 2>&1" so we will have more direct error
+information in case something else wrong happened.
+
+Upstream-Status: Inappropriate [A work around for binutils v2.31]
+
+Signed-off-by: He Zhe 
+---
+ scripts/gcc-goto.sh | 7 ++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
+index 083c526..0aaf1b4 100755
+--- a/scripts/gcc-goto.sh
 b/scripts/gcc-goto.sh
+@@ -3,7 +3,9 @@
+ # Test for gcc 'asm goto' support
+ # Copyright (C) 2010, Jason Baron 
+ 
+-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
++TMPFILE=`mktemp -p .`
++
++cat << "END" > ${TMPFILE}
+ int main(void)
+ {
+ #if defined(__arm__) || defined(__aarch64__)
+@@ -20,3 +22,6 @@ entry:
+   return 0;
+ }
+ END
++
++$@ -x c ${TMPFILE} -c -o /dev/null && echo "y"
++rm ${TMPFILE}
+-- 
+2.7.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
index eb7bee7..00420aa 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
@@ -9,5 +9,9 @@ SRC_URI_append_libc-musl = "\
 file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
"
 
+SRC_URI_append = "\
+file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \
+"
+
 SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"
 SRC_URI[sha256sum] = 
"19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] linux-libc-headers: Fix build failure by using fixed temporary file instead of pipe for here-doc

2018-11-21 Thread zhe.he
From: He Zhe 

This is a workaround for the following possible build failure.

*** Compiler lacks asm-goto support.. Stop.

When building linux-libc-headers we need to use binutils on build machine.
binutils v2.31 introduces a bug that could cause scripts/gcc-goto.sh to fail
when running in an environment where /tmp is rarely used, e.g. in docker.

Signed-off-by: He Zhe 
---
v2: Improve commit log

 ...-fixed-temporary-file-instead-of-pipe-for.patch | 68 ++
 .../linux-libc-headers/linux-libc-headers_4.18.bb  |  4 ++
 2 files changed, 72 insertions(+)
 create mode 100644 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch

diff --git 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
new file mode 100644
index 000..345c788
--- /dev/null
+++ 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
@@ -0,0 +1,68 @@
+From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Nov 2018 15:12:43 +0800
+Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for
+ here-doc
+
+There was a bug of "as" in binutils that when it checks if the input file and
+output file are the same one, it would not check if they are on the same block
+device. The check is introduced by the following commit in v2.31.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=67f846b59b32f3d704c601669409c2584383fea9
+
+The here-doc usage in this script creates temporary file in /tmp. When we run 
in
+an environment where /tmp has rarely been used, the newly created temporary 
file
+may have a very low inode number. If the inode number was 6 which is the same 
as
+/dev/null, the as would wrongly think the input file and the output file are 
the
+same and report the following error.
+
+*** Compiler lacks asm-goto support.. Stop.
+
+One observed case happened in docker where the /tmp could be so rarely used 
that
+very low number inode may be allocated and triggers the error.
+
+The fix below for the bug only exists on the master branch of binutils so far
+and has not been released from upstream. As the convict is introduced since
+v2.31, only v2.31 is affected.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2a50366ded329bfb39d387253450c9d5302c3503
+
+When building linux-libc-headers we need to use "as" in binutils which does not
+contain the fix for the moment. To work around the error, we create a fixed
+temporary file to contain the program being tested.
+
+This patch also removes ">/dev/null 2>&1" so we will have more direct error
+information in case something else wrong happened.
+
+Upstream-Status: Inappropriate [A work around for binutils v2.31]
+
+Signed-off-by: He Zhe 
+---
+ scripts/gcc-goto.sh | 7 ++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
+index 083c526..0aaf1b4 100755
+--- a/scripts/gcc-goto.sh
 b/scripts/gcc-goto.sh
+@@ -3,7 +3,9 @@
+ # Test for gcc 'asm goto' support
+ # Copyright (C) 2010, Jason Baron 
+ 
+-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
++TMPFILE=`mktemp -p .`
++
++cat << "END" > ${TMPFILE}
+ int main(void)
+ {
+ #if defined(__arm__) || defined(__aarch64__)
+@@ -20,3 +22,6 @@ entry:
+   return 0;
+ }
+ END
++
++$@ -x c ${TMPFILE} -c -o /dev/null && echo "y"
++rm ${TMPFILE}
+-- 
+2.7.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
index eb7bee7..00420aa 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
@@ -9,5 +9,9 @@ SRC_URI_append_libc-musl = "\
 file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
"
 
+SRC_URI_append = "\
+file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \
+"
+
 SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"
 SRC_URI[sha256sum] = 
"19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] scripts: Use fixed temporary file instead of pipe for here-doc

2018-11-21 Thread zhe.he
From: He Zhe 

A workaround for possible "*** Compiler lacks asm-goto support.. Stop."
linux-libc-headers is built by gcc on build machine, which could not contain the
fix.

Signed-off-by: He Zhe 
---
 ...-fixed-temporary-file-instead-of-pipe-for.patch | 60 ++
 .../linux-libc-headers/linux-libc-headers_4.18.bb  |  4 ++
 2 files changed, 64 insertions(+)
 create mode 100644 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch

diff --git 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
new file mode 100644
index 000..eca3330
--- /dev/null
+++ 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
@@ -0,0 +1,60 @@
+From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Wed, 21 Nov 2018 15:12:43 +0800
+Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for
+ here-doc
+
+There was a bug of gcc that when it checks if the input file and output file 
are
+the same one, it would not check if they are on the same block device.
+
+The here-doc usage in this script creates temporary file in /tmp. When we run 
in
+an environment where /tmp has rarely been used, the newly created temporary 
file
+may have a very low inode number. If the inode number was 6 which is the same 
as
+/dev/null, gcc would wrongly think the input file and the output file are the
+same and report the following error.
+
+*** Compiler lacks asm-goto support.. Stop.
+
+The fix below for the bug has not been released from upstream. Since there has
+not been gcc-cross when building linux-libc-headers, we have to use build
+machine gcc which could not contain the fix for the moment. To work around the
+error, we create a fixed temporary file to contain the program being tested.
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
+2a50366ded329bfb39d387253450c9d5302c3503
+
+This patch also removes ">/dev/null 2>&1" so we will have more direct error
+information in case something else wrong happened.
+
+Upstream-Status: Inappropriate [Just a work around for old gcc]
+
+Signed-off-by: He Zhe 
+---
+ scripts/gcc-goto.sh | 7 ++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
+index 083c526..0aaf1b4 100755
+--- a/scripts/gcc-goto.sh
 b/scripts/gcc-goto.sh
+@@ -3,7 +3,9 @@
+ # Test for gcc 'asm goto' support
+ # Copyright (C) 2010, Jason Baron 
+ 
+-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
++TMPFILE=`mktemp -p .`
++
++cat << "END" > ${TMPFILE}
+ int main(void)
+ {
+ #if defined(__arm__) || defined(__aarch64__)
+@@ -20,3 +22,6 @@ entry:
+   return 0;
+ }
+ END
++
++$@ -x c ${TMPFILE} -c -o /dev/null && echo "y"
++rm ${TMPFILE}
+-- 
+2.7.4
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
index eb7bee7..00420aa 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
@@ -9,5 +9,9 @@ SRC_URI_append_libc-musl = "\
 file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
"
 
+SRC_URI_append = "\
+file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \
+"
+
 SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"
 SRC_URI[sha256sum] = 
"19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: Fix build failure by syncing up with kernel 4.19

2018-10-09 Thread zhe.he
From: He Zhe 

linux-yocto-dev has been upreved to v4.19. This patch backports a patch from
upstream to make lttng-modules sync up with linux-yocto-dev and later
linux-yocto, and fix the following do_compile error.

| 
tmp/work/qemux86_64-poky-linux/lttng-modules/2.10.7-r0/lttng-modules-2.10.7/probes/../probes/lttng-tracepoint-event-impl.h:143:6:
 error: conflict
ing types for 'trace_sock_exceed_buf_limit'
|  void trace_##_name(_proto);
|   ^~

Signed-off-by: He Zhe 
---
 ...ose-sk-wmem-in-sock_exceed_buf_limit-trac.patch | 67 ++
 meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb  |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-net-expose-sk-wmem-in-sock_exceed_buf_limit-trac.patch

diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-net-expose-sk-wmem-in-sock_exceed_buf_limit-trac.patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-net-expose-sk-wmem-in-sock_exceed_buf_limit-trac.patch
new file mode 100644
index 000..92e12df
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-net-expose-sk-wmem-in-sock_exceed_buf_limit-trac.patch
@@ -0,0 +1,67 @@
+From 9e67b4c94b94493123d38379bd9b3eceae23a6f1 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Fri, 7 Sep 2018 12:21:12 -0400
+Subject: [PATCH] Fix: net: expose sk wmem in sock_exceed_buf_limit tracepoint
+ (4.19)
+
+See upstream commit:
+
+  commit d6f19938eb031ee2158272757db33258153ae59c
+  Author: Yafang Shao 
+  Date:   Sun Jul 1 23:31:30 2018 +0800
+
+net: expose sk wmem in sock_exceed_buf_limit tracepoint
+
+Currently trace_sock_exceed_buf_limit() only show rmem info,
+but wmem limit may also be hit.
+So expose wmem info in this tracepoint as well.
+
+Regarding memcg, I think it is better to introduce a new tracepoint(if
+that is needed), i.e. trace_memcg_limit_hit other than show memcg info in
+trace_sock_exceed_buf_limit.
+
+Signed-off-by: Michael Jeanson 
+Signed-off-by: Mathieu Desnoyers 
+Upstream-Status: Backport
+Signed-off-by: He Zhe 
+---
+ instrumentation/events/lttng-module/sock.h | 23 ++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/sock.h 
b/instrumentation/events/lttng-module/sock.h
+index 5cd02ca..cd0c92b 100644
+--- a/instrumentation/events/lttng-module/sock.h
 b/instrumentation/events/lttng-module/sock.h
+@@ -21,7 +21,28 @@ LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
+   )
+ )
+ 
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
++
++LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
++
++  TP_PROTO(struct sock *sk, struct proto *prot, long allocated, int kind),
++
++  TP_ARGS(sk, prot, allocated, kind),
++
++  TP_FIELDS(
++  ctf_string(name, prot->name)
++  ctf_array(long, sysctl_mem, prot->sysctl_mem, 3)
++  ctf_integer(long, allocated, allocated)
++  ctf_integer(int, sysctl_rmem, sk_get_rmem0(sk, prot))
++  ctf_integer(int, rmem_alloc, atomic_read(>sk_rmem_alloc))
++  ctf_integer(int, sysctl_wmem, sk_get_wmem0(sk, prot))
++  ctf_integer(int, wmem_alloc, refcount_read(>sk_wmem_alloc))
++  ctf_integer(int, wmem_queued, sk->sk_wmem_queued)
++  ctf_integer(int, kind, kind)
++  )
++)
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+ 
+ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb
index 4f14106..f6c865a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb
@@ -15,6 +15,7 @@ COMPATIBLE_HOST = 
'(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+   
file://0001-Fix-net-expose-sk-wmem-in-sock_exceed_buf_limit-trac.patch \
 "
 
 SRC_URI[md5sum] = "d3cb4520948083bf1573a2e4cb7406aa"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] nativesdk-bison: Add to nativesdk-packagegroup-sdk-host and set BISON_PKGDATADIR

2018-09-27 Thread zhe.he
From: He Zhe 

bison is needed when building kernel. Add it to nativesdk-packagegroup-sdk-host
and set BISON_PKGDATADIR for bison to use its components.

Signed-off-by: He Zhe 
---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 +
 meta/recipes-devtools/bison/bison_3.0.4.bb | 4 
 2 files changed, 5 insertions(+)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb 
b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index e2f6169..448c2f6 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -25,6 +25,7 @@ RDEPENDS_${PN} = "\
 nativesdk-cmake \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', 
'', d)} \
 nativesdk-sdk-provides-dummy \
+nativesdk-bison \
 "
 
 RDEPENDS_${PN}_darwin = "\
diff --git a/meta/recipes-devtools/bison/bison_3.0.4.bb 
b/meta/recipes-devtools/bison/bison_3.0.4.bb
index cc155f0..f1b05da 100644
--- a/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -36,4 +36,8 @@ do_install_append_class-native() {
create_wrapper ${D}/${bindir}/bison \
BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
 }
+do_install_append_class-nativesdk() {
+   create_wrapper ${D}/${bindir}/bison \
+   BISON_PKGDATADIR=${datadir}/bison
+}
 BBCLASSEXTEND = "native nativesdk"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] nativesdk-bison: Add to nativesdk-packagegroup-sdk-host and set BISON_PKGDATADIR

2018-09-27 Thread zhe.he
From: He Zhe 

bison is needed when building kernel. Add it to nativesdk-packagegroup-sdk-host
and set BISON_PKGDATADIR for bison to use its components.

Signed-off-by: He Zhe 
---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 +
 meta/recipes-devtools/bison/bison_3.0.4.bb | 4 
 2 files changed, 5 insertions(+)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb 
b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index e2f6169..448c2f6 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -25,6 +25,7 @@ RDEPENDS_${PN} = "\
 nativesdk-cmake \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', 
'', d)} \
 nativesdk-sdk-provides-dummy \
+nativesdk-bison \
 "
 
 RDEPENDS_${PN}_darwin = "\
diff --git a/meta/recipes-devtools/bison/bison_3.0.4.bb 
b/meta/recipes-devtools/bison/bison_3.0.4.bb
index cc155f0..07677a7 100644
--- a/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -36,4 +36,8 @@ do_install_append_class-native() {
create_wrapper ${D}/${bindir}/bison \
BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
 }
+do_install_append_class-nativesdk() {
+   create_wrapper ${D}/${bindir}/bison \
+   
BISON_PKGDATADIR=${OECORE_NATIVE_SYSROOT}${prefix_nativesdk}/share/bison
+}
 BBCLASSEXTEND = "native nativesdk"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Remove unnecessary check from creat08 and open10

2018-08-28 Thread zhe.he
From: He Zhe 

Issue: LIN1018-1797

At the point of the following failure, the file being checked, setgid,
is owned by "nobody" in the "nogroup" and tries to inherit SGID from
its parent directory who is in group of "bin". This is forbidden since
Linux kernel v4.18-rc4, unless current process is given CAP_FSETID
beforehand. See "Fix up non-directory creation in SGID directories" in
the kernel. The check in Block3 succeeds since it becomes root again
then.

creat08 3 TFAIL : creat08.c:368: testdir.B.1026/setgid: Incorrect modes, setgid 
bit should be set
creat08 4 TFAIL : creat08.c:376: Test failed in block2.

open10 3 TFAIL : open10.c:352: open10.testdir.B.1045/setgid: Incorrect modes, 
setgid bit not set
open10 4 TFAIL : open10.c:359: Test failed in block2.
open10 6 TFAIL : open10.c:443: Test failed because of above failures.

Backport a patch from upstream.

Signed-off-by: He Zhe 
---
 ...skip-S_ISGID-check-on-files-created-by-no.patch | 81 ++
 meta/recipes-extended/ltp/ltp_20180515.bb  |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
 
b/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
new file mode 100644
index 000..dc61fcc
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
@@ -0,0 +1,81 @@
+From 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b Mon Sep 17 00:00:00 2001
+From: Jan Stancek 
+Date: Tue, 17 Jul 2018 10:26:39 +0200
+Subject: [PATCH] open|creat: skip S_ISGID check on files created by non-group
+ members
+
+0fa3ecd87848 ("Fix up non-directory creation in SGID directories")
+fixes problem described in CVE-2018-13405. This commit is getting
+backported to older streams as well.
+
+This patch removes S_ISGID check for files created by non-group members
+in LTP tests creat08 and open10.
+
+Once 0fa3ecd87848 will be in non-rc kernel, we could add a new test
+for this CVE that would be limited to 4.18+ kernels.
+
+Signed-off-by: Jan Stancek 
+Acked-by: Cyril Hrubis 
+Reviewed-by: Naresh Kamboju 
+
+Upstream-Status: Backport
+[ git://github.com/linux-test-project/ltp.git
+  3c87ef2961dedb10d1f674c6a530e00dbab8ec1b
+  "open|creat: skip S_ISGID check on files created by non-group members" ]
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/syscalls/creat/creat08.c | 13 ++---
+ testcases/kernel/syscalls/open/open10.c   | 12 +---
+ 2 files changed, 11 insertions(+), 14 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/creat/creat08.c 
b/testcases/kernel/syscalls/creat/creat08.c
+index 50f2b3993..d22558ac3 100644
+--- a/testcases/kernel/syscalls/creat/creat08.c
 b/testcases/kernel/syscalls/creat/creat08.c
+@@ -361,13 +361,12 @@ int main(int ac, char **av)
+   local_flag = FAILED;
+   }
+ 
+-  /* Verify modes */
+-  if (!(buf.st_mode & S_ISGID)) {
+-  tst_resm(TFAIL,
+-   "%s: Incorrect modes, setgid bit should be 
set",
+-   setgid_B);
+-  local_flag = FAILED;
+-  }
++  /*
++   * Skip S_ISGID check
++   * 0fa3ecd87848 ("Fix up non-directory creation in SGID 
directories")
++   * clears S_ISGID for files created by non-group members
++   */
++
+   close(fd);
+ 
+   if (local_flag == PASSED) {
+diff --git a/testcases/kernel/syscalls/open/open10.c 
b/testcases/kernel/syscalls/open/open10.c
+index 613f2288f..14feec9e1 100644
+--- a/testcases/kernel/syscalls/open/open10.c
 b/testcases/kernel/syscalls/open/open10.c
+@@ -345,13 +345,11 @@ int main(int ac, char *av[])
+   local_flag = FAILED;
+   }
+ 
+-  /* Verify modes */
+-  if (!(buf.st_mode & S_ISGID)) {
+-  tst_resm(TFAIL,
+-   "%s: Incorrect modes, setgid bit not set",
+-   setgid_B);
+-  local_flag = FAILED;
+-  }
++  /*
++   * Skip S_ISGID check
++   * 0fa3ecd87848 ("Fix up non-directory creation in SGID 
directories")
++   * clears S_ISGID for files created by non-group members
++   */
+ 
+   if (local_flag == PASSED) {
+   tst_resm(TPASS, "Test passed in block2.");
+-- 
+2.11.0
+
diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb 
b/meta/recipes-extended/ltp/ltp_20180515.bb
index 978d3cd..7c364a6 100644
--- a/meta/recipes-extended/ltp/ltp_20180515.bb
+++ b/meta/recipes-extended/ltp/ltp_20180515.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
  

[OE-core] [PATCH] ltp: Fix ftest06 too small file path string

2018-08-22 Thread zhe.he
From: He Zhe 

The name string is too small to contain normal full path names and causes
the following failure.

"ftest06 2  TFAIL  :  ftest06.c:223: Can't chdir(): errno=ENOENT(2): No 
such file or directory"

Signed-off-by: He Zhe 
---
 ...est06.c-Fix-too-small-name-string-and-rel.patch | 34 ++
 meta/recipes-extended/ltp/ltp_20180515.bb  |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
 
b/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
new file mode 100644
index 000..407d98e
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
@@ -0,0 +1,34 @@
+From baeef026f80e19a634a4096e97286419aca1cf68 Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Thu, 23 Aug 2018 00:22:04 +0800
+Subject: [PATCH] fs/ftest/ftest06.c: Fix too small name string and related
+ failure
+
+The name string is too small to contain normal full path names and causes
+the following failure.
+
+"ftest06 2  TFAIL  :  ftest06.c:223: Can't chdir(): errno=ENOENT(2): No 
such file or directory"
+
+Upstream-Status: Submitted [ltp-l...@lists.sourceforge.net]
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/fs/ftest/ftest06.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/fs/ftest/ftest06.c 
b/testcases/kernel/fs/ftest/ftest06.c
+index 2ca7c88..b434067 100644
+--- a/testcases/kernel/fs/ftest/ftest06.c
 b/testcases/kernel/fs/ftest/ftest06.c
+@@ -100,7 +100,7 @@ static char *fstyp;
+ int main(int ac, char *av[])
+ {
+   int pid, child, status, count, k, j;
+-  char name[3];
++  char name[MAXPATHLEN];
+ 
+   int lc;
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb 
b/meta/recipes-extended/ltp/ltp_20180515.bb
index 8f64d7b..978d3cd 100644
--- a/meta/recipes-extended/ltp/ltp_20180515.bb
+++ b/meta/recipes-extended/ltp/ltp_20180515.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \

file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \

file://0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch \
+   
file://0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: Fix do_compile failure for btrfs related tracepoints

2018-07-10 Thread zhe.he
From: He Zhe 

Building lttng-modules with linux-yocto-dev will cause do_compile
failure:

lttng-modules/2.10.6-r0/lttng-modules-2.10.6/probes/../probes/lttng-tracepoint-event-impl.h:143:6:
 error: conflicting types for 'trace_btrfs_reserve_extent'
 void trace_##_name(_proto);
  ^~

The following commit from latest mainline kernel changes some btrfs
functions' prototype.

3dca5c942dac60164e6a6e89172f25b86af07ce7
"btrfs: trace: Remove unnecessary fs_info parameter for btrfs__reserve_extent 
event class"

This patch backports a commit from upstream to meet the above changes.

51ab0b1da29354375a19f865abcd233dd2178295
"Fix: btrfs: Remove unnecessary fs_info parameter"

Signed-off-by: He Zhe 
---
 ...trfs-Remove-unnecessary-fs_info-parameter.patch | 116 +
 meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb  |   1 +
 2 files changed, 117 insertions(+)
 create mode 100644 
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch

diff --git 
a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch
 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch
new file mode 100644
index 000..0fe4ee8
--- /dev/null
+++ 
b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch
@@ -0,0 +1,116 @@
+From 51ab0b1da29354375a19f865abcd233dd2178295 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson 
+Date: Mon, 18 Jun 2018 14:53:19 -0400
+Subject: [PATCH] Fix: btrfs: Remove unnecessary fs_info parameter
+
+See upstream commit:
+
+  commit 3dca5c942dac60164e6a6e89172f25b86af07ce7
+  Author: Qu Wenruo 
+  Date:   Thu Apr 26 14:24:25 2018 +0800
+
+btrfs: trace: Remove unnecessary fs_info parameter for 
btrfs__reserve_extent event class
+
+fs_info can be extracted from btrfs_block_group_cache, and all
+btrfs_block_group_cache is created by btrfs_create_block_group_cache()
+with fs_info initialized, no need to worry about NULL pointer
+dereference.
+
+Signed-off-by: Michael Jeanson 
+Signed-off-by: Mathieu Desnoyers 
+Upstream-Status: Backport
+Signed-off-by: He Zhe 
+---
+ instrumentation/events/lttng-module/btrfs.h | 54 -
+ 1 file changed, 53 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/btrfs.h 
b/instrumentation/events/lttng-module/btrfs.h
+index 75cc73b..fd1b6b8 100644
+--- a/instrumentation/events/lttng-module/btrfs.h
 b/instrumentation/events/lttng-module/btrfs.h
+@@ -1658,8 +1658,57 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, 
 btrfs_reserved_extent_f
+ 
+ #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+ 
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
++LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
++
++  btrfs_find_free_extent,
++
++  TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 
empty_size,
++   u64 data),
++
++  TP_ARGS(info, num_bytes, empty_size, data),
++
++  TP_FIELDS(
++  ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
++  ctf_integer(u64, num_bytes, num_bytes)
++  ctf_integer(u64, empty_size, empty_size)
++  ctf_integer(u64, data, data)
++  )
++)
++
++LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
++
++  TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
++   u64 len),
++
++  TP_ARGS(block_group, start, len),
++
++  TP_FIELDS(
++  ctf_array(u8, fsid, block_group->fs_info->fsid, BTRFS_UUID_SIZE)
++  ctf_integer(u64, bg_objectid, block_group->key.objectid)
++  ctf_integer(u64, flags, block_group->flags)
++  ctf_integer(u64, start, start)
++  ctf_integer(u64, len, len)
++  )
++)
++
++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
++
++  TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
++   u64 len),
++
++  TP_ARGS(block_group, start, len)
++)
++
++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, 
btrfs_reserve_extent_cluster,
++
++  TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
++   u64 len),
++
++  TP_ARGS(block_group, start, len)
++)
+ 
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
+ 
+   btrfs_find_free_extent,
+@@ -1670,6 +1719,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
+   TP_ARGS(info, num_bytes, empty_size, data),
+ 
+   TP_FIELDS(
++  ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
+   ctf_integer(u64, num_bytes, num_bytes)
+   ctf_integer(u64, empty_size, empty_size)
+   ctf_integer(u64, data, data)
+@@ -1685,6 +1735,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
+   

[OE-core] [PATCH] qemu.inc: Change kernel provider assignment to a weaker one

2018-05-22 Thread zhe.he
From: He Zhe 

Currently we have local.conf included before qemu.inc, and ${DISTRO}.conf
after qemu.inc. They both possibly specify their expected kernel providers.
To let other config files override it in real use, this commit changes
kernel provider assignment to ??= .

Signed-off-by: He Zhe 
---
 meta/conf/machine/include/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/qemu.inc 
b/meta/conf/machine/include/qemu.inc
index aa332fe..5050e41 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -19,7 +19,7 @@ IMAGE_FSTYPES += "tar.bz2 ext4"
 RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
 
 # Use a common kernel recipe for all QEMU machines
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
 
 EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel: Fix QA buildpaths warning for kernel modules

2018-02-04 Thread zhe.he
From: He Zhe 

CFLAGS is unset during kernel_do_compile and thus the default build
path substitutions in DEBUG_PREFIX_MAP are missing.

To enhance reproducible build for kernel modules, such as lttng-modules
and cryptodev-module, this patch appends them, plus substitution of
STAGING_KERNEL_DIR, to KERNEL_CC.

Signed-off-by: He Zhe 
---
 meta/classes/kernel-arch.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
index cf0edb6..e0fe22b 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -57,7 +57,7 @@ HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
 TARGET_AR_KERNEL_ARCH ?= ""
 HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
 
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd"
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd 
${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}"
 KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
 KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
 TOOLCHAIN = "gcc"
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel: Add paravirt_kvm support for qemux86-64

2018-01-04 Thread zhe.he
From: He Zhe 

This feature includes paravirtualized KVM guest support.

Signed-off-by: He Zhe 
---
 meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
index ed65f77..ebfed3e 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
@@ -35,4 +35,4 @@ KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc 
features/taskstats/ta
 KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
 KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
 KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] qemu: apic: fallthrough to PIC

2017-08-09 Thread zhe.he
From: He Zhe 

Backport a commit from qemu upstream to fix a protection fault

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html

Signed-off-by: He Zhe 
---
 .../qemu/qemu/apic-fixup-fallthrough-to-PIC.patch  | 46 ++
 meta/recipes-devtools/qemu/qemu_2.8.1.1.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch

diff --git 
a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch 
b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
new file mode 100644
index 00..9bbbc6f76d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,46 @@
+From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine 
+Date: Tue, 26 Feb 2013 11:43:28 -0500
+Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+
+Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
+interrupts through the local APIC if the local APIC config says so.]
+missed a check to ensure the local APIC is enabled. Since if the local
+APIC is disabled it doesn't matter what the local APIC config says.
+
+If this check isn't done and the guest has disabled the local APIC the
+guest will receive a general protection fault, similar to what is seen
+here:
+
+https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
+
+The GPF is caused by an attempt to service interrupt 0x. This
+comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
+(with the local APIC disabled apic_get_interrupt() returns -1).
+apic_accept_pic_intr() returns 0 and thus the interrupt number which
+is returned from cpu_get_pic_interrupt(), and which is attempted to be
+serviced, is -1.
+
+Signed-off-by: Mark Asselstine 
+Upstream-Status: Submitted 
[https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
+Signed-off-by: He Zhe 
+---
+ hw/intc/apic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index 45887d99..c5ae4087 100644
+--- a/hw/intc/apic.c
 b/hw/intc/apic.c
+@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+ APICCommonState *s = APIC_COMMON(dev);
+ uint32_t lvt0;
+ 
+-if (!s)
++if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
+ return -1;
+ 
+ lvt0 = s->lvt[APIC_LVT_LINT0];
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb 
b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
index a5dc70469d..a4ddb7f989 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
@@ -27,6 +27,7 @@ SRC_URI = 
"http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
file://CVE-2016-9908.patch \
file://CVE-2016-9912.patch \
file://0001-replace-struct-ucontext-with-ucontext_t-type.patch \
+   file://apic-fixup-fallthrough-to-PIC.patch \
"
 
 SRC_URI_append_class-native = " \
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] qemux86 qemux86-64: Enable pci

2017-07-31 Thread zhe.he
From: He Zhe 

lspci and some other software require "pci" in MACHINE_FEATURES and PCI
is valid in the qemux86* context.

Signed-off-by: He Zhe 
---
 meta/conf/machine/qemux86-64.conf | 2 +-
 meta/conf/machine/qemux86.conf| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/machine/qemux86-64.conf 
b/meta/conf/machine/qemux86-64.conf
index 4f30033..9f78191 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -28,7 +28,7 @@ XSERVER = "xserver-xorg \
xserver-xorg-module-libint10 \
"
 
-MACHINE_FEATURES += "x86"
+MACHINE_FEATURES += "x86 pci"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
 
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index e232947..d778fa7 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -27,7 +27,7 @@ XSERVER = "xserver-xorg \
xserver-xorg-module-libint10 \
"
 
-MACHINE_FEATURES += "x86"
+MACHINE_FEATURES += "x86 pci"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
 
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] schedtool-dl: Fix SCHED_DEADLINE value out of range

2017-06-29 Thread zhe.he
From: He Zhe 

The upstream commit 3ffb479929c31cbae09de08f94f58b8f0f061d91
tries to fix this issue but it's not complete.

This patch adds flags at the last necessary place.

Signed-off-by: He Zhe 
---
 recipes-tools/schedtool-dl/schedtool-dl.bb |  6 ++-
 ...-add-flags-to-parameters-of-sched_setattr.patch | 56 ++
 2 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 
recipes-tools/schedtool-dl/schedtool-dl/0001-schedtool-dl-add-flags-to-parameters-of-sched_setattr.patch

diff --git a/recipes-tools/schedtool-dl/schedtool-dl.bb 
b/recipes-tools/schedtool-dl/schedtool-dl.bb
index 578e5df..20c8919 100644
--- a/recipes-tools/schedtool-dl/schedtool-dl.bb
+++ b/recipes-tools/schedtool-dl/schedtool-dl.bb
@@ -3,13 +3,17 @@ SECTION = "devel"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=dc1f51f7ca94aebffb9b3663d82873ec"
 
-SRC_URI = "git://github.com/jlelli/schedtool-dl.git;protocol=git"
+SRC_URI = "git://github.com/jlelli/schedtool-dl.git;protocol=git \
+   
file://0001-schedtool-dl-add-flags-to-parameters-of-sched_setattr.patch \
+  "
 SRCREV = "3ffb479929c31cbae09de08f94f58b8f0f061d91"
 
 S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "'CC=${CC}'"
 
+TARGET_CC_ARCH += "${LDFLAGS}"
+
 do_compile() {
oe_runmake
 }
diff --git 
a/recipes-tools/schedtool-dl/schedtool-dl/0001-schedtool-dl-add-flags-to-parameters-of-sched_setattr.patch
 
b/recipes-tools/schedtool-dl/schedtool-dl/0001-schedtool-dl-add-flags-to-parameters-of-sched_setattr.patch
new file mode 100644
index 000..65d5059
--- /dev/null
+++ 
b/recipes-tools/schedtool-dl/schedtool-dl/0001-schedtool-dl-add-flags-to-parameters-of-sched_setattr.patch
@@ -0,0 +1,56 @@
+From c75ae0f6ac2bb9eb893cce82e93144e1b3c36389 Mon Sep 17 00:00:00 2001
+From: Qi Hou 
+Date: Wed, 16 Mar 2016 05:44:40 +
+Subject: [PATCH] schedtool-dl: add flags to parameters of sched_setattr
+
+git://github.com/jlelli/schedtool-dl.git;protocol=git
+commit 3ffb479929c31cbae09de08f94f58b8f0f061d91
+
+The commit numbered as 3ffb479 has adapted to the very last changes to the 
ABI,except for the
+syscall of sched_setattr.
+
+While executing schedtool,there was an error,like below:
+
+root@128:/opt/wr-test/testcases/kts/edf# schedtool -E -t 8000:1 -e yes
+ERROR: could not set PID 1731 to E: SCHED_DEADLINE - value out of range / 
policy not implemented
+
+The cause of this case is that the syscall of sched_setattr is declared with 3 
parameters,but in
+the use of it in schedtool,there was only two parameters.So to adapt this 
declaration,we should
+add one more parameter,flags,when calling sched_setattr.
+
+In kernel source file kernel/sched/core.c,the declaration of the syscall of 
sched_setattr like below:
+/**
+ * sys_sched_setattr - same as above, but with extended sched_attr
+ * @pid: the pid in question.
+ * @uattr: structure containing the extended parameters.
+ * @flags: for future extension.
+ */
+ SYSCALL_DEFINE3(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr,
+unsigned int, flags)
+ {
+   ...
+ }
+
+In schedtool-dl source file syscall_magic.h,the use of sched_setattr like 
below:
+syscall(__NR_sched_setattr, pid, attr)
+
+Upstream-Status: Backport
+
+Signed-off-by: Qi Hou 
+---
+ syscall_magic.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/syscall_magic.h b/syscall_magic.h
+index 7dcb967..2735dfb 100644
+--- a/syscall_magic.h
 b/syscall_magic.h
+@@ -76,4 +76,4 @@ struct sched_attr {
+   syscall(__NR_sched_getattr, pid, attr, size, flags)
+ 
+ #define sched_setattr(pid, attr, flags) \
+-  syscall(__NR_sched_setattr, pid, attr)
++  syscall(__NR_sched_setattr, pid, attr,flags)
+-- 
+1.9.1
+
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Fix containers/userns05 failure for lib32

2017-02-07 Thread zhe.he
From: He Zhe 

Backport a patch to fix userns05 case:
<<>>
user_namespace5 1 TFAIL : userns05.c:95: userns:parent should be not equal to 
cpid2
user_namespace5 1 TFAIL : userns05.c:95: userns:parent should be not equal to 
cpid2
user_namespace5 0 TINFO : Child process returned TPASS
user_namespace5 0 TINFO : Child process returned TPASS
user_namespace5 0 TINFO : Child process returned TFAIL
incrementing stop

Rename the previous patch to add a number prefix

Signed-off-by: He Zhe 
---
 ...039-fcntl-fix-the-time-def-to-use-time_t.patch} |  0
 ...iners-userns05-use-unsigned-int-for-ns-id.patch | 60 ++
 meta/recipes-extended/ltp/ltp_20160126.bb  |  3 +-
 3 files changed, 62 insertions(+), 1 deletion(-)
 rename 
meta/recipes-extended/ltp/ltp/{fcntl-fix-the-time-def-to-use-time_t.patch => 
0039-fcntl-fix-the-time-def-to-use-time_t.patch} (100%)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch 
b/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
similarity index 100%
rename from 
meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
rename to 
meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
diff --git 
a/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
 
b/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
new file mode 100644
index 000..4dee1f5
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
@@ -0,0 +1,60 @@
+From 3b63d350e9fe9e4271916cc0abfac65a5d6419ff Mon Sep 17 00:00:00 2001
+From: Jiri Jaburek 
+Date: Tue, 7 Feb 2017 07:58:16 +
+Subject: [PATCH] containers/userns05: use unsigned int for ns id
+
+The kernel defines it as 'unsigned int' in 'struct ns_common'
+and formats it as
+
+  snprintf(buf, size, "%s:[%u]", ns_ops->name, ns->inum);
+
+This change makes the test work on 32bit systems where LONG_MAX
+is smaller than UINT_MAX.
+
+Signed-off-by: Jiri Jaburek 
+
+Upstream-Status: Backport
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/containers/userns/userns05.c | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/containers/userns/userns05.c 
b/testcases/kernel/containers/userns/userns05.c
+index 8d8c40a..8eac729 100644
+--- a/testcases/kernel/containers/userns/userns05.c
 b/testcases/kernel/containers/userns/userns05.c
+@@ -49,18 +49,18 @@ static int child_fn1(void)
+   return 0;
+ }
+ 
+-static long getusernsidbypid(int pid)
++static unsigned int getusernsidbypid(int pid)
+ {
+   char path[BUFSIZ];
+   char userid[BUFSIZ];
+-  long id = 0;
++  unsigned int id = 0;
+ 
+   sprintf(path, "/proc/%d/ns/user", pid);
+ 
+   if (readlink(path, userid, BUFSIZ) == -1)
+   tst_resm(TFAIL | TERRNO, "readlink failure.");
+ 
+-  if (sscanf(userid, "user:[%ld]", ) != 1)
++  if (sscanf(userid, "user:[%u]", ) != 1)
+   tst_resm(TFAIL, "sscanf failure.");
+   return id;
+ }
+@@ -68,7 +68,7 @@ static long getusernsidbypid(int pid)
+ static void test_userns_id(void)
+ {
+   int cpid1, cpid2, cpid3;
+-  long parentuserns, cpid1userns, cpid2userns, newparentuserns;
++  unsigned int parentuserns, cpid1userns, cpid2userns, newparentuserns;
+ 
+   parentuserns = getusernsidbypid(getpid());
+   cpid1 = ltp_clone_quick(SIGCHLD, (void *)child_fn1,
+-- 
+2.9.3
+
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb 
b/meta/recipes-extended/ltp/ltp_20160126.bb
index 72d465b..aaa63c2 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -65,7 +65,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch 
\
file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
-   file://fcntl-fix-the-time-def-to-use-time_t.patch \
+   file://0039-fcntl-fix-the-time-def-to-use-time_t.patch \
+   file://0040-containers-userns05-use-unsigned-int-for-ns-id.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 0/1] kexec-tools: Upgrade to 2.0.14

2016-12-28 Thread zhe.he
From: He Zhe 

v1 to v2: Remove redundant tarball link in SRC_URI
v2 to v3: Address Alex's comments:
  Remove kexec-aarch64.patch and kexec-x32.patch files
  Correct Upstream-Status
  Regenerate patch with git's rename detection enabled

He Zhe (1):
  kexec-tools: Upgrade to 2.0.14

 ...nd-the-semantics-of-kexec_iomem_for_each_.patch |  78 ++
 ...eneralize-and-rename-get_kernel_stext_sym.patch | 194 +
 ...0003-arm64-identify-PHYS_OFFSET-correctly.patch |  76 ++
 .../0004-arm64-kdump-identify-memory-regions.patch | 202 ++
 ...5-arm64-kdump-add-elf-core-header-segment.patch | 191 +
 ...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 
 .../0007-arm64-kdump-set-up-other-segments.patch   |  35 +
 ...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 
 ...-kdump-Add-support-for-binary-image-files.patch |  52 ++
 .../kexec/kexec-tools/kexec-aarch64.patch  | 801 -
 .../kexec/kexec-tools/kexec-x32.patch  |  88 ---
 ...kexec-tools_2.0.12.bb => kexec-tools_2.0.14.bb} |  15 +-
 12 files changed, 1126 insertions(+), 893 deletions(-)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
 rename meta/recipes-kernel/kexec/{kexec-tools_2.0.12.bb => 
kexec-tools_2.0.14.bb} (55%)

-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 1/1] kexec-tools: Upgrade to 2.0.14

2016-12-28 Thread zhe.he
From: He Zhe 

Remove kexec-aarch64.patch since it has been merged upstream
Remove kexec-x32.patch since it has been reverted upstream
Add patches for kdump arm64 from upstream mailing list:
http://lists.infradead.org/pipermail/kexec/2016-November/017555.html

Signed-off-by: He Zhe 
---
 ...nd-the-semantics-of-kexec_iomem_for_each_.patch |  78 ++
 ...eneralize-and-rename-get_kernel_stext_sym.patch | 194 +
 ...0003-arm64-identify-PHYS_OFFSET-correctly.patch |  76 ++
 .../0004-arm64-kdump-identify-memory-regions.patch | 202 ++
 ...5-arm64-kdump-add-elf-core-header-segment.patch | 191 +
 ...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 
 .../0007-arm64-kdump-set-up-other-segments.patch   |  35 +
 ...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 
 ...-kdump-Add-support-for-binary-image-files.patch |  52 ++
 .../kexec/kexec-tools/kexec-aarch64.patch  | 801 -
 .../kexec/kexec-tools/kexec-x32.patch  |  88 ---
 ...kexec-tools_2.0.12.bb => kexec-tools_2.0.14.bb} |  15 +-
 12 files changed, 1126 insertions(+), 893 deletions(-)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
 rename meta/recipes-kernel/kexec/{kexec-tools_2.0.12.bb => 
kexec-tools_2.0.14.bb} (55%)

diff --git 
a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
new file mode 100644
index 000..dc8f9b1
--- /dev/null
+++ 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
@@ -0,0 +1,78 @@
+From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001
+From: AKASHI Takahiro 
+Date: Mon, 17 Oct 2016 13:56:58 +0900
+Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line
+
+The current kexec_iomem_for_each_line() counts up all the lines for which
+a callback function returns zero(0) or positive, and otherwise it stops
+further scanning.
+This behavior is incovenient in some cases. For instance, on arm64, we want
+to count up "System RAM" entries, but need to skip "reserved" entries.
+
+So this patch extends the semantics so that we will continue to scan
+succeeding entries but not count lines for which a callback function
+returns positive.
+
+The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not
+be affected by this change because
+* arm
+  The callback function only returns -1 or 0, and the return value of
+  kexec_iomem_for_each_line() will never be used.
+* sh, x86
+  The callback function may return (-1 for sh,) 0 or 1, but always returns
+  1 once we have reached the maximum number of entries allowed.
+  Even so the current kexec_iomem_for_each_line() counts them up.
+  This change actually fixes this bug.
+
+Upstream-Status: Submitted 
[http://lists.infradead.org/pipermail/kexec/2016-November/017556.html]
+
+Signed-off-by: AKASHI Takahiro 
+Signed-off-by: He Zhe 
+---
+ kexec/kexec-iomem.c | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c
+index 485a2e8..0a0277a 100644
+--- a/kexec/kexec-iomem.c
 b/kexec/kexec-iomem.c
+@@ -18,6 +18,9 @@
+  * Iterate over each line in the file returned by proc_iomem(). If match is
+  * NULL or if the line matches with our match-pattern then call the
+  * callback if non-NULL.
++ * If match is NULL, callback should return a negative if error.
++ * Otherwise the interation goes on, incrementing nr but only if callback
++ * returns 0 (matched).
+  *
+  * Return the number of lines matched.
+  */
+@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match,
+   char *str;
+   

[OE-core] [PATCH v2 1/1] kexec-tools: Upgrade to 2.0.14

2016-12-26 Thread zhe.he
From: He Zhe 

Remove kexec-aarch64.patch since it has been merged upstream
Remove kexec-x32.patch since it has been reverted upstream
Backport patches for kdump arm64 from:
https://git.linaro.org/people/takahiro.akashi/kexec-tools.git

Signed-off-by: He Zhe 
---
 ...nd-the-semantics-of-kexec_iomem_for_each_.patch |  78 
 ...eneralize-and-rename-get_kernel_stext_sym.patch | 194 
 ...0003-arm64-identify-PHYS_OFFSET-correctly.patch |  76 
 .../0004-arm64-kdump-identify-memory-regions.patch | 202 +
 ...5-arm64-kdump-add-elf-core-header-segment.patch | 191 +++
 ...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 ++
 .../0007-arm64-kdump-set-up-other-segments.patch   |  35 
 ...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 +++
 ...-kdump-Add-support-for-binary-image-files.patch |  52 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb|  37 
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb|  44 +
 11 files changed, 1159 insertions(+), 37 deletions(-)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb

diff --git 
a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
new file mode 100644
index 000..822f28c
--- /dev/null
+++ 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
@@ -0,0 +1,78 @@
+From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001
+From: AKASHI Takahiro 
+Date: Mon, 17 Oct 2016 13:56:58 +0900
+Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line
+
+The current kexec_iomem_for_each_line() counts up all the lines for which
+a callback function returns zero(0) or positive, and otherwise it stops
+further scanning.
+This behavior is incovenient in some cases. For instance, on arm64, we want
+to count up "System RAM" entries, but need to skip "reserved" entries.
+
+So this patch extends the semantics so that we will continue to scan
+succeeding entries but not count lines for which a callback function
+returns positive.
+
+The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not
+be affected by this change because
+* arm
+  The callback function only returns -1 or 0, and the return value of
+  kexec_iomem_for_each_line() will never be used.
+* sh, x86
+  The callback function may return (-1 for sh,) 0 or 1, but always returns
+  1 once we have reached the maximum number of entries allowed.
+  Even so the current kexec_iomem_for_each_line() counts them up.
+  This change actually fixes this bug.
+
+Upstream-Status: Backport 
[https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
+
+Signed-off-by: AKASHI Takahiro 
+Signed-off-by: He Zhe 
+---
+ kexec/kexec-iomem.c | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c
+index 485a2e8..0a0277a 100644
+--- a/kexec/kexec-iomem.c
 b/kexec/kexec-iomem.c
+@@ -18,6 +18,9 @@
+  * Iterate over each line in the file returned by proc_iomem(). If match is
+  * NULL or if the line matches with our match-pattern then call the
+  * callback if non-NULL.
++ * If match is NULL, callback should return a negative if error.
++ * Otherwise the interation goes on, incrementing nr but only if callback
++ * returns 0 (matched).
+  *
+  * Return the number of lines matched.
+  */
+@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match,
+   char *str;
+   int consumed;
+   int count;
+-  int nr = 0;
++  int nr = 0, ret;
+ 
+   fp = fopen(iomem, "r");
+   if 

[OE-core] [PATCH v2 0/1] kexec-tools: Upgrade to 2.0.14

2016-12-26 Thread zhe.he
From: He Zhe 

Remove kexec-aarch64.patch since it has been merged upstream
Remove kexec-x32.patch since it has been reverted upstream
Backport patches for kdump arm64 from:
https://git.linaro.org/people/takahiro.akashi/kexec-tools.git

v1 to v2: Remove redundant tarball link in SRC_URI

He Zhe (1):
  kexec-tools: Upgrade to 2.0.14

 ...nd-the-semantics-of-kexec_iomem_for_each_.patch |  78 
 ...eneralize-and-rename-get_kernel_stext_sym.patch | 194 
 ...0003-arm64-identify-PHYS_OFFSET-correctly.patch |  76 
 .../0004-arm64-kdump-identify-memory-regions.patch | 202 +
 ...5-arm64-kdump-add-elf-core-header-segment.patch | 191 +++
 ...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 ++
 .../0007-arm64-kdump-set-up-other-segments.patch   |  35 
 ...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 +++
 ...-kdump-Add-support-for-binary-image-files.patch |  52 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb|  37 
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb|  44 +
 11 files changed, 1159 insertions(+), 37 deletions(-)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb

-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kexec-tools: Update to 2.0.14

2016-12-21 Thread zhe.he
From: He Zhe 

Remove kexec-aarch64.patch since it has been merged upstream
Remove kexec-x32.patch since it has been reverted upstream
Backport patches for kdump arm64 from:
https://git.linaro.org/people/takahiro.akashi/kexec-tools.git

Signed-off-by: He Zhe 
---
 ...nd-the-semantics-of-kexec_iomem_for_each_.patch |  78 
 ...eneralize-and-rename-get_kernel_stext_sym.patch | 194 
 ...0003-arm64-identify-PHYS_OFFSET-correctly.patch |  76 
 .../0004-arm64-kdump-identify-memory-regions.patch | 202 +
 ...5-arm64-kdump-add-elf-core-header-segment.patch | 191 +++
 ...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 ++
 .../0007-arm64-kdump-set-up-other-segments.patch   |  35 
 ...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 +++
 ...-kdump-Add-support-for-binary-image-files.patch |  52 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb|  37 
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb|  44 +
 11 files changed, 1159 insertions(+), 37 deletions(-)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb

diff --git 
a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
new file mode 100644
index 000..822f28c
--- /dev/null
+++ 
b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
@@ -0,0 +1,78 @@
+From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001
+From: AKASHI Takahiro 
+Date: Mon, 17 Oct 2016 13:56:58 +0900
+Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line
+
+The current kexec_iomem_for_each_line() counts up all the lines for which
+a callback function returns zero(0) or positive, and otherwise it stops
+further scanning.
+This behavior is incovenient in some cases. For instance, on arm64, we want
+to count up "System RAM" entries, but need to skip "reserved" entries.
+
+So this patch extends the semantics so that we will continue to scan
+succeeding entries but not count lines for which a callback function
+returns positive.
+
+The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not
+be affected by this change because
+* arm
+  The callback function only returns -1 or 0, and the return value of
+  kexec_iomem_for_each_line() will never be used.
+* sh, x86
+  The callback function may return (-1 for sh,) 0 or 1, but always returns
+  1 once we have reached the maximum number of entries allowed.
+  Even so the current kexec_iomem_for_each_line() counts them up.
+  This change actually fixes this bug.
+
+Upstream-Status: Backport 
[https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
+
+Signed-off-by: AKASHI Takahiro 
+Signed-off-by: He Zhe 
+---
+ kexec/kexec-iomem.c | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c
+index 485a2e8..0a0277a 100644
+--- a/kexec/kexec-iomem.c
 b/kexec/kexec-iomem.c
+@@ -18,6 +18,9 @@
+  * Iterate over each line in the file returned by proc_iomem(). If match is
+  * NULL or if the line matches with our match-pattern then call the
+  * callback if non-NULL.
++ * If match is NULL, callback should return a negative if error.
++ * Otherwise the interation goes on, incrementing nr but only if callback
++ * returns 0 (matched).
+  *
+  * Return the number of lines matched.
+  */
+@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match,
+   char *str;
+   int consumed;
+   int count;
+-  int nr = 0;
++  int nr = 0, ret;
+ 
+   fp = fopen(iomem, "r");
+   if 

[OE-core] [PATCH] qemu: Fix pci-assign

2016-11-29 Thread zhe.he
From: He Zhe 

Fix iommu pci device assignment failure.

"qemu-system-x86_64: -device pci-assign,host=02:00.0: No IOMMU found.
Unable to assign device "(null)""

Signed-off-by: He Zhe 
---
 ...sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch | 71 ++
 meta/recipes-devtools/qemu/qemu_2.7.0.bb   |  1 +
 2 files changed, 72 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch

diff --git 
a/meta/recipes-devtools/qemu/qemu/0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch
 
b/meta/recipes-devtools/qemu/qemu/0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch
new file mode 100644
index 000..03472dd
--- /dev/null
+++ 
b/meta/recipes-devtools/qemu/qemu/0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch
@@ -0,0 +1,71 @@
+From 6baa545df93253fced4fc0d52b14b98447e00473 Mon Sep 17 00:00:00 2001
+From: Peter Xu 
+Date: Mon, 28 Nov 2016 15:02:44 +0800
+Subject: [PATCH] pci-assign: sync MSI/MSI-X cap and table with PCIDevice
+
+Since commit e1d4fb2d ("kvm-irqchip: x86: add msi route notify fn"),
+kvm_irqchip_add_msi_route() starts to use pci_get_msi_message() to fetch
+MSI info. This requires that we setup MSI related fields in PCIDevice.
+For most devices, that won't be a problem, as long as we are using
+general interfaces like msi_init()/msix_init().
+
+However, for pci-assign devices, MSI/MSI-X is treated differently - PCI
+assign devices are maintaining its own MSI table and cap information in
+AssignedDevice struct. however that's not synced up with PCIDevice's
+fields. That will leads to pci_get_msi_message() failed to find correct
+MSI capability, even with an NULL msix_table.
+
+A quick fix is to sync up the two places: both the capability bits and
+table address for MSI/MSI-X.
+
+Upstream-Status: Backport 
[https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg04649.html]
+
+Reported-by: Changlimin 
+Tested-by: Changlimin 
+Cc: address@hidden
+Fixes: e1d4fb2d ("kvm-irqchip: x86: add msi route notify fn")
+Signed-off-by: Peter Xu 
+Signed-off-by: He Zhe 
+---
+ hw/i386/kvm/pci-assign.c | 4 
+ 1 file changed, 4 insertions(+)
+
+diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
+index 8238fbc..87dcbdd 100644
+--- a/hw/i386/kvm/pci-assign.c
 b/hw/i386/kvm/pci-assign.c
+@@ -1251,6 +1251,7 @@ static int assigned_device_pci_cap_init(PCIDevice 
*pci_dev, Error **errp)
+ error_propagate(errp, local_err);
+ return -ENOTSUP;
+ }
++dev->dev.cap_present |= QEMU_PCI_CAP_MSI;
+ dev->cap.available |= ASSIGNED_DEVICE_CAP_MSI;
+ /* Only 32-bit/no-mask currently supported */
+ ret = pci_add_capability2(pci_dev, PCI_CAP_ID_MSI, pos, 10,
+@@ -1285,6 +1286,7 @@ static int assigned_device_pci_cap_init(PCIDevice 
*pci_dev, Error **errp)
+ error_propagate(errp, local_err);
+ return -ENOTSUP;
+ }
++dev->dev.cap_present |= QEMU_PCI_CAP_MSIX;
+ dev->cap.available |= ASSIGNED_DEVICE_CAP_MSIX;
+ ret = pci_add_capability2(pci_dev, PCI_CAP_ID_MSIX, pos, 12,
+   _err);
+@@ -1648,6 +1650,7 @@ static void 
assigned_dev_register_msix_mmio(AssignedDevice *dev, Error **errp)
+ dev->msix_table = NULL;
+ return;
+ }
++dev->dev.msix_table = (uint8_t *)dev->msix_table;
+ 
+ assigned_dev_msix_reset(dev);
+ 
+@@ -1665,6 +1668,7 @@ static void 
assigned_dev_unregister_msix_mmio(AssignedDevice *dev)
+ error_report("error unmapping msix_table! %s", strerror(errno));
+ }
+ dev->msix_table = NULL;
++dev->dev.msix_table = NULL;
+ }
+ 
+ static const VMStateDescription vmstate_assigned_device = {
+-- 
+2.8.3
+
diff --git a/meta/recipes-devtools/qemu/qemu_2.7.0.bb 
b/meta/recipes-devtools/qemu/qemu_2.7.0.bb
index cef181d..9da5134 100644
--- a/meta/recipes-devtools/qemu/qemu_2.7.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.7.0.bb
@@ -13,6 +13,7 @@ SRC_URI += 
"file://configure-fix-Darwin-target-detection.patch \
 file://0002-fix-CVE-2016-7423.patch \
 file://0003-fix-CVE-2016-7908.patch \
 file://0004-fix-CVE-2016-7909.patch \
+
file://0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch \
 "
 
 SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2;
-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] guile: Remove bashisms

2016-09-26 Thread zhe.he
From: He Zhe 

Remove bashisms from do_populate_sysroot task

Signed-off-by: Peter Kjellerstedt 
Signed-off-by: He Zhe 
---
 meta/recipes-devtools/guile/guile_2.0.12.bb | 29 +
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb 
b/meta/recipes-devtools/guile/guile_2.0.12.bb
index d2fe511..751a035 100644
--- a/meta/recipes-devtools/guile/guile_2.0.12.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.12.bb
@@ -87,22 +87,27 @@ SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
 
 guile_cross_config() {
# this is only for target recipe
-   if [ "${PN}" = "guile" ]
-   then
-   # Create guile-config returning target values instead of native 
values
-   install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
-   echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e 
main -s\n!#\n(define %guile-build-info '\'\( \
-   > ${B}/guile-config.cross
-   sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
+   [ "${PN}" = "${BPN}" ] || return 0
+
+   vars=$(sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
-e 's:",[ \t]*": . ":' \
-e 's:" *}, *\\:"):' \
-e 's:^.*cachedir.*$::' \
-e '/^  (/p' \
-   < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
-   echo '))' >> ${B}/guile-config.cross
-   cat ${B}/meta/guile-config >> ${B}/guile-config.cross
-   install ${B}/guile-config.cross 
${STAGING_BINDIR_CROSS}/guile-config
-   fi
+   < ${B}/libguile/libpath.h)
+
+   # Create guile-config returning target values instead of native values
+   install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+   cat <${B}/guile-config.cross
+#!$(which ${BUILD_SYS}-guile) \\
+--no-auto-compile -e main -s
+!#
+(define %guile-build-info '(
+$vars
+))
+EOF
+   cat ${B}/meta/guile-config >> ${B}/guile-config.cross
+   install ${B}/guile-config.cross 
${SYSROOT_DESTDIR}${bindir_crossscripts}/guile-config
 }
 
 # Guile needs the compiled files to be newer than the source, and it won't
-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] Remove bashisms

2016-09-22 Thread zhe.he
From: "Tim K. Chan" 

Signed-off-by: Tim K. Chan 
[
Adjust context
Use Peter Kjellerstedt's simpler guile_cross_config
]
Signed-off-by: He Zhe 
---
 meta/classes/systemd.bbclass   |  4 +--
 meta/classes/update-rc.d.bbclass   |  6 ++--
 .../resolvconf/resolvconf_1.79.bb  |  2 +-
 meta/recipes-core/glibc/glibc-package.inc  |  2 +-
 meta/recipes-devtools/guile/guile_2.0.12.bb| 37 --
 meta/recipes-devtools/rpm/rpm_5.4.16.bb| 13 ++--
 6 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index db7873f..7370489 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -28,7 +28,7 @@ if [ -n "$D" ]; then
 OPTS="--root=$D"
 fi
 
-if type systemctl >/dev/null 2>/dev/null; then
+if command -p systemctl >/dev/null 2>/dev/null; then
systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 
if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
@@ -44,7 +44,7 @@ if [ -n "$D" ]; then
 OPTS="--root=$D"
 fi
 
-if type systemctl >/dev/null 2>/dev/null; then
+if command -p systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl stop ${SYSTEMD_SERVICE}
fi
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 82b8024..dee80c8 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -15,7 +15,7 @@ updatercd_preinst() {
 if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
 fi
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-f -r $D"
else
@@ -26,7 +26,7 @@ fi
 }
 
 updatercd_postinst() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
else
@@ -43,7 +43,7 @@ fi
 }
 
 updatercd_postrm() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-f -r $D"
else
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb 
b/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
index 8550177..e415445 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
@@ -56,7 +56,7 @@ do_install () {
 
 pkg_postinst_${PN} () {
if [ -z "$D" ]; then
-   if command -v systemd-tmpfiles >/dev/null; then
+   if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create 
${sysconfdir}/tmpfiles.d/resolvconf.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 6df8b9e..557f32a 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -206,7 +206,7 @@ glibc_package_preprocess () {
 
 pkg_postinst_nscd () {
if [ -z "$D" ]; then
-   if command -v systemd-tmpfiles >/dev/null; then
+   if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create 
${sysconfdir}/tmpfiles.d/nscd.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb 
b/meta/recipes-devtools/guile/guile_2.0.12.bb
index d2fe511..a466d65 100644
--- a/meta/recipes-devtools/guile/guile_2.0.12.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.12.bb
@@ -87,22 +87,27 @@ SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
 
 guile_cross_config() {
# this is only for target recipe
-   if [ "${PN}" = "guile" ]
-   then
-   # Create guile-config returning target values instead of native 
values
-   install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
-   echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e 
main -s\n!#\n(define %guile-build-info '\'\( \
-   > ${B}/guile-config.cross
-   sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
-   -e 's:",[ \t]*": . ":' \
-   -e 's:" *}, *\\:"):' \
-   -e 's:^.*cachedir.*$::' \
-   -e '/^  (/p' \
-   < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
-   echo '))' >> ${B}/guile-config.cross
-   cat ${B}/meta/guile-config >> ${B}/guile-config.cross
-   

[OE-core] [PATCH] bash2dash conversion

2016-09-17 Thread zhe.he
From: "Tim K. Chan" 

Change bash style to dash style

Signed-off-by: Tim K. Chan 
[Adjust context]
Signed-off-by: He Zhe 
---
 meta/classes/systemd.bbclass|  4 ++--
 meta/classes/update-rc.d.bbclass|  6 +++---
 meta/classes/useradd_base.bbclass   |  4 ++--
 meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb |  2 +-
 meta/recipes-core/glibc/glibc-package.inc   |  2 +-
 meta/recipes-devtools/guile/guile_2.0.12.bb |  6 --
 meta/recipes-devtools/rpm/rpm_5.4.16.bb | 13 +++--
 7 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index db7873f..7370489 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -28,7 +28,7 @@ if [ -n "$D" ]; then
 OPTS="--root=$D"
 fi
 
-if type systemctl >/dev/null 2>/dev/null; then
+if command -p systemctl >/dev/null 2>/dev/null; then
systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 
if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
@@ -44,7 +44,7 @@ if [ -n "$D" ]; then
 OPTS="--root=$D"
 fi
 
-if type systemctl >/dev/null 2>/dev/null; then
+if command -p systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl stop ${SYSTEMD_SERVICE}
fi
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 82b8024..dee80c8 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -15,7 +15,7 @@ updatercd_preinst() {
 if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
 fi
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-f -r $D"
else
@@ -26,7 +26,7 @@ fi
 }
 
 updatercd_postinst() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
else
@@ -43,7 +43,7 @@ fi
 }
 
 updatercd_postrm() {
-if type update-rc.d >/dev/null 2>/dev/null; then
+if command -p update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-f -r $D"
else
diff --git a/meta/classes/useradd_base.bbclass 
b/meta/classes/useradd_base.bbclass
index f4dc713..35d5f06 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -59,10 +59,10 @@ perform_groupmems () {
gshadow="no"
touch $rootdir${sysconfdir}/gshadow
fi
-   local mem_exists="`grep 
"^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || 
true`"
+   local mem_exists="`grep 
"^$groupname:[!:]*:[!:]*:\([!,]*,\)*$username\(,[!,]*\)*" $rootdir/etc/group || 
true`"
if test "x$mem_exists" = "x"; then
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems 
\$opts\" || true
-   mem_exists="`grep 
"^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || 
true`"
++  mem_exists="`grep 
"^$groupname:[!:]*:[!:]*:\([!,]*,\)*$username\(,[!,]*\)*" $rootdir/etc/group || 
true`"
if test "x$mem_exists" = "x"; then
bbfatal "${PN}: groupmems command did not succeed."
fi
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb 
b/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
index 8550177..e415445 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
@@ -56,7 +56,7 @@ do_install () {
 
 pkg_postinst_${PN} () {
if [ -z "$D" ]; then
-   if command -v systemd-tmpfiles >/dev/null; then
+   if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create 
${sysconfdir}/tmpfiles.d/resolvconf.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 6df8b9e..557f32a 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -206,7 +206,7 @@ glibc_package_preprocess () {
 
 pkg_postinst_nscd () {
if [ -z "$D" ]; then
-   if command -v systemd-tmpfiles >/dev/null; then
+   if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create 
${sysconfdir}/tmpfiles.d/nscd.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git 

[OE-core] [PATCH] perl: Correct perl path for ptest

2016-08-24 Thread zhe.he
From: He Zhe 

Substitute /usr/local with ${bindir}

Signed-off-by: He Zhe 
---
 meta/recipes-devtools/perl/perl-ptest.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/perl/perl-ptest.inc 
b/meta/recipes-devtools/perl/perl-ptest.inc
index bf6fde6..d136c5c 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -5,6 +5,7 @@ SRC_URI += "file://run-ptest \
 
 do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
+   sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile 
--exclude=makefile --exclude=hostperl \
-- 
2.8.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2 v4] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-05-25 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.

Signed-off-by: He Zhe 
---
 meta/classes/kernel-fitimage.bbclass|  20 ++--
 meta/classes/kernel-grub.bbclass|  44 +---
 meta/classes/kernel-uimage.bbclass  |  10 +-
 meta/classes/kernel.bbclass | 174 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  49 +
 6 files changed, 202 insertions(+), 96 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 298eda2..9a3caf5 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot uboot-sign
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -187,7 +189,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its arch/${ARCH}/boot/fitImage
@@ -265,14 +267,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 kernel_do_deploy[vardepsexclude] = "DATETIME"
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   
its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..f7dcc07 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f "$D/boot/grub/menu.list" ] && grubcfg="$D/boot/grub/menu.list"
[ -f "$D/boot/grub/grub.cfg" ] && grubcfg="$D/boot/grub/grub.cfg"
if [ -n "$grubcfg" ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE} \+root=" $grubcfg; then
-   if [ -L "$D/boot/${KERNEL_IMAGETYPE}" ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2>/dev/null`
+   if grep -q "/KERNEL_IMAGETYPE \+root=" $grubcfg; then
+   if [ -L "$D/boot/KERNEL_IMAGETYPE" ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2>/dev/null`
if [ -f "$D$kimage" ]; then
-   sed -i "s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=:" $grubcfg
+   sed -i "s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=:" $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if 

[OE-core] [PATCH v4 0/2] Yocto Bug #6945

2016-05-25 Thread zhe.he
From: He Zhe 

This has been reviewed several rounds and no more comments are provided so far.
Here is the brief history. More details can be found in the previous threads.
Hopefully this can be merged in v2.2 m1.

v1 to v2: 
 - Change KERNEL_OUTPUT to KERNEL_OUTPUT_DIR and update comments
 - Update related doc files
 - Replace all KERNEL_ALT_IMAGETYPEs with KERNEL_IMAGETYPES
 - Link built vmlinuz to boot directory for reference

v2 to v3: 
 - Merge existing KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES in order that 
users can still use the old variables.
 - Run oe_rummake in a loop for every types so that we can add different 
configurations to them easily in the future.
 - Warn, intead of die, users if one of the types are over the size limit.
 - Remove the replacement of KERNEL_ALT_IMAGETYPE in v2. 
 - Remove the doc parts. They will be submitted yocto-docs later.
 - Change some grep usage to make it more clear.
 - Correct a typo.

v3 to v4: 
 - Adjust according to the latest code context

The following changes since commit c7e614c438706fb3ed7520b4990ebb3973366942:

  useradd: Fix infinite build loop (2016-05-23 10:33:45 +0100)

are available in the git repository at:

  git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/?h=zhe%2Fyocto-bug-6945

for you to fetch changes up to 4cd0e844d4153f2eb2cc54fafbfd161341ef4539:

  kernel: Make symbol link to vmlinuz in boot directory (2016-05-24 22:57:35 
-0400)


He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 meta/classes/kernel-fitimage.bbclass  |  20 ---
 meta/classes/kernel-grub.bbclass  |  44 
+---
 meta/classes/kernel-uimage.bbclass|  10 +---
 meta/classes/kernel.bbclass   | 187 
---
 meta/conf/documentation.conf  |   3 ++-
 meta/recipes-kernel/linux/linux-dtb.inc   |  49 
++--
 meta/recipes-kernel/linux/linux-yocto.inc |   2 +-
 7 files changed, 212 insertions(+), 103 deletions(-)

He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 meta/classes/kernel-fitimage.bbclass  |  20 ++--
 meta/classes/kernel-grub.bbclass  |  44 ---
 meta/classes/kernel-uimage.bbclass|  10 +-
 meta/classes/kernel.bbclass   | 187 +-
 meta/conf/documentation.conf  |   3 +-
 meta/recipes-kernel/linux/linux-dtb.inc   |  49 +---
 meta/recipes-kernel/linux/linux-yocto.inc |   2 +-
 7 files changed, 212 insertions(+), 103 deletions(-)

-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2 v4] kernel: Make symbol link to vmlinuz in boot directory

2016-05-25 Thread zhe.he
From: He Zhe 

Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signen-off-by: He Zhe 
---
 meta/classes/kernel.bbclass   | 13 -
 meta/conf/documentation.conf  |  2 +-
 meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index e7e2cb3..dcf8bae 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -484,15 +484,18 @@ python split_kernel_packages () {
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+   if [ -f ../../../vmlinuz ]; then
+   ln -sf ../../../vmlinuz
+   fi
 }
 
 do_strip() {
@@ -522,7 +525,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in 
partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index dcc324c..c0025f5 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite 
files from the compi
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto 
style kernel"
 do_kernel_configcheck[doc] = "Validates the kernel configuration for a 
linux-yocto style kernel"
 do_kernel_configme[doc] = "Assembles the kernel configuration for a 
linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux and vmlinuz kernel images"
 do_listtasks[doc] = "Lists all defined tasks for a target"
 do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
 do_package[doc] = "Analyzes the content of the holding area and splits it into 
subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index bd91570..0af9f8c 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -53,6 +53,6 @@ do_install_append(){
 }
 
 # extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 1/2] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-05-12 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.

Signed-off-by: He Zhe 
---
 meta/classes/kernel-fitimage.bbclass|  20 ++--
 meta/classes/kernel-grub.bbclass|  44 +---
 meta/classes/kernel-uimage.bbclass  |  22 ++--
 meta/classes/kernel.bbclass | 174 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  49 +
 6 files changed, 208 insertions(+), 102 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 809bd4d..86a8ff8 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot uboot-sign
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -187,7 +189,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its arch/${ARCH}/boot/fitImage
@@ -265,14 +267,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 kernel_do_deploy[vardepsexclude] = "DATETIME"
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   
its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..f7dcc07 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f "$D/boot/grub/menu.list" ] && grubcfg="$D/boot/grub/menu.list"
[ -f "$D/boot/grub/grub.cfg" ] && grubcfg="$D/boot/grub/grub.cfg"
if [ -n "$grubcfg" ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE} \+root=" $grubcfg; then
-   if [ -L "$D/boot/${KERNEL_IMAGETYPE}" ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2>/dev/null`
+   if grep -q "/KERNEL_IMAGETYPE \+root=" $grubcfg; then
+   if [ -L "$D/boot/KERNEL_IMAGETYPE" ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2>/dev/null`
if [ -f "$D$kimage" ]; then
-   sed -i "s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=:" $grubcfg
+   sed -i "s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=:" $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   

[OE-core] [PATCH v4 2/2] kernel: Make symbol link to vmlinuz in boot directory

2016-05-12 Thread zhe.he
From: He Zhe 

Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signen-off-by: He Zhe 
---
 meta/classes/kernel.bbclass   | 13 -
 meta/conf/documentation.conf  |  2 +-
 meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 775c827..28d0936 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -474,15 +474,18 @@ python split_kernel_packages () {
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+   if [ -f ../../../vmlinuz ]; then
+   ln -sf ../../../vmlinuz
+   fi
 }
 
 do_strip() {
@@ -512,7 +515,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in 
partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index dcc324c..c0025f5 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite 
files from the compi
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto 
style kernel"
 do_kernel_configcheck[doc] = "Validates the kernel configuration for a 
linux-yocto style kernel"
 do_kernel_configme[doc] = "Assembles the kernel configuration for a 
linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux and vmlinuz kernel images"
 do_listtasks[doc] = "Lists all defined tasks for a target"
 do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
 do_package[doc] = "Analyzes the content of the holding area and splits it into 
subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc..fd68786 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -52,6 +52,6 @@ do_install_append(){
 }
 
 # extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 0/2] Yocto Bug #6945

2016-05-12 Thread zhe.he
From: He Zhe 

This has been reviewed several rounds and no more comments are provided so far.
Here are the brief history. More details can be found in the previous threads.

v1 to v2:
 - Change KERNEL_OUTPUT to KERNEL_OUTPUT_DIR and update comments
 - Update related doc files
 - Replace all KERNEL_ALT_IMAGETYPEs with KERNEL_IMAGETYPES
 - Link built vmlinuz to boot directory for reference

v2 to v3:
 - Merge existing KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES in order that 
users can still use the old variables.
 - Run oe_rummake in a loop for every types so that we can add different 
configurations to them easily in the future.
 - Warn, intead of die, users if one of the types are over the size limit.
 - Remove the replacement of KERNEL_ALT_IMAGETYPE in v2.
 - Remove the doc parts. They will be submitted yocto-docs later.
 - Change some grep usage to make it more clear.
 - Correct a typo.

v3 to v4:
 - Adjust according to the latest code context

The following changes since commit 7ca60ec8bff7656b4e52f5a4d238913e851da089:

  test-empty-image: Fix LIC_FILES_CHKSUM typo (2016-05-06 10:48:06 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/?h=zhe%2Fyocto-bug-6945

for you to fetch changes up to 1f37fe5af2c41d0a4e1aa5543466a48d3ae41ddc:

  kernel: Make symbol link to vmlinuz in boot directory (2016-05-11 04:05:08 
-0400)


He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 meta/classes/kernel-fitimage.bbclass  |  20 ---
 meta/classes/kernel-grub.bbclass  |  44 
+---
 meta/classes/kernel-uimage.bbclass|  22 
 meta/classes/kernel.bbclass   | 187 
---
 meta/conf/documentation.conf  |   3 ++-
 meta/recipes-kernel/linux/linux-dtb.inc   |  49 
++--
 meta/recipes-kernel/linux/linux-yocto.inc |   2 +-
 7 files changed, 218 insertions(+), 109 deletions(-)

-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] acl: Fix re pattern in test cases

2016-03-02 Thread zhe.he
From: He Zhe 

ls adds a '.' at the end of the permission field list on SELinux
machines, filter this out so root tests work on SELinux machines.
And backport one patch for other tests.

Signed-off-by: He Zhe 
---
 meta/recipes-support/attr/acl.inc  |   2 +
 .../acl/test-fix-insufficient-quoting-of.patch | 108 +
 ...ps-on-SELinux-machines-for-root-testcases.patch |  84 
 3 files changed, 194 insertions(+)
 create mode 100644 
meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
 create mode 100644 
meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch

diff --git a/meta/recipes-support/attr/acl.inc 
b/meta/recipes-support/attr/acl.inc
index b2bc8ba..198fb4f 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -12,6 +12,8 @@ DEPENDS = "attr"
 SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
file://run-ptest \
file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
+   file://test-fix-insufficient-quoting-of.patch \
+   file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
 "

 require ea-acl.inc
diff --git 
a/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch 
b/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
new file mode 100644
index 000..59e4629
--- /dev/null
+++ b/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -0,0 +1,108 @@
+From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
+From: Kamil Dudka 
+Date: Mon, 20 May 2013 16:38:06 +0200
+Subject: [PATCH] test: fix insufficient quoting of '\'
+
+This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
+caused sbits-restore.test to fail in the following way in case SELinux
+was disabled:
+
+*** sbits-restore.test ***
+[3] $ umask 022 -- ok
+[4] $ mkdir d -- ok
+[5] $ touch d/g -- ok
+[6] $ touch d/u -- ok
+[7] $ chmod u+s d/u -- ok
+[8] $ chmod g+s d/g -- ok
+[9] $ chmod +t d -- ok
+[10] $ getfacl -R d > d.acl -- ok
+[11] $ rm -R d -- ok
+[12] $ mkdir d -- ok
+[13] $ touch d/g -- ok
+[14] $ touch d/u -- ok
+[15] $ setfacl --restore d.acl -- ok
+[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
+drwxr-xr- != drwxr-xr-t
+[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
+-rwSr--r- != -rwSr--r--
+[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
+-rw-r-Sr- != -rw-r-Sr--
+[22] $ rm -Rf d -- ok
+17 commands (14 passed, 3 failed)
+
+Upstream-Status: Backport
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d
+
+Signed-off-by: Kamil Dudka 
+Signed-off-by: He Zhe 
+---
+ test/cp.test| 2 +-
+ test/misc.test  | 6 +++---
+ test/sbits-restore.test | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/test/cp.test b/test/cp.test
+index 0867f63..a927195 100644
+--- a/test/cp.test
 b/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+   > -rw-rw-r--+
+
+   $ cp f g
+-  $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
++  $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
+   > -rw-r--r--
+
+   $ rm g
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..29372b7 100644
+--- a/test/misc.test
 b/test/misc.test
+@@ -254,7 +254,7 @@ Add some users and groups
+ Symlink in directory with default ACL?
+
+   $ ln -s d d/l
+-  $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
++  $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
+   > lrwxrwxrwx
+
+   $ ls -dl -L d/l | awk '{print $1}'
+@@ -343,7 +343,7 @@ Remove the default ACL
+ Reset to base entries
+
+   $ setfacl -b d
+-  $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++  $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+   > drwxr-x---
+
+   $ getfacl --omit-header d
+@@ -355,7 +355,7 @@ Reset to base entries
+ Now, chmod should change the group_obj entry
+
+   $ chmod 775 d
+-  $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++  $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+   > drwxrwxr-x
+
+   $ getfacl --omit-header d
+diff --git a/test/sbits-restore.test b/test/sbits-restore.test
+index de21340..5899b0a 100644
+--- a/test/sbits-restore.test
 b/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+   $ touch d/g
+   $ touch d/u
+   $ setfacl --restore d.acl
+-  $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++  $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+   > drwxr-xr-t
+-  $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
++  $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
+   > 

[OE-core] [PATCH v3 2/2] kernel: Make symbol link to vmlinuz in boot directory

2016-02-24 Thread zhe.he
From: He Zhe 

Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signen-off-by: He Zhe 
---
 meta/classes/kernel.bbclass   | 13 -
 meta/conf/documentation.conf  |  2 +-
 meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3f92fdc..8cc944c 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -474,15 +474,18 @@ python split_kernel_packages () {
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+   if [ -f ../../../vmlinuz ]; then
+   ln -sf ../../../vmlinuz
+   fi
 }
 
 do_strip() {
@@ -512,7 +515,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in 
partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index b3969b0..f0c2399 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite 
files from the compi
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto 
style kernel"
 do_kernel_configcheck[doc] = "Validates the kernel configuration for a 
linux-yocto style kernel"
 do_kernel_configme[doc] = "Assembles the kernel configuration for a 
linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux and vmlinuz kernel images"
 do_listtasks[doc] = "Lists all defined tasks for a target"
 do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
 do_package[doc] = "Analyzes the content of the holding area and splits it into 
subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc..fd68786 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -52,6 +52,6 @@ do_install_append(){
 }
 
 # extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 1/2] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-02-24 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.

Signed-off-by: He Zhe 
---
 meta/classes/kernel-fitimage.bbclass|  20 ++--
 meta/classes/kernel-grub.bbclass|  44 +---
 meta/classes/kernel-uimage.bbclass  |  22 ++--
 meta/classes/kernel.bbclass | 174 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  49 +
 6 files changed, 208 insertions(+), 102 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f1b409c..633668f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +156,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its
@@ -217,14 +219,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   
its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..f7dcc07 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f "$D/boot/grub/menu.list" ] && grubcfg="$D/boot/grub/menu.list"
[ -f "$D/boot/grub/grub.cfg" ] && grubcfg="$D/boot/grub/grub.cfg"
if [ -n "$grubcfg" ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE} \+root=" $grubcfg; then
-   if [ -L "$D/boot/${KERNEL_IMAGETYPE}" ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2>/dev/null`
+   if grep -q "/KERNEL_IMAGETYPE \+root=" $grubcfg; then
+   if [ -L "$D/boot/KERNEL_IMAGETYPE" ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2>/dev/null`
if [ -f "$D$kimage" ]; then
-   sed -i "s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=:" $grubcfg
+   sed -i "s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=:" $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} \+root=" 
$grubcfg; then
-   

[OE-core] [PATCH v3 0/2] Yocto Bug #6945

2016-02-24 Thread zhe.he
From: He Zhe 

v1 to v2:
 - Change KERNEL_OUTPUT to KERNEL_OUTPUT_DIR and update comments
 - Update related doc files
 - Replace all KERNEL_ALT_IMAGETYPEs with KERNEL_IMAGETYPES
 - Link built vmlinuz to boot directory for reference

v2 to v3:
 - Merge existing KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES in order that 
users can still use the old variables.
 - Run oe_rummake in a loop for every types so that we can add different 
configurations to them easily in the future.
 - Warn, intead of die, users if one of the types are over the size limit.
 - Remove the replacement of KERNEL_ALT_IMAGETYPE in v2.
 - Remove the doc parts. They will be submitted yocto-docs later.
 - Change some grep usage to make it more clear.
 - Correct a typo.

The following changes since commit 23056103c949b498c23b47579e8dd57ce78e6ed9:

  uclibc: Do not use immediate expansion operator (2016-02-22 20:42:48 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/yocto-bug-6945

for you to fetch changes up to dc52a1efbb8248ea274a1cd0cca5734290b3025f:

  kernel: Make symbol link to vmlinuz in boot directory (2016-02-24 07:08:16 
-0500)


He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 meta/classes/kernel-fitimage.bbclass  |  20 ---
 meta/classes/kernel-grub.bbclass  |  44 
+---
 meta/classes/kernel-uimage.bbclass|  22 
 meta/classes/kernel.bbclass   | 187 
---
 meta/conf/documentation.conf  |   3 ++-
 meta/recipes-kernel/linux/linux-dtb.inc   |  49 
++--
 meta/recipes-kernel/linux/linux-yocto.inc |   2 +-
 7 files changed, 218 insertions(+), 109 deletions(-)

He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 meta/classes/kernel-fitimage.bbclass  |  20 ++--
 meta/classes/kernel-grub.bbclass  |  44 ---
 meta/classes/kernel-uimage.bbclass|  22 ++--
 meta/classes/kernel.bbclass   | 187 +-
 meta/conf/documentation.conf  |   3 +-
 meta/recipes-kernel/linux/linux-dtb.inc   |  49 +---
 meta/recipes-kernel/linux/linux-yocto.inc |   2 +-
 7 files changed, 218 insertions(+), 109 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 2/2] kernel: Make symbol link to vmlinuz in boot directory

2016-02-19 Thread zhe.he
From: He Zhe 

Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signed-off-by: He Zhe 
---
 documentation/ref-manual/ref-tasks.xml|  8 
 meta/classes/kernel.bbclass   | 13 -
 meta/conf/documentation.conf  |  2 +-
 meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/documentation/ref-manual/ref-tasks.xml 
b/documentation/ref-manual/ref-tasks.xml
index 8ac37a0..517663b 100644
--- a/documentation/ref-manual/ref-tasks.xml
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -663,13 +663,13 @@
 
 
 
-
-do_kernel_link_vmlinux
+
+do_kernel_link_images
 
 
 Creates a symbolic link in
-arch/$arch/boot for vmlinux kernel
-images.
+arch/$arch/boot for vmlinux and vmlinuz
+kernel images.
 
 
 
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6db2e2e..19b5132 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -467,15 +467,18 @@ python split_kernel_packages () {
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+   if [ -f ../../../vmlinuz ]; then
+   ln -sf ../../../vmlinuz
+   fi
 }
 
 do_strip() {
@@ -505,7 +508,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in 
partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index b3969b0..f0c2399 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite 
files from the compi
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto 
style kernel"
 do_kernel_configcheck[doc] = "Validates the kernel configuration for a 
linux-yocto style kernel"
 do_kernel_configme[doc] = "Assembles the kernel configuration for a 
linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux and vmlinuz kernel images"
 do_listtasks[doc] = "Lists all defined tasks for a target"
 do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
 do_package[doc] = "Analyzes the content of the holding area and splits it into 
subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc..fd68786 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -52,6 +52,6 @@ do_install_append(){
 }
 
 # extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 0/2] Yocto Bug #6945

2016-02-19 Thread zhe.he
From: He Zhe 

v1 to v2:
 - Change KERNEL_OUTPUT to KERNEL_OUTPUT_DIR and update comments
 - Update related doc files
 - Replace all KERNEL_ALT_IMAGETYPEs with KERNEL_IMAGETYPES
 - Link built vmlinuz to boot directory for reference

The following changes since commit ed20c6ca446a8788615e497bd4452195537deab5:

  epiphany: Add libxml2-native to DEPENDS (2016-02-19 01:01:26 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/yocto-bug-6945

for you to fetch changes up to 5ddb8ef58e1cd3c4b95de6439894510641f2e70a:

  kernel: Make symbol link to vmlinuz in boot directory (2016-02-19 04:23:28 
-0500)



He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 documentation/ref-manual/ref-tasks.xml |   8 +-
 documentation/ref-manual/ref-variables.xml |  10 +-
 meta-yocto-bsp/conf/machine/edgerouter.conf|   2 +-
 meta/classes/kernel-fitimage.bbclass   |  20 ++-
 meta/classes/kernel-grub.bbclass   |  44 +++--
 meta/classes/kernel-uimage.bbclass |  22 +--
 meta/classes/kernel.bbclass| 184 ++---
 meta/conf/documentation.conf   |   3 +-
 meta/conf/machine/qemumips.conf|   2 +-
 meta/conf/machine/qemumips64.conf  |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc|  49 +++---
 meta/recipes-kernel/linux/linux-yocto.inc  |   2 +-
 .../target/arch/mips/conf/machine/machine.conf |   2 +-
 .../target/arch/mips64/conf/machine/machine.conf   |   2 +-
 .../target/arch/qemu/conf/machine/machine.conf |   2 +-
 15 files changed, 228 insertions(+), 126 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 1/2] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-02-19 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE works as before. All KERNEL_ALT_IMAGETYPEs are
replaced by KERNEL_IMAGETYPES.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe 
---
 documentation/ref-manual/ref-variables.xml |  10 +-
 meta-yocto-bsp/conf/machine/edgerouter.conf|   2 +-
 meta/classes/kernel-fitimage.bbclass   |  20 +--
 meta/classes/kernel-grub.bbclass   |  44 --
 meta/classes/kernel-uimage.bbclass |  22 +--
 meta/classes/kernel.bbclass| 171 +++--
 meta/conf/documentation.conf   |   1 +
 meta/conf/machine/qemumips.conf|   2 +-
 meta/conf/machine/qemumips64.conf  |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc|  49 +++---
 .../target/arch/mips/conf/machine/machine.conf |   2 +-
 .../target/arch/mips64/conf/machine/machine.conf   |   2 +-
 .../target/arch/qemu/conf/machine/machine.conf |   2 +-
 13 files changed, 214 insertions(+), 115 deletions(-)

diff --git a/documentation/ref-manual/ref-variables.xml 
b/documentation/ref-manual/ref-variables.xml
index a76a8c2..a8e4fd8 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -6417,14 +6417,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
-KERNEL_ALT_IMAGETYPE
+KERNEL_IMAGETYPES
 
-KERNEL_ALT_IMAGETYPE[doc] = "Specifies an alternate kernel 
image type for creation."
+KERNEL_IMAGETYPES[doc] = "Specifies alternate kernel image 
types for creation."
 
 
 
 
-Specifies an alternate kernel image type for creation in
+Specifies alternate kernel image types for creation in
 addition to the kernel image type specified using the
 KERNEL_IMAGETYPE
 variable.
@@ -6612,8 +6612,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
-If you want to build an alternate kernel image type, use 
the
-KERNEL_ALT_IMAGETYPE
+If you want to build alternate kernel image types, use the
+KERNEL_IMAGETYPES
 variable.
 
 
diff --git a/meta-yocto-bsp/conf/machine/edgerouter.conf 
b/meta-yocto-bsp/conf/machine/edgerouter.conf
index 476e690..affd568 100644
--- a/meta-yocto-bsp/conf/machine/edgerouter.conf
+++ b/meta-yocto-bsp/conf/machine/edgerouter.conf
@@ -7,7 +7,7 @@ require conf/machine/include/tune-mips64.inc
 MACHINE_FEATURES = "pci ext2 ext3 serial"
 
 KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+KERNEL_IMAGETYPES = "vmlinux.bin"
 KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f1b409c..51df19d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +156,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its
@@ -217,14 +219,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   

[OE-core] [PATCH 1/1] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-02-17 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
KERNEL_IMAGETYPE works as before.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe 
---
 meta/classes/kernel-fitimage.bbclass|  20 ++--
 meta/classes/kernel-grub.bbclass|  44 ++---
 meta/classes/kernel-uimage.bbclass  |  22 +++--
 meta/classes/kernel.bbclass | 169 ++--
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  49 +
 6 files changed, 202 insertions(+), 103 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f1b409c..51df19d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +156,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its
@@ -217,14 +219,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   
its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..f7dcc07 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f "$D/boot/grub/menu.list" ] && grubcfg="$D/boot/grub/menu.list"
[ -f "$D/boot/grub/grub.cfg" ] && grubcfg="$D/boot/grub/grub.cfg"
if [ -n "$grubcfg" ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE} \+root=" $grubcfg; then
-   if [ -L "$D/boot/${KERNEL_IMAGETYPE}" ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2>/dev/null`
+   if grep -q "/KERNEL_IMAGETYPE \+root=" $grubcfg; then
+   if [ -L "$D/boot/KERNEL_IMAGETYPE" ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2>/dev/null`
if [ -f "$D$kimage" ]; then
-   sed -i "s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=:" $grubcfg
+   sed -i "s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=:" $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} \+root=" 
$grubcfg; then

[OE-core] [PATCH 0/1] Yocto Bug #6945

2016-02-17 Thread zhe.he
From: He Zhe 

This patch has been discussed previously and modified according to Richard's
suggestions, and adjusted against the latest code context.

The following changes since commit 152914f2983c5d69001de1d46ce99547fa1e75fe:

  oeqa/parselogs: Whitelist dmi firmware failure message in 4.4 kernels 
(2016-02-16 23:54:05 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/yocto-bug-6945

for you to fetch changes up to d36ac8034f8914c57c27a514b9a692c3c1377f42:

  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time 
(2016-02-17 04:37:59 -0500)



He Zhe (1):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

 meta/classes/kernel-fitimage.bbclass|  20 ++--
 meta/classes/kernel-grub.bbclass|  44 ++---
 meta/classes/kernel-uimage.bbclass  |  22 +++--
 meta/classes/kernel.bbclass | 169 ++--
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  49 +
 6 files changed, 202 insertions(+), 103 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 1/1] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2015-11-09 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
KERNEL_IMAGETYPE works as it did.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe 
---
 meta/classes/kernel-fitimage.bbclass|  21 +++--
 meta/classes/kernel-grub.bbclass|  46 ++---
 meta/classes/kernel-uimage.bbclass  |  22 +++--
 meta/classes/kernel.bbclass | 159 ++--
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  80 +---
 6 files changed, 212 insertions(+), 117 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2a56a54..e4b48fe 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,10 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+typeformake.replace('fitImage', 'zImage')
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +157,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its
@@ -217,14 +220,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   
its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..609f55c 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f "$D/boot/grub/menu.list" ] && grubcfg="$D/boot/grub/menu.list"
[ -f "$D/boot/grub/grub.cfg" ] && grubcfg="$D/boot/grub/grub.cfg"
if [ -n "$grubcfg" ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q "/${KERNEL_IMAGETYPE} \+root=" $grubcfg; then
-   if [ -L "$D/boot/${KERNEL_IMAGETYPE}" ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2>/dev/null`
+   if grep -q "/KERNEL_IMAGETYPE \+root=" $grubcfg; then
+   if [ -L "$D/boot/KERNEL_IMAGETYPE" ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2>/dev/null`
if [ -f "$D$kimage" ]; then
-   sed -i "s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=:" $grubcfg
+   sed -i "s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=:" $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if grep -q 

[OE-core] [PATCH v5 0/1] Yocto Bug #6945

2015-11-09 Thread zhe.he
From: He Zhe 

This patch has been discussed previously and modified according to Richard's
suggestions, and adjusted against the latest code context.

 - Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
 - KERNEL_IMAGETYPE works as it did.
 - v2: Update with the latest oe-core
 - v3: Add KERNEL_IMAGETYPES, leave KERNEL_IMAGETYPE as is
 - v4: Turn package name to lower case to meet opkg's requrement
   Modify "if test" in kernel-fitimage.bbclass and kernel-uimage.bbclass

The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1:

  build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 
+)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/yocto-bug-6945

for you to fetch changes up to 60c8a07a0e130d056862f6303cac080eb0fbc2d0:

  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time 
(2015-11-09 04:55:00 -0500)



He Zhe (1):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

 meta/classes/kernel-fitimage.bbclass|  21 +++--
 meta/classes/kernel-grub.bbclass|  46 ++---
 meta/classes/kernel-uimage.bbclass  |  22 +++--
 meta/classes/kernel.bbclass | 159 ++--
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  80 +---
 6 files changed, 212 insertions(+), 117 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] meta-yocto-bsp: mpc8315e-rdb: Set KERNEL_DEVICETREE to mpc8315erdb.dtb

2015-08-11 Thread zhe.he
From: He Zhe zhe...@windriver.com

To avoid warning of xxx contains the full path to the the dts file,
but only the dtb name should be used., Set KERNEL_DEVICETREE to
mpc8315erdb.dtb

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf 
b/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
index f372f32..2beef48 100644
--- a/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
+++ b/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
@@ -25,7 +25,7 @@ XSERVER ?= xserver-xorg \
 PREFERRED_VERSION_u-boot ?= v2013.07%
 UBOOT_ENTRYPOINT = 0x
 
-KERNEL_DEVICETREE = ${S}/arch/powerpc/boot/dts/mpc8315erdb.dts
+KERNEL_DEVICETREE = mpc8315erdb.dtb
 
 MACHINE_EXTRA_RRECOMMENDS =  kernel-modules
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] meta-yocto-bsp: mpc8315e-rdb: Set KERNEL_DEVICETREE to mpc8315erdb.dtb

2015-08-11 Thread zhe.he
From: He Zhe zhe...@windriver.com

The following changes since commit a16e0b4014173af46ef80d643bb71055219b0dab:

  bitbake: toaster: reduced amount of instance attributes (2015-08-10 13:58:02 
-0700)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/kernel_devicetree
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=zhe/kernel_devicetree

for you to fetch changes up to 648173de6f77371c4e0b803af12b23cd514b2d9f:

  meta-yocto-bsp: mpc8315e-rdb: Set KERNEL_DEVICETREE to mpc8315erdb.dtb 
(2015-08-11 04:58:28 -0400)


He Zhe (1):
  meta-yocto-bsp: mpc8315e-rdb: Set KERNEL_DEVICETREE to mpc8315erdb.dtb

 meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] kernel: Correct mishandling of linux.bin for building uImage

2015-08-11 Thread zhe.he
From: He Zhe zhe...@windriver.com

The following changes since commit a16e0b4014173af46ef80d643bb71055219b0dab:

  bitbake: toaster: reduced amount of instance attributes (2015-08-10 13:58:02 
-0700)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/kernel-uboot
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/kernel-uboot

for you to fetch changes up to 925eb33167a5510d9d2ec76b0d3e1c2f3f109008:

  kernel: Correct mishandling of linux.bin for building uImage (2015-08-11 
03:37:27 -0400)


He Zhe (1):
  kernel: Correct mishandling of linux.bin for building uImage

 meta/classes/kernel-uboot.bbclass | 1 -
 1 file changed, 1 deletion(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] kernel: Correct mishandling of linux.bin for building uImage

2015-08-11 Thread zhe.he
From: He Zhe zhe...@windriver.com

Building uImage fails when KEEPUIMAGE is not yes.
Remove wrong removal of linux.bin before compressing it.

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta/classes/kernel-uboot.bbclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index 8ab30b8..345e7f5 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -12,7 +12,6 @@ uboot_prep_kimage() {
${OBJCOPY} -O binary -R .note -R .comment -S ${vmlinux_path} linux.bin
 
if [ ${linux_comp} != none ] ; then
-   rm -f linux.bin
gzip -9 linux.bin
mv -f linux.bin${linux_suffix} linux.bin
fi
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 1/1] kernel: Add KERNEL_IMAGETYPES to build multi types of kernel at one time

2015-08-10 Thread zhe.he
From: He Zhe zhe...@windriver.com

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
KERNEL_IMAGETYPE works as it did.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta/classes/kernel-fitimage.bbclass|  21 +++---
 meta/classes/kernel-grub.bbclass|  46 +++
 meta/classes/kernel-uimage.bbclass  |  22 +++---
 meta/classes/kernel.bbclass | 130 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  81 
 6 files changed, 199 insertions(+), 102 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2a56a54..15324c3 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltype = d.getVar('KERNEL_IMAGETYPES', True) or 
+if 'fitImage' in kerneltype.split():
 depends = d.getVar(DEPENDS, True)
 depends = %s u-boot-mkimage-native dtc-native % depends
 d.setVar(DEPENDS, depends)
@@ -10,7 +10,10 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar(KERNEL_IMAGETYPE_FOR_MAKE, zImage)
+typeformake = d.getVar(KERNEL_IMAGETYPE_FOR_MAKE, True) or 
+if 'fitImage' in typeformake.split():
+typeformake.replace('fitImage', 'zImage')
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +157,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPES} =~ fitImage ; then
kernelcount=1
dtbcount=
rm -f fit-image.its
@@ -217,14 +220,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPES} =~ fitImage ; then
cd ${B}
echo Copying fit-image.its source file...
-   
its_base_name=${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name=fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name=${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name=fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..5ffaeb7 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f $D/boot/grub/menu.list ]  grubcfg=$D/boot/grub/menu.list
[ -f $D/boot/grub/grub.cfg ]  grubcfg=$D/boot/grub/grub.cfg
if [ -n $grubcfg ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q /${KERNEL_IMAGETYPE} \+root= $grubcfg; then
-   if [ -L $D/boot/${KERNEL_IMAGETYPE} ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2/dev/null`
+   if grep -q /KERNEL_IMAGETYPE \+root= $grubcfg; then
+   if [ -L $D/boot/KERNEL_IMAGETYPE ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2/dev/null`
if [ -f $D$kimage ]; then
-   sed -i s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=: $grubcfg
+   sed -i s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=: $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if grep -q /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} \+root= 
$grubcfg; then
-   if [ -f 

[OE-core] [PATCH v4 0/1] Yocto Bug #6945

2015-08-10 Thread zhe.he
From: He Zhe zhe...@windriver.com

 - Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
 - KERNEL_IMAGETYPE works as it did.
 - v2: Update with the latest oe-core
 - v3: Add KERNEL_IMAGETYPES, leave KERNEL_IMAGETYPE as is
 - v4: Turn package name to lower case to meet opkg's requrement
   Modify if test in kernel-fitimage.bbclass and kernel-uimage.bbclass


He Zhe (1):
  kernel: Add KERNEL_IMAGETYPES to build multi types of kernel at one
time

 meta/classes/kernel-fitimage.bbclass|  21 +++---
 meta/classes/kernel-grub.bbclass|  46 +++
 meta/classes/kernel-uimage.bbclass  |  22 +++---
 meta/classes/kernel.bbclass | 130 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  81 
 6 files changed, 199 insertions(+), 102 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 1/1] kernel: Add KERNEL_IMAGETYPES to build multi types of kernel at one time

2015-08-04 Thread zhe.he
From: He Zhe zhe...@windriver.com

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
KERNEL_IMAGETYPE works as it did.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta/classes/kernel-fitimage.bbclass|  21 +++---
 meta/classes/kernel-grub.bbclass|  46 
 meta/classes/kernel-uimage.bbclass  |  22 +++---
 meta/classes/kernel.bbclass | 128 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  15 ++--
 6 files changed, 159 insertions(+), 74 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2a56a54..1b65c0d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltype = d.getVar('KERNEL_IMAGETYPES', True) or 
+if 'fitImage' in kerneltype.split():
 depends = d.getVar(DEPENDS, True)
 depends = %s u-boot-mkimage-native dtc-native % depends
 d.setVar(DEPENDS, depends)
@@ -10,7 +10,10 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar(KERNEL_IMAGETYPE_FOR_MAKE, zImage)
+typeformake = d.getVar(KERNEL_IMAGETYPE_FOR_MAKE, True) or 
+if 'fitImage' in typeformake.split():
+typeformake.replace('fitImage', 'zImage')
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +157,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPES} != x${KERNEL_IMAGETYPES//fitImage/} ; 
then
kernelcount=1
dtbcount=
rm -f fit-image.its
@@ -217,14 +220,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPES} != x${KERNEL_IMAGETYPES//fitImage/} ; 
then
cd ${B}
echo Copying fit-image.its source file...
-   
its_base_name=${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name=fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name=${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name=fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..5ffaeb7 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f $D/boot/grub/menu.list ]  grubcfg=$D/boot/grub/menu.list
[ -f $D/boot/grub/grub.cfg ]  grubcfg=$D/boot/grub/grub.cfg
if [ -n $grubcfg ]; then
# Dereference symlink to avoid confliction with new kernel name.
-   if grep -q /${KERNEL_IMAGETYPE} \+root= $grubcfg; then
-   if [ -L $D/boot/${KERNEL_IMAGETYPE} ]; then
-   kimage=`realpath $D/boot/${KERNEL_IMAGETYPE} 
2/dev/null`
+   if grep -q /KERNEL_IMAGETYPE \+root= $grubcfg; then
+   if [ -L $D/boot/KERNEL_IMAGETYPE ]; then
+   kimage=`realpath $D/boot/KERNEL_IMAGETYPE 
2/dev/null`
if [ -f $D$kimage ]; then
-   sed -i s:${KERNEL_IMAGETYPE} 
\+root=:${kimage##*/} root=: $grubcfg
+   sed -i s:KERNEL_IMAGETYPE 
\+root=:${kimage##*/} root=: $grubcfg
fi
fi
fi
 
# Rename old kernel if it conflicts with new kernel name.
-   if grep -q /${KERNEL_IMAGETYPE}-${KERNEL_VERSION} \+root= 
$grubcfg; then
-   if 

[OE-core] [PATCH v3 0/1] Yocto Bug #6945

2015-08-04 Thread zhe.he
From: He Zhe zhe...@windriver.com

 - Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
 - KERNEL_IMAGETYPE works as it did.
 - v2: Update with the latest oe-core
 - v3: Add KERNEL_IMAGETYPES, leave KERNEL_IMAGETYPE as is.

Thank Richard for his great suggestion.

He Zhe (1):
  kernel: Add KERNEL_IMAGETYPES to build multi types of kernel at one
time

 meta/classes/kernel-fitimage.bbclass|  21 +++---
 meta/classes/kernel-grub.bbclass|  46 
 meta/classes/kernel-uimage.bbclass  |  22 +++---
 meta/classes/kernel.bbclass | 128 +++-
 meta/conf/documentation.conf|   1 +
 meta/recipes-kernel/linux/linux-dtb.inc |  15 ++--
 6 files changed, 159 insertions(+), 74 deletions(-)

-- 
2.1.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list

2015-07-21 Thread zhe.he
From: He Zhe zhe...@windriver.com

To support building packaging and installing multi types of kernel
images, such as zImage uImage, at one time define KERNEL_IMAGETYPE
as a list.
Modify wherever reference KERNEL_IMAGETYPE accordingly.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta/classes/image_types.bbclass |   6 +-
 meta/classes/kernel-fitimage.bbclass |  22 +++---
 meta/classes/kernel-grub.bbclass |  47 
 meta/classes/kernel-uimage.bbclass   |  31 +---
 meta/classes/kernel.bbclass  | 125 ++-
 meta/conf/documentation.conf |   2 +-
 meta/lib/oeqa/controllers/masterimage.py |   2 +-
 meta/lib/oeqa/targetcontrol.py   |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc  |  15 ++--
 scripts/test-remote-image|   2 +-
 10 files changed, 174 insertions(+), 80 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 588a474..b04470f 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -4,6 +4,10 @@
 # set this value to 2048 (2MiB alignment).
 IMAGE_ROOTFS_ALIGNMENT ?= 1
 
+python __anonymous () {
+   d.setVar('KERNEL_IMAGETYPE_0', d.getVar('KERNEL_IMAGETYPE', 
True).strip().split(' ')[0])
+}
+
 def imagetypes_getdepends(d):
 def adddep(depstr, deps):
 for i in (depstr or ).split():
@@ -86,7 +90,7 @@ IMAGE_CMD_cpio () {
fi
 }
 
-ELF_KERNEL ?= ${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE}
+ELF_KERNEL ?= ${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE_0}
 ELF_APPEND ?= ramdisk_size=32768 root=/dev/ram0 rw console=
 
 IMAGE_CMD_elf () {
diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2a56a54..7d097b4 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or 
+if 'fitImage' in kerneltype.strip().split(' '):
 depends = d.getVar(DEPENDS, True)
 depends = %s u-boot-mkimage-native dtc-native % depends
 d.setVar(DEPENDS, depends)
@@ -10,7 +10,11 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar(KERNEL_IMAGETYPE_FOR_MAKE, zImage)
+typeformake = d.getVar(KERNEL_IMAGETYPE_FOR_MAKE, True) or 
+list = typeformake.strip().split(' ')
+if 'fitImage' in list:
+list.remove('fitImage')
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', ' '.join(list))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +158,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPE} != x${KERNEL_IMAGETYPE//fitImage/} ; 
then
kernelcount=1
dtbcount=
rm -f fit-image.its
@@ -217,14 +221,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test x${KERNEL_IMAGETYPE} = xfitImage ; then
+   if test x${KERNEL_IMAGETYPE} != x${KERNEL_IMAGETYPE//fitImage/} ; 
then
cd ${B}
echo Copying fit-image.its source file...
-   
its_base_name=${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}
-   its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE}
+   its_base_name=fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}
+   its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name=${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
-   linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE}
+   
linux_bin_base_name=fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}
+   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
 
cd ${DEPLOYDIR}
diff --git a/meta/classes/kernel-grub.bbclass b/meta/classes/kernel-grub.bbclass
index a63f482..ceb0fa1 100644
--- a/meta/classes/kernel-grub.bbclass
+++ b/meta/classes/kernel-grub.bbclass
@@ -10,41 +10,44 @@
 #   updates the new kernel as the boot priority.
 #
 
-pkg_preinst_kernel-image_append () {
+python __anonymous () {
+import re
+
+preinst = '''
# Parsing confliction
[ -f $D/boot/grub/menu.list ]  grubcfg=$D/boot/grub/menu.list
[ -f $D/boot/grub/grub.cfg ]  grubcfg=$D/boot/grub/grub.cfg
if [ -n $grubcfg ]; then

[OE-core] [PATCH v2 2/2] kernel: Pass sysroot mkimage to kernel makefile

2015-07-21 Thread zhe.he
From: He Zhe zhe...@windriver.com

Pass mkimage in sysroot to kernel makefile by NATIVE_MKIMAGE to avoid
depending on build machine's when KEEPUIMAGE is yes.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe zhe...@windriver.com
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 86ed28f..1d7fa48 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -141,7 +141,7 @@ UBOOT_ENTRYPOINT ?= 20008000
 UBOOT_LOADADDRESS ?= ${UBOOT_ENTRYPOINT}
 
 # Some Linux kernel configurations need additional parameters on the command 
line
-KERNEL_EXTRA_ARGS ?= 
+KERNEL_EXTRA_ARGS ?= NATIVE_MKIMAGE=${STAGING_BINDIR_NATIVE}/mkimage
 
 # For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
 # We don't want to override kernel Makefile variables from the environment
-- 
2.1.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 0/2] Yocto Bug #6945

2015-07-21 Thread zhe.he
From: He Zhe zhe...@windriver.com

 - To support building packaging and installing multi types of kernel
   images, such as zImage uImage, at one time define KERNEL_IMAGETYPE
   as a list.
 - Modify wherever reference KERNEL_IMAGETYPE accordingly.
 - Pass mkimage in sysroot to kernel makefile by NATIVE_MKIMAGE to avoid
   depending on build machine's, when KEEPUIMAGE is yes.
 - v2: update with the latest oe-core

He Zhe (2):
  kernel: Define KERNEL_IMAGETYPE as a list
  kernel: Pass sysroot mkimage to kernel makefile

 meta/classes/image_types.bbclass |   6 +-
 meta/classes/kernel-fitimage.bbclass |  22 +++---
 meta/classes/kernel-grub.bbclass |  47 
 meta/classes/kernel-uimage.bbclass   |  31 +---
 meta/classes/kernel.bbclass  | 127 ++-
 meta/conf/documentation.conf |   2 +-
 meta/lib/oeqa/controllers/masterimage.py |   2 +-
 meta/lib/oeqa/targetcontrol.py   |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc  |  15 ++--
 scripts/test-remote-image|   2 +-
 10 files changed, 175 insertions(+), 81 deletions(-)

-- 
2.1.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core