Skip to contentSkip to conversation

meta-arago-test: Add CoreMark CPU benchmark

PATCH Superseded Sadik 3 participants 3 messages Oct 28, 2025

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Sadik

author
#0 lore raw

PATCH 1/1 meta-arago-test: Add CoreMark CPU benchmark

From: sadik <[email protected]>

Add CoreMark benchmark recipe to measure CPU performance on TI platforms,Integrate CoreMark into ti-test package group alongside arm-benchmarks.

CoreMark is an industry-standard CPU benchmark from EEMBC (Embedded Microprocessor Benchmark Consortium) that provides a standardized method to test the performance of processors.

---
 .../recipes-benchmark/coremark/coremark.bb    | 24 +++++++++++++++++++
 .../recipes-core/packagegroups/ti-test.bb     |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-arago-test/recipes-benchmark/coremark/coremark.bb
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +24 -0
new file mode 100644
index 00000000..330adeda
@@ -0,0 +1,24 @@
+SUMMARY = "The benchmark utility to measure the performance of CPU"
+
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0a18b17ae63deaa8a595035f668aebe1"
+
+SRC_URI = "git://github.com/eembc/coremark.git;branch=main;protocol=https"
+SRCREV = "d5fad6bd094899101a4e5fd53af7298160ced6ab"
+
+S = "${WORKDIR}/git"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_compile() {
+	make compile
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 coremark.exe ${D}${bindir}
+	mv ${D}${bindir}/coremark.exe ${D}${bindir}/coremark
+}
+
+COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64).*-linux'
+
+SRC_URI[sha256sum] = "d003ed54134a0d365c0d5d8dc828432d610d1d1f77b8f58457cf1e599ad13f17"
meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index c1166bc2..2c4b097e 100644
@@ -88,6 +88,7 @@ TI_TEST_BASE:append:armv7ve = " \
 #    timestamping
 TI_TEST_TI_TOOLS = " \
     arm-benchmarks \
+    coremark \
     arm-ddr-bandwidth \
     cpuloadgen \
     input-utils \
Signature · 1 line
2.34.1
#1 lore raw

Hi Sadik,

Quoted 23 lines · Sadik via lists.yoctoproject.org

From: sadik <[email protected]>

Add CoreMark benchmark recipe to measure CPU performance on TI platforms,Integrate CoreMark into ti-test package group alongside arm-benchmarks.

CoreMark is an industry-standard CPU benchmark from EEMBC (Embedded Microprocessor Benchmark Consortium) that provides a standardized method to test the performance of processors.

---
 .../recipes-benchmark/coremark/coremark.bb    | 24 +++++++++++++++++++
 .../recipes-core/packagegroups/ti-test.bb     |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-arago-test/recipes-benchmark/coremark/coremark.bb
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +0 -0
new file mode 100644
index 00000000..330adeda

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 5

Quoted 5 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +5 -0
@@ -0,0 +1,24 @@
+SUMMARY = "The benchmark utility to measure the performance of CPU"
+
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0a18b17ae63deaa8a595035f668aebe1"
+

AFAIR CoreMark uses Apache 2.0 license. LICENSE = "CLOSED" contradicts the LIC_FILES_CHKSUM entry.

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 10

Quoted 5 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +5 -0
+SRC_URI = "git://github.com/eembc/coremark.git;branch=main;protocol=https"
+SRCREV = "d5fad6bd094899101a4e5fd53af7298160ced6ab"
+
+S = "${WORKDIR}/git"
+TARGET_CC_ARCH += "${LDFLAGS}"

Above line incorrectly adds LDFLAGS to TARGET_CC_ARCH, using oe_runmake instead of make compile should handle the LDFLAGS. Best to remove it.

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 13

Quoted 3 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +3 -0
+
+do_compile() {
+	make compile

make compile ignores Yocto's toolchain variables. Best to use oe_runmake instead.

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 19

Quoted 6 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +6 -0
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 coremark.exe ${D}${bindir}
+	mv ${D}${bindir}/coremark.exe ${D}${bindir}/coremark

Here you are copying the coremark.exe and then renaming it, you can do it all in one go using install.

for eg: install -m 0755 coremark.exe ${D}${bindir}/coremark

Additionally you are assuming that the coremark.exe will always be present in the current working dir, best practice is to mention the correct path using the Yocto variables.

for eg: install -m 0755 ${S}/coremark.exe ${D}${bindir}/coremark

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 24

Quoted 5 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +5 -0
+}
+
+COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64).*-linux'
+
+SRC_URI[sha256sum] = "d003ed54134a0d365c0d5d8dc828432d610d1d1f77b8f58457cf1e599ad13f17"

SRC_URI[sha256sum] is for tarballs, not git fetchers. It would be best to remove it entirely.

Quoted 26 lines
meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index c1166bc2..2c4b097e 100644
@@ -88,6 +88,7 @@ TI_TEST_BASE:append:armv7ve = " \
 #    timestamping
 TI_TEST_TI_TOOLS = " \
     arm-benchmarks \
+    coremark \
     arm-ddr-bandwidth \
     cpuloadgen \
     input-utils \
Signature · 11 lines
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16707): https://lists.yoctoproject.org/g/meta-arago/message/16707
Mute This Topic: https://lists.yoctoproject.org/mt/115990643/9980049
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

