Skip to contentSkip to conversation

package/coremark: new package

PATCH Superseded Chris Packham 2 participants 4 messages Nov 11, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/coremark: new package

CoreMark is a simple, yet sophisticated benchmark that is designed specifically to test the functionality of a processor core. Running CoreMark produces a single-number score allowing users to make quick comparisons between processors.

https://www.eembc.org/coremark/

---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/coremark/Config.in     |  8 ++++++++
 package/coremark/coremark.hash |  3 +++
 package/coremark/coremark.mk   | 21 +++++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/coremark/Config.in
 create mode 100644 package/coremark/coremark.hash
 create mode 100644 package/coremark/coremark.mk
DEVELOPERS +1 -0
index 43cc1b55ae..ff823a2e3d 100644
@@ -490,6 +490,7 @@ F:	configs/olimex_a13_olinuxino_defconfig
 F:	configs/orangepi_plus_defconfig
 
 N:	Chris Packham <[email protected]>
+F:	package/coremark/
 F:	package/gstreamer1/gst1-shark/
 F:	package/micropython/
 F:	package/micropython-lib/
package/Config.in +1 -0
index 016a99ed1a..16fd95fe38 100644
@@ -87,6 +87,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/bonnie/Config.in"
 	source "package/cache-calibrator/Config.in"
 	source "package/clinfo/Config.in"
+	source "package/coremark/Config.in"
 	source "package/dacapo/Config.in"
 	source "package/dhrystone/Config.in"
 	source "package/dieharder/Config.in"
package/coremark/Config.in new file +8 -0
new file mode 100644
index 0000000000..f0e13eda63
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_COREMARK
+	bool "coremark"
+	help
+	  CoreMark is a benchmark that measures the performance of
+	  microcontrollers (MCUs) and central processing units (CPUs)
+	  used in embedded systems
+
+	  https://www.eembc.org/coremark/
package/coremark/coremark.hash new file +3 -0
new file mode 100644
index 0000000000..57da3e998c
@@ -0,0 +1,3 @@
+#locally computed
+sha256  99c5a6d63af85a281b4e4d6ccb522c446653c435dfec9455ad73ef9e71f28bde  coremark-1.01.tar.gz
+sha256  d72094a3cb629dc7712ae09b7b777416903c6670930928b5530f2ddfb2296888  LICENSE.md
package/coremark/coremark.mk new file +21 -0
new file mode 100644
index 0000000000..418fd5c8d3
@@ -0,0 +1,21 @@
+################################################################################
+#
+# CoreMark
+#
+################################################################################
+
+COREMARK_VERSION = 1.01
+COREMARK_SITE = $(call github,eembc,coremark,v$(COREMARK_VERSION))
+COREMARK_LICENSE = Apache-2.0
+COREMARK_LICENSE_FILES = LICENSE.md
+
+define COREMARK_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) \
+		PORT_DIR=linux$(if $(BR2_ARCH_IS_64),64) EXE= link
+endef
+
+define COREMARK_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/coremark $(TARGET_DIR)/usr/bin/coremark
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/2 package/coremark-pro: new package

CoreMark-Pro is a comprehensive, advanced processor benchmark that works with and enhances the market-proven industry-standard EEMBC CoreMark benchmark.

https://www.eembc.org/coremark-pro/

---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/coremark-pro/Config.in         |  7 +++++
 package/coremark-pro/coremark-pro.hash |  3 ++
 package/coremark-pro/coremark-pro.mk   | 42 ++++++++++++++++++++++++++
 package/coremark-pro/coremark-pro.sh   | 36 ++++++++++++++++++++++
 6 files changed, 90 insertions(+)
 create mode 100644 package/coremark-pro/Config.in
 create mode 100644 package/coremark-pro/coremark-pro.hash
 create mode 100644 package/coremark-pro/coremark-pro.mk
 create mode 100755 package/coremark-pro/coremark-pro.sh
