* [PATCH v3 0/1] perfect support for musl
@ 2018-07-23 10:08 Hongzhi.Song
2018-07-23 10:08 ` [meta-oe][PATCH v3 1/1] kernel-selftest: add support for musllibc and perfect the recipe Hongzhi.Song
0 siblings, 1 reply; 3+ messages in thread
From: Hongzhi.Song @ 2018-07-23 10:08 UTC (permalink / raw)
To: openembedded-devel, raj.khem
Hi Raj,
I fix the error about musl.
But the error about glibc, "No libelf found", is not reproduced
on my side. And I check some argument(e.g. LD) passed to Makefile
and the dependency, elfutils. It seems everything is OK.
So, could you build your project with the new recipe and check the
relevant dependency if you have time.
Thanks,
// Hongzhi
v3:
add support for musl when build bpf and modify the recipe
Hongzhi.Song (1):
kernel-selftest: add support for musllibc and perfect the recipe
.../kernel-selftest/kernel-selftest.bb | 30 ++++++++--------------
...bpf-test_progs.c-add-support-for-musllibc.patch | 25 ++++++++++++++++++
2 files changed, 35 insertions(+), 20 deletions(-)
create mode 100644 meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
--
2.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [meta-oe][PATCH v3 1/1] kernel-selftest: add support for musllibc and perfect the recipe
2018-07-23 10:08 [PATCH v3 0/1] perfect support for musl Hongzhi.Song
@ 2018-07-23 10:08 ` Hongzhi.Song
2018-07-23 20:36 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Hongzhi.Song @ 2018-07-23 10:08 UTC (permalink / raw)
To: openembedded-devel, raj.khem
1. Add support for musllibc
2. Use PACKAGECONFIG to add dependency
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
---
.../kernel-selftest/kernel-selftest.bb | 30 ++++++++--------------
...bpf-test_progs.c-add-support-for-musllibc.patch | 25 ++++++++++++++++++
2 files changed, 35 insertions(+), 20 deletions(-)
create mode 100644 meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index 2c23b26b5..71e3bf9b0 100644
--- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
@@ -5,27 +5,17 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7 \
"
-# vm
-SRC_URI += "file://COPYING \
-"
+# for musl libc
SRC_URI_libc-musl += "file://userfaultfd.patch \
+ file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \
"
-# for bpf and vm
-DEPENDS = " \
- elfutils \
- libcap \
- libcap-ng \
- fuse \
- util-linux \
- rsync-native \
-"
-# for vm
-RDEPENDS_${PN} += "libgcc \
- bash \
-"
+PACKAGECONFIG ??= "bpf vm"
+
+PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native,"
+PACKAGECONFIG[vm] = ",,,libgcc bash"
-do_configure[depends] += "virtual/kernel:do_shared_workdir"
+do_patch[depends] += "virtual/kernel:do_shared_workdir"
inherit linux-kernel-base kernel-arch
@@ -69,10 +59,10 @@ do_compile() {
do_install() {
for i in ${TEST_LIST}
do
- oe_runmake -C ${S}/tools/testing/selftests/${i} INSTALL_PATH=${D}/opt/kselftest/${i} install
+ oe_runmake -C ${S}/tools/testing/selftests/${i} INSTALL_PATH=${D}/usr/kernel-selftest/${i} install
done
- chown root:root -R ${D}/opt/kselftest
+ chown root:root -R ${D}/usr/kernel-selftest
}
do_configure() {
@@ -101,4 +91,4 @@ remove_clang_related() {
PACKAGE_ARCH = "${MACHINE_ARCH}"
INHIBIT_PACKAGE_DEBUG_SPLIT="1"
-FILES_${PN} += "/opt/kselftest/"
+FILES_${PN} += "/usr/kernel-selftest"
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
new file mode 100644
index 000000000..5f2542681
--- /dev/null
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
@@ -0,0 +1,25 @@
+From a2e6b8fde28b743b69990a4e16c296e099631ed4 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Mon, 23 Jul 2018 00:56:19 -0700
+Subject: [PATCH] bpf: test_progs.c add support for musllibc
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+ tools/testing/selftests/bpf/test_progs.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
+index 11ee25c..21b27b7 100644
+--- a/tools/testing/selftests/bpf/test_progs.c
++++ b/tools/testing/selftests/bpf/test_progs.c
+@@ -4,6 +4,7 @@
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ */
++#define __always_inline __inline __attribute__ ((__always_inline__))
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <errno.h>
+--
+2.11.0
+
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-oe][PATCH v3 1/1] kernel-selftest: add support for musllibc and perfect the recipe
2018-07-23 10:08 ` [meta-oe][PATCH v3 1/1] kernel-selftest: add support for musllibc and perfect the recipe Hongzhi.Song
@ 2018-07-23 20:36 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2018-07-23 20:36 UTC (permalink / raw)
To: Hongzhi.Song; +Cc: openembeded-devel
please squash it into prior commit and send
a single commit.
On Mon, Jul 23, 2018 at 3:08 AM Hongzhi.Song <hongzhi.song@windriver.com> wrote:
>
> 1. Add support for musllibc
> 2. Use PACKAGECONFIG to add dependency
>
> Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
> ---
> .../kernel-selftest/kernel-selftest.bb | 30 ++++++++--------------
> ...bpf-test_progs.c-add-support-for-musllibc.patch | 25 ++++++++++++++++++
> 2 files changed, 35 insertions(+), 20 deletions(-)
> create mode 100644 meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
>
> diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
> index 2c23b26b5..71e3bf9b0 100644
> --- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
> +++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
> @@ -5,27 +5,17 @@ LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7 \
> "
>
> -# vm
> -SRC_URI += "file://COPYING \
> -"
> +# for musl libc
> SRC_URI_libc-musl += "file://userfaultfd.patch \
> + file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \
> "
>
> -# for bpf and vm
> -DEPENDS = " \
> - elfutils \
> - libcap \
> - libcap-ng \
> - fuse \
> - util-linux \
> - rsync-native \
> -"
> -# for vm
> -RDEPENDS_${PN} += "libgcc \
> - bash \
> -"
> +PACKAGECONFIG ??= "bpf vm"
> +
> +PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native,"
> +PACKAGECONFIG[vm] = ",,,libgcc bash"
>
> -do_configure[depends] += "virtual/kernel:do_shared_workdir"
> +do_patch[depends] += "virtual/kernel:do_shared_workdir"
>
> inherit linux-kernel-base kernel-arch
>
> @@ -69,10 +59,10 @@ do_compile() {
> do_install() {
> for i in ${TEST_LIST}
> do
> - oe_runmake -C ${S}/tools/testing/selftests/${i} INSTALL_PATH=${D}/opt/kselftest/${i} install
> + oe_runmake -C ${S}/tools/testing/selftests/${i} INSTALL_PATH=${D}/usr/kernel-selftest/${i} install
> done
>
> - chown root:root -R ${D}/opt/kselftest
> + chown root:root -R ${D}/usr/kernel-selftest
> }
>
> do_configure() {
> @@ -101,4 +91,4 @@ remove_clang_related() {
> PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> INHIBIT_PACKAGE_DEBUG_SPLIT="1"
> -FILES_${PN} += "/opt/kselftest/"
> +FILES_${PN} += "/usr/kernel-selftest"
> diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
> new file mode 100644
> index 000000000..5f2542681
> --- /dev/null
> +++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/0001-bpf-test_progs.c-add-support-for-musllibc.patch
> @@ -0,0 +1,25 @@
> +From a2e6b8fde28b743b69990a4e16c296e099631ed4 Mon Sep 17 00:00:00 2001
> +From: "Hongzhi.Song" <hongzhi.song@windriver.com>
> +Date: Mon, 23 Jul 2018 00:56:19 -0700
> +Subject: [PATCH] bpf: test_progs.c add support for musllibc
> +
> +Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
> +---
> + tools/testing/selftests/bpf/test_progs.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
> +index 11ee25c..21b27b7 100644
> +--- a/tools/testing/selftests/bpf/test_progs.c
> ++++ b/tools/testing/selftests/bpf/test_progs.c
> +@@ -4,6 +4,7 @@
> + * modify it under the terms of version 2 of the GNU General Public
> + * License as published by the Free Software Foundation.
> + */
> ++#define __always_inline __inline __attribute__ ((__always_inline__))
> + #include <stdio.h>
> + #include <unistd.h>
> + #include <errno.h>
> +--
> +2.11.0
> +
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-23 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23 10:08 [PATCH v3 0/1] perfect support for musl Hongzhi.Song
2018-07-23 10:08 ` [meta-oe][PATCH v3 1/1] kernel-selftest: add support for musllibc and perfect the recipe Hongzhi.Song
2018-07-23 20:36 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.