Skip to contentSkip to conversation

Ply: Add recipe for git version

PATCH Superseded Leo Yan 3 participants 5 messages Feb 21, 2020 – Feb 23, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Leo Yan

author
#0 lore raw

PATCH v2 1/1 Ply: Add recipe for git version

Ply is a light-weight eBPF tool which compiles ply script or one-liner to Linux BPF programs and attaches to kprobes and tracepoints. It doesn't require external dependencies except libc, so it's very friendly for embedded system usage.

This patch adds the recipe to support ply building for git version.

---
 meta-oe/recipes-devtools/ply/ply_git.bb | 38 +++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/ply/ply_git.bb
meta-oe/recipes-devtools/ply/ply_git.bb new file +38 -0
new file mode 100644
index 000000000..21395885c
@@ -0,0 +1,38 @@
+SUMMARY = "Ply: A light-weight dynamic tracer for eBPF"
+HOMEPAGE = "https://github.com/iovisor/ply"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS += "bison-native"
+
+SRC_URI = "git://github.com/iovisor/ply"
+SRCREV = "aa5b9ac31307ec1acece818be334ef801c802a12"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+    ( cd ${S}; ./autogen.sh; cd - )
+}
+
+do_configure() {
+    ( cd ${S}; ./configure --host=${TARGET_SYS} --prefix=${D}${prefix}; cd - )
+}
+
+do_compile() {
+    ( cd ${S}; oe_runmake; cd - )
+}
+
+do_install() {
+    ( cd ${S}; oe_runmake install; cd - )
+}
+
+do_install_append() {
+    chrpath -d ${D}${prefix}/sbin/ply
+}
+
+# x86, mips32/64, riscv64 are not supported in this release
+COMPATIBLE_HOST_i586 = 'null'
+COMPATIBLE_HOST_i686 = 'null'
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+COMPATIBLE_HOST_riscv64 = "null"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 38 lines · Leo Yan

Ply is a light-weight eBPF tool which compiles ply script or one-liner to Linux BPF programs and attaches to kprobes and tracepoints. It doesn't require external dependencies except libc, so it's very friendly for embedded system usage.

This patch adds the recipe to support ply building for git version.

---
 meta-oe/recipes-devtools/ply/ply_git.bb | 38 +++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/ply/ply_git.bb
meta-oe/recipes-devtools/ply/ply_git.bb new file +18 -0
new file mode 100644
index 000000000..21395885c
@@ -0,0 +1,38 @@
+SUMMARY = "Ply: A light-weight dynamic tracer for eBPF"
+HOMEPAGE = "https://github.com/iovisor/ply"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS += "bison-native"
+
+SRC_URI = "git://github.com/iovisor/ply"
+SRCREV = "aa5b9ac31307ec1acece818be334ef801c802a12"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+    ( cd ${S}; ./autogen.sh; cd - )
+}
+
+do_configure() {
+    ( cd ${S}; ./configure --host=${TARGET_SYS} --prefix=${D}${prefix}; cd - )

meta-oe/recipes-devtools/ply/ply_git.bb line 28

Quoted 10 lines
meta-oe/recipes-devtools/ply/ply_git.bb new file +10 -0
+}
+
+do_compile() {
+    ( cd ${S}; oe_runmake; cd - )
+}
+
+do_install() {
+    ( cd ${S}; oe_runmake install; cd - )
+}
+

Can't all of these do_... steps be replaced with inherit autotools-brokensep?

Quoted 13 lines
meta-oe/recipes-devtools/ply/ply_git.bb new file +10 -1
+do_install_append() {
+    chrpath -d ${D}${prefix}/sbin/ply
+}
+
+# x86, mips32/64, riscv64 are not supported in this release
+COMPATIBLE_HOST_i586 = 'null'
+COMPATIBLE_HOST_i686 = 'null'
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+COMPATIBLE_HOST_riscv64 = "null"
--

2.17.1

Quoted 5 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
Alex Kiernan

author
#2 lore raw

Hi Alex,

On Fri, Feb 21, 2020 at 05:08:22PM +0000, Alex Kiernan wrote:

[...]

Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-devtools/ply/ply_git.bb new file +10 -0
+do_configure_prepend() {
+    ( cd ${S}; ./autogen.sh; cd - )
+}
+
+do_configure() {
+    ( cd ${S}; ./configure --host=${TARGET_SYS} --prefix=${D}${prefix}; cd - )
+}
+
+do_compile() {
+    ( cd ${S}; oe_runmake; cd - )
Quoted 8 lines

meta-oe/recipes-devtools/ply/ply_git.bb line 28

Quoted 6 lines
meta-oe/recipes-devtools/ply/ply_git.bb new file +6 -0
+}
+
+do_install() {
+    ( cd ${S}; oe_runmake install; cd - )
+}
+

Can't all of these do_... steps be replaced with inherit autotools-brokensep?

Have tested with 'autotools-brokensep', it works very well for ply building. Thanks a lot for this good suggestion!

Thanks,
Leo

#3 lore raw
In reply to Leo Yan

Fails to build on mips

https://errors.yoctoproject.org/Errors/Details/392045/

Quoted 58 lines · Leo Yan

Ply is a light-weight eBPF tool which compiles ply script or one-liner to Linux BPF programs and attaches to kprobes and tracepoints. It doesn't require external dependencies except libc, so it's very friendly for embedded system usage.

This patch adds the recipe to support ply building for git version.

---
  meta-oe/recipes-devtools/ply/ply_git.bb | 38 +++++++++++++++++++++++++
  1 file changed, 38 insertions(+)

create mode 100644 meta-oe/recipes-devtools/ply/ply_git.bb

meta-oe/recipes-devtools/ply/ply_git.bb new file +38 -0
new file mode 100644
index 000000000..21395885c
@@ -0,0 +1,38 @@
+SUMMARY = "Ply: A light-weight dynamic tracer for eBPF"
+HOMEPAGE = "https://github.com/iovisor/ply"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS += "bison-native"
+
+SRC_URI = "git://github.com/iovisor/ply"
+SRCREV = "aa5b9ac31307ec1acece818be334ef801c802a12"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+    ( cd ${S}; ./autogen.sh; cd - )
+}
+
+do_configure() {
+    ( cd ${S}; ./configure --host=${TARGET_SYS} --prefix=${D}${prefix}; cd - )
+}
+
+do_compile() {
+    ( cd ${S}; oe_runmake; cd - )
+}
+
+do_install() {
+    ( cd ${S}; oe_runmake install; cd - )
+}
+
+do_install_append() {
+    chrpath -d ${D}${prefix}/sbin/ply
+}
+
+# x86, mips32/64, riscv64 are not supported in this release
+COMPATIBLE_HOST_i586 = 'null'
+COMPATIBLE_HOST_i686 = 'null'
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+COMPATIBLE_HOST_riscv64 = "null"
author
#4 lore raw

Hi Khem,

Quoted 3 lines · Khem Raj

Fails to build on mips

https://errors.yoctoproject.org/Errors/Details/392045/

Sorry for extra efforts introduced by my patch. I changed to use below line for arch compatible and tested with x86-64/aarch64/mips/ppc:

COMPATIBLE_HOST = "(x86_64.*|aarch64.*|arm.*|powerpc.*)-linux"

Will send out new patch soon.

Thanks,
Leo