DEVELOPERS +1 -0
index ff823a2e3d..291dd41286 100644
@@ -491,6 +491,7 @@ F:	configs/orangepi_plus_defconfig
 
 N:	Chris Packham <[email protected]>
 F:	package/coremark/
+F:	package/coremark-pro/
 F:	package/gstreamer1/gst1-shark/
 F:	package/micropython/
 F:	package/micropython-lib/
package/Config.in +1 -0
index 16fd95fe38..0011ccd684 100644
@@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/cache-calibrator/Config.in"
 	source "package/clinfo/Config.in"
 	source "package/coremark/Config.in"
+	source "package/coremark-pro/Config.in"
 	source "package/dacapo/Config.in"
 	source "package/dhrystone/Config.in"
 	source "package/dieharder/Config.in"
package/coremark-pro/Config.in new file +7 -0
new file mode 100644
index 0000000000..86e0c1105c
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_COREMARK_PRO
+	bool "coremark-pro"
+	select BR2_PACKAGE_PERL
+	help
+	  CoreMark-PRO is a comprehensive, advanced processor benchmark.
+
+	  https://www.eembc.org/coremark-pro/
package/coremark-pro/coremark-pro.hash new file +3 -0
new file mode 100644
index 0000000000..16b121edb3
@@ -0,0 +1,3 @@
+#locally computed
+sha256  440223554134832efec4ad220795611769ded3869fbc3ce3c59b05b7ddeb9f6d  coremark-pro-1.1.2743.tar.gz
+sha256  0d7775bd793ea71fef3594c18164a08ed2f5f66c898958d0644f7a236a536f2b  LICENSE.md
package/coremark-pro/coremark-pro.mk new file +42 -0

42 lines not on this page · raw message

