Skip to contentSkip to conversation

OpenCSD: Support for Arm CoreSight decode lib

PATCH RESEND Superseded [email protected] 2 participants 3 messages Mar 6, 2020 – Mar 17, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 OpenCSD: Support for Arm CoreSight decode lib

This patch is to add recipe for OpenCSD, which is an open source CoreSight trace decode library and utility.

Also create a new folder recipes-devtools under meta-arm to place this recipe.

---
 .../recipes-devtools/opencsd/opencsd_git.bb   | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 meta-arm/recipes-devtools/opencsd/opencsd_git.bb
meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file +28 -0
new file mode 100644
index 0000000..0c3b483
@@ -0,0 +1,28 @@
+SUMMARY = "OpenCSD - An open source CoreSight(tm) Trace Decode library"
+HOMEPAGE = "https://github.com/Linaro/OpenCSD"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ad8cb685eb324d2fa2530b985a43f3e5"
+
+SRC_URI = "git://github.com/Linaro/OpenCSD;protocol=http;branch=master"
+SRCREV = "03c194117971e4ad0598df29395757ced2e6e9bd"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = "(x86_64.*|aarch64.*)-linux"
+
+EXTRA_OEMAKE = "ARCH='${TARGET_ARCH}' \
+                CROSS_COMPILE='${TARGET_SYS}-' \
+                CC='${CC}' \
+                CXX='${CXX}' \
+                LINKER='${CXX}' \
+                LINUX64=1 \
+                DEBUG=1 \
+                "
+
+do_compile() {
+    ( cd ${S}/decoder/build/linux; oe_runmake ${EXTRA_OEMAKE}; cd - )
+}
+
+do_install() {
+    ( cd ${S}/decoder/build/linux; oe_runmake PREFIX=${D}/usr install; cd - )
+}
Signature · 1 line
2.17.1
#1 lore raw
Quoted 36 lines · Leo Yan via Lists.Yoctoproject.Org

Also create a new folder recipes-devtools under meta-arm to place this recipe.

---
.../recipes-devtools/opencsd/opencsd_git.bb | 28 +++++++++++++++++++

1 file changed, 28 insertions(+)

create mode 100644 meta-arm/recipes-devtools/opencsd/opencsd_git.bb

meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file +18 -0
new file mode 100644
index 0000000..0c3b483
@@ -0,0 +1,28 @@
+SUMMARY = "OpenCSD - An open source CoreSight(tm) Trace Decode library"
+HOMEPAGE = "https://github.com/Linaro/OpenCSD"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ad8cb685eb324d2fa2530b985a43f3e5"
+
+SRC_URI = "git://github.com/Linaro/OpenCSD;protocol=http;branch=master"
+SRCREV = "03c194117971e4ad0598df29395757ced2e6e9bd"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = "(x86_64.*|aarch64.*)-linux"
+
+EXTRA_OEMAKE = "ARCH='${TARGET_ARCH}' \
+                CROSS_COMPILE='${TARGET_SYS}-' \
+                CC='${CC}' \
+                CXX='${CXX}' \
+                LINKER='${CXX}' \
+                LINUX64=1 \

meta-arm/recipes-devtools/opencsd/opencsd_git.bb line 28

Quoted 10 lines
meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file +10 -0
+                DEBUG=1 \
+                "
+
+do_compile() {
+    ( cd ${S}/decoder/build/linux; oe_runmake ${EXTRA_OEMAKE}; cd - )
+}
+
+do_install() {
+    ( cd ${S}/decoder/build/linux; oe_runmake PREFIX=${D}/usr install; cd - )
+}

I suspect both those will not catch make error if it happens. You should not do this in a sub-shell.

I would suggest to rework this to do:
oe_runmake -C ${S}/decode/build/linux ${EXTRA_OEMAKE}

And adapt the same in install.

Regards
Bertrand

Quoted 4 lines
Signature · 1 line
2.17.1
author
#2 lore raw
Quoted 50 lines · Bertrand Marquis
Quoted 36 lines · Leo Yan via Lists.Yoctoproject.Org

Also create a new folder recipes-devtools under meta-arm to place this recipe.

---
.../recipes-devtools/opencsd/opencsd_git.bb | 28 +++++++++++++++++++

1 file changed, 28 insertions(+)

create mode 100644 meta-arm/recipes-devtools/opencsd/opencsd_git.bb

meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file +18 -0
new file mode 100644
index 0000000..0c3b483
@@ -0,0 +1,28 @@
+SUMMARY = "OpenCSD - An open source CoreSight(tm) Trace Decode library"
+HOMEPAGE = "https://github.com/Linaro/OpenCSD"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ad8cb685eb324d2fa2530b985a43f3e5"
+
+SRC_URI = "git://github.com/Linaro/OpenCSD;protocol=http;branch=master"
+SRCREV = "03c194117971e4ad0598df29395757ced2e6e9bd"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = "(x86_64.*|aarch64.*)-linux"
+
+EXTRA_OEMAKE = "ARCH='${TARGET_ARCH}' \
+                CROSS_COMPILE='${TARGET_SYS}-' \
+                CC='${CC}' \
+                CXX='${CXX}' \
+                LINKER='${CXX}' \
+                LINUX64=1 \

meta-arm/recipes-devtools/opencsd/opencsd_git.bb line 28

Quoted 10 lines
meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file +10 -0
+                DEBUG=1 \
+                "
+
+do_compile() {
+    ( cd ${S}/decoder/build/linux; oe_runmake ${EXTRA_OEMAKE}; cd - )
+}
+
+do_install() {
+    ( cd ${S}/decoder/build/linux; oe_runmake PREFIX=${D}/usr install; cd - )
+}

I suspect both those will not catch make error if it happens. You should not do this in a sub-shell.

Quoted 4 lines

I would suggest to rework this to do:
oe_runmake -C ${S}/decode/build/linux ${EXTRA_OEMAKE}

And adapt the same in install.

Thanks for the suggestion, Bertrand! I will try this in tomorrow and respin new patch if don't find any exception :)

Thanks,
Leo