Re: [meta-arago][scarthgap/master][PATCH] meta-arago-test: Add CoreMark CPU benchmark

Ryan Eatmon <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arago
Message-ID <[email protected]>

On 10/28/2025 6:24 AM, Yogesh Hegde wrote:
> Hi Sadik,
> On 14:58-20251028, Sadik via lists.yoctoproject.org wrote:
>> 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.
>>
>> Signed-off-by: sadik <[email protected]>
>> ---
>>   .../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
>>
>> diff --git a/meta-arago-test/recipes-benchmark/coremark/coremark.bb b/meta-arago-test/recipes-benchmark/coremark/coremark.bb
>> new file mode 100644
>> index 00000000..330adeda
>> --- /dev/null
>> +++ b/meta-arago-test/recipes-benchmark/coremark/coremark.bb
>> @@ -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"


>> +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.


>> +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?


>> +
>> +do_compile() {
>> +	make compile
> 
> `make compile` ignores Yocto's toolchain variables. Best to use oe_runmake
> instead.
> 
>> +}

In this case: oe_runmake compile

>> +
>> +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

Agreed.

> 
>> +}
>> +
>> + COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64).*-linux'

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

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

Agreed.


>> diff --git a/meta-arago-test/recipes-core/packagegroups/ti-test.bb b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
>> index c1166bc2..2c4b097e 100644
>> --- a/meta-arago-test/recipes-core/packagegroups/ti-test.bb
>> +++ b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
>> @@ -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.

>>       cpuloadgen \
>>       input-utils \
>> -- 
>> 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

-- 
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.