package/coremark-pro/coremark-pro.sh new file +36 -0
new file mode 100755
index 0000000000..65ad9df645
@@ -0,0 +1,36 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+
+workloads="cjpeg-rose7-preset core linear_alg-mid-100x100-sp \
+    loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test zip-test"
+
+rm -rf /tmp/coremark-pro
+mkdir -p /tmp/coremark-pro
+cp /usr/share/coremark-pro/Rose256.bmp /tmp/coremark-pro
+cp /usr/share/coremark-pro/logs/*.size.log /tmp/coremark-pro
+
+cd /tmp/coremark-pro
+
+for contype in single best; do
+    cat /usr/share/coremark-pro/util/perl/headings.txt >>result.log
+    for wld in $workloads; do
+        [ "$contype" = "single" ] && XCMD="-c1 -w1"
+        [ "$contype" = "best" ] && XCMD="-c$(nproc) -w$(nproc)"
+        echo "#Results for verification run started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >$wld-$contype-result.log
+        echo "Verification run for $wld"
+        $wld $XCMD -v1 > $wld.run.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log
+        echo "#Results for performance runs started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >>$wld-$contype-result.log
+        echo "Performance run for $wld"
+        for i in 1 2 3; do
+            $wld $XCMD -v0 > $wld.run.log
+            LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log
+        done
+        echo "#Median for final result $wld" >>$wld-$contype-result.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_median.pl $wld-$contype-result.log $contype >>$wld-$contype-result.log
+        cat $wld-$contype-result.log >>result.log
+    done
+done
+LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_mark.pl -i result.log -s coremarkpro > result.mark
+cat result.mark
+cd - >/dev/null
Signature · 1 line
2.29.2
#2 lore raw

PATCH 2/2 package/coremark-pro: new package

Chris,

Quoted 8 lines · Chris Packham

CoreMark-Pro is a comprehensive, advanced processor benchmark that works with and enhances the market-proven industry-standard EEMBC CoreMark benchmark.

https://www.eembc.org/coremark-pro/

./utils/check-package package/coremark-pro/*
52 lines processed
0 warnings generated

./utils/test-pkg -k -d foo_coremarkpro -p coremark-pro

                             br-arm-full [1/6]: OK
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: FAILED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

^^^^^^^^^^^^ Failed is fixed by adding the missing dependency mentioned below.

**Ran in QEMU to runtime test as follows**

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_COREMARK=y
BR2_PACKAGE_COREMARK_PRO=y
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set

# coremark-pro.sh
Verification run for cjpeg-rose7-preset
random: perl: uninitialized urandom read (4 bytes read)
Performance run for cjpeg-rose7-preset
random: perl: uninitialized urandom read (4 bytes read)
random: perl: uninitialized urandom read (4 bytes read)
random: perl: uninitialized urandom read (4 bytes read)
random: perl: uninitialized urandom read (4 bytes read)
Verification run for core
random: perl: uninitialized urandom read (4 bytes read)
Performance run for core
random: perl: uninitialized urandom read (4 bytes read)
random: perl: uninitialized urandom read (4 bytes read)
random: perl: uninitialized urandom read (4 bytes read)
Verification run for linear_alg-mid-100x100-sp
Performance run for linear_alg-mid-100x100-sp

Verification run for loops-all-mid-10k-sp
Performance run for loops-all-mid-10k-sp
<snip>

Quoted 43 lines
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/coremark-pro/Config.in         |  7 +++++
 package/coremark-pro/coremark-pro.hash |  3 ++
 package/coremark-pro/coremark-pro.mk   | 42 ++++++++++++++++++++++++++
 package/coremark-pro/coremark-pro.sh   | 36 ++++++++++++++++++++++
 6 files changed, 90 insertions(+)
 create mode 100644 package/coremark-pro/Config.in
 create mode 100644 package/coremark-pro/coremark-pro.hash
 create mode 100644 package/coremark-pro/coremark-pro.mk
 create mode 100755 package/coremark-pro/coremark-pro.sh
DEVELOPERS +1 -0
index ff823a2e3d..291dd41286 100644
@@ -491,6 +491,7 @@ F:  configs/orangepi_plus_defconfig
 
 N:     Chris Packham <[email protected]>
 F:     package/coremark/
+F:     package/coremark-pro/
 F:     package/gstreamer1/gst1-shark/
 F:     package/micropython/
 F:     package/micropython-lib/
package/Config.in +1 -0
index 16fd95fe38..0011ccd684 100644
@@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark"
        source "package/cache-calibrator/Config.in"
        source "package/clinfo/Config.in"
        source "package/coremark/Config.in"
+       source "package/coremark-pro/Config.in"
        source "package/dacapo/Config.in"
        source "package/dhrystone/Config.in"
        source "package/dieharder/Config.in"
package/coremark-pro/Config.in new file +0 -0
new file mode 100644
index 0000000000..86e0c1105c

package/coremark-pro/Config.in line 3

Quoted 3 lines
package/coremark-pro/Config.in new file +3 -0
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_COREMARK_PRO
+       bool "coremark-pro"
+       select BR2_PACKAGE_PERL

Take a look at package/perl/Config.in and you'll notice that it has a "depends on" that you need to add here above your select. See package/dahdi-tools/Config.in for an example

#3 lore raw

PATCH 1/2 package/coremark: new package

In reply to Chris Packham

Chris,

Quoted 9 lines · Chris Packham

CoreMark is a simple, yet sophisticated benchmark that is designed specifically to test the functionality of a processor core. Running CoreMark produces a single-number score allowing users to make quick comparisons between processors.

https://www.eembc.org/coremark/

./utils/test-pkg -k -d foo_coremark -p coremark

                             br-arm-full [1/6]: OK
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: OK
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

***Runtime test with QEMU***

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_COREMARK=y
BR2_PACKAGE_COREMARK_PRO=y
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set

# coremark
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 13102
Total time (secs): 13.102000
Iterations/Sec   : 1526.484506
Iterations       : 20000
Compiler version : GCC9.2.1 20191025
Compiler flags   : -O2   -lrt
Memory location  : Please put data memory location here
                       (e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0x382f
Correct operation validated. See readme.txt for run and reporting rules.
CoreMark 1.0 : 1526.484506 / GCC9.2.1 20191025 -O2   -lrt / Heap