- Yogesh

#2 lore raw
Quoted 19 lines · Yogesh Hegde

Hi Sadik,

Quoted 17 lines · Sadik via lists.yoctoproject.org

From: sadik <[email protected]>

Add CoreMark benchmark recipe to measure CPU performance on TI platforms,Integrate CoreMark into ti-test package group alongside arm-benchmarks.

CoreMark is an industry-standard CPU benchmark from EEMBC (Embedded Microprocessor Benchmark Consortium) that provides a standardized method to test the performance of processors.

---
  .../recipes-benchmark/coremark/coremark.bb    | 24 +++++++++++++++++++
  .../recipes-core/packagegroups/ti-test.bb     |  1 +
  2 files changed, 25 insertions(+)

create mode 100644 meta-arago-test/recipes-benchmark/coremark/coremark.bb

Quoted 13 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 5

Quoted 11 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +5 -0
new file mode 100644
index 00000000..330adeda
@@ -0,0 +1,24 @@
+SUMMARY = "The benchmark utility to measure the performance of CPU"
+
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0a18b17ae63deaa8a595035f668aebe1"
+

AFAIR CoreMark uses Apache 2.0 license. LICENSE = "CLOSED" contradicts the LIC_FILES_CHKSUM entry.

Given that the actual License file is the Apache license plus a blurb at the top from Coremark, we should probably follow the model that the stream recipe is doing.

Copy the LICENSE.md file to meta-arago-test/licenses/Coremark and then say:
LICENSE = "Coremark"

Quoted 4 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 9

Quoted 4 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +4 -0
+SRC_URI = "git://github.com/eembc/coremark.git;branch=main;protocol=https"
+SRCREV = "d5fad6bd094899101a4e5fd53af7298160ced6ab"
+
+S = "${WORKDIR}/git"

This patch was written for and against scarthgap. master has made big changes to the structure of the workdir and this recipe is not correct for master.

You will need to submit two patches using the two different sets of variables. You should not set S on the master patch.

Quoted 4 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 10

Quoted 1 line
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +1 -0
+TARGET_CC_ARCH += "${LDFLAGS}"

Above line incorrectly adds LDFLAGS to TARGET_CC_ARCH, using oe_runmake instead of make compile should handle the LDFLAGS. Best to remove it.

Actually, in testing this and looking at some other recipes, I think this is the best way of doing it. I tried using oe_runmake and removing this variable and got failures since the LDFLAGS were missing from the build.

Denys? Any comments?

Quoted 8 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 13

Quoted 3 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +3 -0
+
+do_compile() {
+	make compile

make compile ignores Yocto's toolchain variables. Best to use oe_runmake instead.

Quoted 1 line
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +1 -0
+}

In this case: oe_runmake compile

Quoted 9 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 19

Quoted 5 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +5 -0
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 coremark.exe ${D}${bindir}
+	mv ${D}${bindir}/coremark.exe ${D}${bindir}/coremark

Here you are copying the coremark.exe and then renaming it, you can do it all in one go using install.

Quoted 7 lines

for eg: install -m 0755 coremark.exe ${D}${bindir}/coremark

Additionally you are assuming that the coremark.exe will always be present in the current working dir, best practice is to mention the correct path using the Yocto variables.

for eg: install -m 0755 ${S}/coremark.exe ${D}${bindir}/coremark

Agreed.

Quoted 4 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 22

Quoted 4 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +3 -0
+}
+
+ COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64).*-linux'

Why do we need COMPATIBLE_HOST? Is coremark only truly compatible with those architectures?

Quoted 4 lines

meta-arago-test/recipes-benchmark/coremark/coremark.bb line 24

Quoted 2 lines
meta-arago-test/recipes-benchmark/coremark/coremark.bb new file +2 -0
+
+SRC_URI[sha256sum] = "d003ed54134a0d365c0d5d8dc828432d610d1d1f77b8f58457cf1e599ad13f17"

SRC_URI[sha256sum] is for tarballs, not git fetchers. It would be best to remove it entirely.

Agreed.

Quoted 10 lines

meta-arago-test/recipes-core/packagegroups/ti-test.bb TI_TEST_BASE:append:armv7ve = " \ · line 92

Quoted 10 lines
meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index c1166bc2..2c4b097e 100644
@@ -88,6 +88,7 @@ TI_TEST_BASE:append:armv7ve = " \
  #    timestamping
  TI_TEST_TI_TOOLS = " \
      arm-benchmarks \
+    coremark \
      arm-ddr-bandwidth \

This is not alphabetical, please move the coremark down.

Quoted 17 lines
Quoted 16 lines
meta-arago-test/recipes-core/packagegroups/ti-test.bb +0 -0
      cpuloadgen \
      input-utils \
Signature · 11 lines
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16707): https://lists.yoctoproject.org/g/meta-arago/message/16707
Mute This Topic: https://lists.yoctoproject.org/mt/115990643/9980049
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

- Yogesh

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS