From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- .../analyze-suspend/analyze-suspend_git.bb | 29 +++ .../recipes-benchmark/bonnie/bonnie++_1.04.bb | 31 +++ .../cpuburn/cpuburn-neon_20140626.bb | 30 +++ .../meta-oe/recipes-benchmark/dbench/dbench_4.0.bb | 26 +++ .../recipes-benchmark/dbench/files/destdir.patch | 28 +++ .../recipes-benchmark/dbench/files/makefile.patch | 18 ++ .../dhrystone/dhrystone-2.1/dhrystone.patch | 81 ++++++++ .../recipes-benchmark/dhrystone/dhrystone_2.1.bb | 26 +++ .../files/0001-update-the-interpreter-paths.patch | 94 +++++++++ .../meta-oe/recipes-benchmark/fio/fio_3.12.bb | 45 +++++ .../glmark2/files/0001-Fix-clang-warnings.patch | 31 +++ .../files/Fix-configure-for-sqrt-check.patch | 21 ++ ...-packages-to-be-used-by-the-enabled-flavo.patch | 43 +++++ .../recipes-benchmark/glmark2/glmark2_git.bb | 62 ++++++ .../iozone3/iozone3/copyright.txt | 62 ++++++ .../iozone3/iozone3/parallelism.patch | 97 ++++++++++ .../recipes-benchmark/iozone3/iozone3_484.bb | 119 ++++++++++++ .../recipes-benchmark/iperf2/iperf2_2.0.10.bb | 19 ++ .../0002-Remove-pg-from-profile_CFLAGS.patch | 31 +++ .../iperf3/iperf3/automake-foreign.patch | 17 ++ .../meta-oe/recipes-benchmark/iperf3/iperf3_3.6.bb | 33 ++++ .../libc-bench/libc-bench_20110206.bb | 17 ++ .../0001-include-stddef.h-for-ptrdiff_t.patch | 23 +++ ....py-not-use-hard-coded-path-.-obj-hugeadm.patch | 41 ++++ .../files/0002-Mark-glibc-specific-code-so.patch | 37 ++++ ...id-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch | 46 +++++ ...0004-shm.c-Mark-glibc-specific-changes-so.patch | 28 +++ .../files/0005-Include-dirent.h-for-ino_t.patch | 26 +++ .../files/0006-include-limits.h-for-PATH_MAX.patch | 40 ++++ ...s-avoid-search-host-library-path-for-cros.patch | 97 ++++++++++ ...s-elf_i386-avoid-search-host-library-path.patch | 39 ++++ ...ng-LIB32-and-LIB64-if-they-point-to-the-s.patch | 24 +++ ...Makefile-install-static-4G-edge-testcases.patch | 28 +++ .../libhugetlbfs/libhugetlbfs_git.bb | 72 +++++++ .../recipes-benchmark/linpack/linpack_1.0.bb | 20 ++ ...usl-define-guard-before-redefining-sockle.patch | 27 +++ .../0001-lat_http.c-Add-printf-format.patch | 24 +++ ...efile-use-libdir-instead-of-hardcoded-lib.patch | 34 ++++ ...t-CFLAGS-LDFLAGS-to-append-values-passed-.patch | 73 +++++++ .../fix-lmbench-memory-check-failure.patch | 215 +++++++++++++++++++++ .../lmbench_result_html_report.patch | 69 +++++++ .../lmbench/lmbench-3.0-a9/obey-ranlib.patch | 36 ++++ .../lmbench-3.0-a9/update-config-script.patch | 22 +++ .../lmbench-3.0-a9/update-results-script.patch | 170 ++++++++++++++++ .../0001-avoid-gcc-optimize-away-the-loops.patch | 80 ++++++++ .../recipes-benchmark/lmbench/lmbench/lmbench-run | 23 +++ .../lmbench/lmbench/rename-line-binary.patch | 30 +++ .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 92 +++++++++ .../memtester/files/Makefile.patch | 28 +++ .../recipes-benchmark/memtester/memtester_4.3.0.bb | 25 +++ ...kefile-add-more-dependencies-to-pointer.h.patch | 23 +++ .../nbench-byte/nbench-byte/nbench_32bits.patch | 46 +++++ .../nbench-byte/nbench-byte_2.2.3.bb | 28 +++ .../phoronix-test-suite_8.0.1.bb | 41 ++++ .../recipes-benchmark/s-suite/s-suite_git.bb | 30 +++ .../recipes-benchmark/sysbench/sysbench_0.4.12.bb | 26 +++ .../tinymembench/tinymembench_git.bb | 33 ++++ ...-of-crc32-function-to-fix-build-using-GCC.patch | 30 +++ .../0001-Specify-printf-formats.patch | 49 +++++ .../tiobench-0.3.3/avoid-glibc-clashes.patch | 57 ++++++ .../tiobench-0.3.3/tiobench-makefile.patch | 49 +++++ .../recipes-benchmark/tiobench/tiobench_0.3.3.bb | 30 +++ .../recipes-benchmark/whetstone/whetstone_1.2.bb | 20 ++ 63 files changed, 2891 insertions(+) create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/analyze-suspend/analyze-suspend_git.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/bonnie/bonnie++_1.04.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/cpuburn/cpuburn-neon_20140626.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/dbench/dbench_4.0.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/destdir.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/makefile.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.12.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/copyright.txt create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/parallelism.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_484.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/automake-foreign.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.6.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/lmbench-run create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/memtester/files/Makefile.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/Makefile-add-more-dependencies-to-pointer.h.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/nbench_32bits.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_8.0.1.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb create mode 100644 external/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb (limited to 'external/meta-openembedded/meta-oe/recipes-benchmark') diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/analyze-suspend/analyze-suspend_git.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/analyze-suspend/analyze-suspend_git.bb new file mode 100644 index 00000000..8888b226 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/analyze-suspend/analyze-suspend_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "Analyze Suspend" +DESCRIPTION = "analyze-suspend is a tool for system developers to visualize \ +the activity between suspend and resume, allowing them to identify \ +inefficiencies and bottlenecks." +HOMEPAGE = "https://01.org/suspendresume" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +# Apart from the listed RDEPENDS, analyze-suspend depends on some features +# provided by the kernel. These options are: +# - CONFIG_PM_DEBUG=y +# - CONFIG_PM_SLEEP_DEBUG=y +# - CONFIG_FTRACE=y +# - CONFIG_FUNCTION_TRACER=y +# - CONFIG_FUNCTION_GRAPH_TRACER=y + +RDEPENDS_${PN} += "python-core python-datetime python-stringold" + +PV = "3.2+gitr${SRCPV}" +SRCREV = "c669e002a2e7504f21e277ad248fa81033926391" +SRC_URI = "git://github.com/01org/suspendresume.git;protocol=https" +S = "${WORKDIR}/git" + +do_install() { + install -Dm 0755 analyze_suspend.py ${D}${bindir}/analyze_suspend.py + install -Dm 0644 README ${D}${docdir}/analyze-suspend/README +} + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/bonnie/bonnie++_1.04.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/bonnie/bonnie++_1.04.bb new file mode 100644 index 00000000..d7583f07 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/bonnie/bonnie++_1.04.bb @@ -0,0 +1,31 @@ +SUMMARY = "Tests large file IO and creation/deletion of small files" +HOMEPAGE = "http://www.coker.com.au/bonnie++/" +SECTION = "benchmark/tests" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://copyright.txt;md5=cd4dde95a6b9d122f0a9150ae9cc3ee0" + +SRC_URI = "http://www.coker.com.au/bonnie++/${BPN}_${PV}.tgz \ +" +SRC_URI[md5sum] = "1414aab86e2db1b4691bd4be82031012" +SRC_URI[sha256sum] = "507bd2ce5360c7c98b91b0fdc2bed5c9320b5c9699f7d4a3d1c86b256896c15e" + +inherit autotools-brokensep + +SCRIPTS = "bon_csv2html bon_csv2txt" +EXES = "bonnie++ zcav" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install () { + install -d ${D}/${bindir} + install -d ${D}/${sbindir} + install -m 0755 ${EXES} ${D}/${sbindir} + install -m 0755 ${SCRIPTS} ${D}/${bindir} +} + +PACKAGES =+ "bonnie-scripts" + +FILES_${PN} = "${sbindir}" +FILES_bonnie-scripts = "${bindir}" + +RDEPENDS_bonnie-scripts += "perl" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/cpuburn/cpuburn-neon_20140626.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/cpuburn/cpuburn-neon_20140626.bb new file mode 100644 index 00000000..14e3fc4f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/cpuburn/cpuburn-neon_20140626.bb @@ -0,0 +1,30 @@ +SUMMARY = "CPU burn app that loads the NEON coprocessor fully" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://burn.S;md5=823abc72c2cd448e87df9bc5355a4456" + +DL_DIR_append = "/${PN}-${PV}" + +# Ensure to make this available for machine which has neon +COMPATIBLE_MACHINE = "(${@bb.utils.contains("TUNE_FEATURES", "neon", "${MACHINE}", "Invalid!", d)})" + +SRC_URI = "http://hardwarebug.org/files/burn.S;name=mru \ + https://raw.githubusercontent.com/ssvb/cpuburn-arm/dd5c5ba58d2b0b23cfab4a286f9d3f5510000f20/cpuburn-a8.S;name=ssvb" + +SRC_URI[mru.md5sum] = "823abc72c2cd448e87df9bc5355a4456" +SRC_URI[mru.sha256sum] = "01d9fc04f83740c513c25401dcc89c11b2a5a6013e70bfca42b7b02129f88cd2" +SRC_URI[ssvb.md5sum] = "ba0ef2939a3b3b487523448c67544e94" +SRC_URI[ssvb.sha256sum] = "ce42ebdc71c876a33d9f7534355ef76cefa0d00ddb19ad69cf05a266c861d08d" + +S = "${WORKDIR}" + +do_compile() { + ${CC} ${CFLAGS} ${LDFLAGS} burn.S -o burn + ${CC} ${CFLAGS} ${LDFLAGS} cpuburn-a8.S -o burn-neona8 +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/burn ${D}${bindir}/burn-neon + install -m 0755 ${S}/burn-neona8 ${D}${bindir}/ +} + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/dbench_4.0.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/dbench_4.0.bb new file mode 100644 index 00000000..fb6a96e6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/dbench_4.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "The dbench (disk) and tbench (TCP) benchmarks" +SUMMARY_dbench = "Filesystem load benchmark" +SUMMARY_tbench = "TCP load benchmark" +HOMEPAGE = "http://samba.org/ftp/tridge/dbench/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "popt" + +SRC_URI = "\ + http://samba.org/ftp/tridge/dbench/dbench-${PV}.tar.gz \ + file://destdir.patch \ + file://makefile.patch" + +inherit autotools + +PACKAGES =+ "tbench" + +RPROVIDES_${PN}-dbg += "tbench-dbg" + +TARGET_CC_ARCH += "${LDFLAGS}" + +FILES_tbench = "${bindir}/tbench* ${prefix}/share/client.txt" + +SRC_URI[md5sum] = "1fe56ff71b9a416f8889d7150ac54da4" +SRC_URI[sha256sum] = "6001893f34e68a3cfeb5d424e1f2bfef005df96a22d86f35dc770c5bccf3aa8a" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/destdir.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/destdir.patch new file mode 100644 index 00000000..4cd2a35f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/destdir.patch @@ -0,0 +1,28 @@ +Append $(DESTDIR) to all $(bindir), $(datadir) and $(mandir). Got +this patch from OE commit id 709c4d66e0b107ca606941b988bad717c0b45d9b + +Upstream-Status: Inappropriate [not author] + +Index: dbench-3.04/Makefile.in +=================================================================== +--- dbench-3.04.orig/Makefile.in 2006-09-17 20:21:07.000000000 +0200 ++++ dbench-3.04/Makefile.in 2006-09-17 20:21:36.000000000 +0200 +@@ -32,12 +32,12 @@ + + # Careful here: don't install client.txt over itself. + install: all +- ${INSTALLCMD} -d $(bindir) $(datadir) $(mandir) +- ${INSTALLCMD} dbench tbench tbench_srv $(bindir) +- ${INSTALLCMD} client.txt $(datadir) +- ${INSTALLCMD} -m644 dbench.1 $(mandir) +- ln -sf dbench.1 $(mandir)/tbench.1 +- ln -sf dbench.1 $(mandir)/tbench_srv.1 ++ ${INSTALLCMD} -d $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) $(DESTDIR)$(mandir) ++ ${INSTALLCMD} dbench tbench tbench_srv $(DESTDIR)$(bindir) ++ ${INSTALLCMD} @top_srcdir@/client.txt $(DESTDIR)$(datadir) ++ ${INSTALLCMD} -m644 @top_srcdir@/dbench.1 $(DESTDIR)$(mandir) ++ ln -sf dbench.1 $(DESTDIR)$(mandir)/tbench.1 ++ ln -sf dbench.1 $(DESTDIR)$(mandir)/tbench_srv.1 + + clean: + rm -f *.o *~ dbench tbench tbench_srv diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/makefile.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/makefile.patch new file mode 100644 index 00000000..11fb4ffb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/dbench/files/makefile.patch @@ -0,0 +1,18 @@ +Add space between install -m option and its argument. Got this patch from +OE 709c4d66e0b107ca606941b988bad717c0b45d9b + +Upstream-Status: Inappropriate [not author] + +Index: dbench-4.0/Makefile.in +=================================================================== +--- dbench-4.0.orig/Makefile.in ++++ dbench-4.0/Makefile.in +@@ -35,7 +35,7 @@ install: all + ${INSTALLCMD} -d $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) $(DESTDIR)$(mandir) + ${INSTALLCMD} dbench tbench tbench_srv $(DESTDIR)$(bindir) + ${INSTALLCMD} @top_srcdir@/client.txt $(DESTDIR)$(datadir) +- ${INSTALLCMD} -m644 @top_srcdir@/dbench.1 $(DESTDIR)$(mandir) ++ ${INSTALLCMD} -m 644 @top_srcdir@/dbench.1 $(DESTDIR)$(mandir) + ln -sf dbench.1 $(DESTDIR)$(mandir)/tbench.1 + ln -sf dbench.1 $(DESTDIR)$(mandir)/tbench_srv.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch new file mode 100644 index 00000000..6a5350c3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch @@ -0,0 +1,81 @@ +dhrystone: fix compilation problems + +This patch fixes two compilation errors with original +dhrystone sources: +* Redefinition of times() with wrong return type + - Fixed by commenting out the unnecessary redefinition +* Undefined identifier HZ + - Originally HZ was supposed to be the clock frequency + value for times() + - For Linux, the frequency should come from sysconf + - This patch defines global varible HZ and initializes + it from sysconf + +Additionally, this patch adds a simple Makefile. + +Upstream-status: Pending + +Sign-off-by: Kimmo Surakka +Signed-off-by: Jose Alarcon +--- + +diff -Naur dhry.orig/dhry_1.c dhry/dhry_1.c +--- dhry.orig/dhry_1.c 2015-07-20 14:25:58.059945353 +0300 ++++ dhry/dhry_1.c 2015-07-20 12:43:25.318945353 +0300 +@@ -45,11 +45,15 @@ + + #ifdef TIMES + struct tms time_info; +-extern int times (); ++/* extern int times (); */ + /* see library function "times" */ + #define Too_Small_Time 120 + /* Measurements should last at least about 2 seconds */ + #endif ++#ifndef HZ ++#include /* sysconf */ ++ long HZ; ++#endif + #ifdef TIME + extern long time(); + /* see library function "time" */ +@@ -84,6 +88,9 @@ + + /* Initializations */ + ++#ifndef HZ ++ HZ = sysconf(_SC_CLK_TCK); ++#endif + Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type)); + Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type)); + +diff -Naur dhry.orig/dhry.h dhry/dhry.h +--- dhry.orig/dhry.h 2015-07-20 14:25:58.054945353 +0300 ++++ dhry/dhry.h 2015-07-20 12:42:59.903945353 +0300 +@@ -420,4 +420,6 @@ + } variant; + } Rec_Type, *Rec_Pointer; + +- ++#ifndef HZ ++ extern long HZ; ++#endif +diff -Naur dhry.orig/Makefile dhry/Makefile +--- dhry.orig/Makefile 1970-01-01 02:00:00.000000000 +0200 ++++ dhry/Makefile 2015-07-20 14:10:45.832945353 +0300 +@@ -0,0 +1,15 @@ ++CC=gcc ++ ++all: dhry ++ ++dhry: dhry_1.o dhry_2.o ++ $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS) ++ ++dhry_1.o: dhry_1.c dhry.h ++ ++dhry_2.o: dhry_2.c dhry.h ++ ++clean: ++ rm -f *.o *~ ++ ++.PHONY: all clean diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb new file mode 100644 index 00000000..17e8c700 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "Dhrystone CPU benchmark" +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/PD;md5=b3597d12946881e13cb3b548d1173851" + +SRC_URI = "http://www.netlib.org/benchmark/dhry-c;downloadfilename=dhry-c.shar \ + file://dhrystone.patch" +SRC_URI[md5sum] = "75aa5909c174eed98c134be2f56307da" +SRC_URI[sha256sum] = "038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e" + +# Need to override Makefile variables +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +do_unpack() { + [ -d ${S} ] || mkdir -p ${S} + cd ${S} + sh ${DL_DIR}/dhry-c.shar +} +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/dhry ${D}${bindir} +} + +# Prevent procedure merging as required by dhrystone.c: +CFLAGS += "-fno-lto" + +LDFLAGS += "-fno-lto" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch new file mode 100644 index 00000000..327b9f5b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch @@ -0,0 +1,94 @@ +From 55078e494bdf7da7dd9cb76077fa7ac2a66b6dd6 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Fri, 20 Jul 2018 02:33:25 -0700 +Subject: [PATCH] update the interpreter paths + +Update the interpreter path to make it more +compatible + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu +--- + tools/fio_jsonplus_clat2csv | 2 +- + tools/fiologparser.py | 2 +- + tools/genfio | 2 +- + tools/hist/fiologparser_hist.py | 2 +- + tools/hist/half-bins.py | 2 +- + tools/plot/fio2gnuplot | 2 +- + t/steadystate_tests.py | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tools/fio_jsonplus_clat2csv b/tools/fio_jsonplus_clat2csv +index 78a007e5..0524b6e6 100755 +--- a/tools/fio_jsonplus_clat2csv ++++ b/tools/fio_jsonplus_clat2csv +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + # Note: this script is python2 and python3 compatible. + # + # fio_jsonplus_clat2csv +diff --git a/tools/fiologparser.py b/tools/fiologparser.py +index cc29f1c7..ea60e783 100755 +--- a/tools/fiologparser.py ++++ b/tools/fiologparser.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + # Note: this script is python2 and python 3 compatible. + # + # fiologparser.py +diff --git a/tools/genfio b/tools/genfio +index 286d814d..8518bbcc 100755 +--- a/tools/genfio ++++ b/tools/genfio +@@ -1,4 +1,4 @@ +-#!/usr/bin/bash ++#!/bin/bash + # + # Copyright (C) 2013 eNovance SAS + # Author: Erwan Velu +diff --git a/tools/hist/fiologparser_hist.py b/tools/hist/fiologparser_hist.py +index 8910d5fa..b77c2933 100755 +--- a/tools/hist/fiologparser_hist.py ++++ b/tools/hist/fiologparser_hist.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + """ + Utility for converting *_clat_hist* files generated by fio into latency statistics. + +diff --git a/tools/hist/half-bins.py b/tools/hist/half-bins.py +index 1bba8ff7..58d53e36 100755 +--- a/tools/hist/half-bins.py ++++ b/tools/hist/half-bins.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + """ Cut the number bins in half in fio histogram output. Example usage: + + $ half-bins.py -c 2 output_clat_hist.1.log > smaller_clat_hist.1.log +diff --git a/tools/plot/fio2gnuplot b/tools/plot/fio2gnuplot +index 4d1815cf..509141af 100755 +--- a/tools/plot/fio2gnuplot ++++ b/tools/plot/fio2gnuplot +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + # Note: this script is python2 and python3 compatible. + # + # Copyright (C) 2013 eNovance SAS +diff --git a/t/steadystate_tests.py b/t/steadystate_tests.py +index 50254dcc..95e7dfde 100755 +--- a/t/steadystate_tests.py ++++ b/t/steadystate_tests.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 ++#!/usr/bin/env python + # Note: this script is python2 and python 3 compatible. + # + # steadystate_tests.py +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.12.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.12.bb new file mode 100644 index 00000000..2deb42db --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.12.bb @@ -0,0 +1,45 @@ +SUMMARY = "Filesystem and hardware benchmark and stress tool" +DESCRIPTION = "fio is an I/O tool meant to be used both for benchmark and \ +stress/hardware verification. It has support for a number of I/O engines, \ +I/O priorities (for newer Linux kernels), rate I/O, forked or threaded jobs, \ +and much more. It can work on block devices as well as files. fio accepts \ +job descriptions in a simple-to-understand text format. Several example job \ +files are included. fio displays all sorts of I/O performance information." +HOMEPAGE = "http://freecode.com/projects/fio" +SECTION = "console/tests" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "libaio zlib" +RDEPENDS_${PN} = "python bash" + +PACKAGECONFIG_NUMA = "numa" +# ARM does not currently support NUMA +PACKAGECONFIG_NUMA_arm = "" + +PACKAGECONFIG ??= "${PACKAGECONFIG_NUMA}" +PACKAGECONFIG[numa] = ",--disable-numa,numactl" + +# rev for v3.8 +SRCREV = "16500b5a0b03ee0142d592bb74a46943a223b06e" +SRC_URI = "git://git.kernel.dk/fio.git \ + file://0001-update-the-interpreter-paths.patch \ +" + +S = "${WORKDIR}/git" + +# avoids build breaks when using no-static-libs.inc +DISABLE_STATIC = "" + +EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}'" +EXTRA_OECONF = "--disable-optimizations" + +do_configure() { + ./configure ${EXTRA_OECONF} +} + +do_install() { + oe_runmake install DESTDIR=${D} prefix=${prefix} mandir=${mandir} + install -d ${D}/${docdir}/${PN} + cp -R --no-dereference --preserve=mode,links -v ${S}/examples ${D}/${docdir}/${PN}/ +} diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch new file mode 100644 index 00000000..cdf09fae --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch @@ -0,0 +1,31 @@ +From 35e9f80518d666db5f9c62e8072ffbc307b4af4f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 26 Aug 2017 08:30:01 -0700 +Subject: [PATCH] Fix clang warnings + +../src/native-state-drm.cpp:334:20: error: cannot pass object of non-trivial type 'std::__cxx11::basic_string' through variadic function; call will abort at runtime [-Wnon-pod-varargs] + dev_path); + ^ +1 error generated. + +Signed-off-by: Khem Raj +--- + src/native-state-drm.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp +index dc2b323..62566ee 100644 +--- a/src/native-state-drm.cpp ++++ b/src/native-state-drm.cpp +@@ -331,7 +331,7 @@ static int open_using_udev_scan() + if (!valid_fd(fd)) { + // %m is GLIBC specific... Maybe use strerror here... + Log::error("Tried to use '%s' but failed.\nReason : %m", +- dev_path); ++ dev_path.c_str()); + } + else + Log::debug("Success!\n"); +-- +2.14.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch new file mode 100644 index 00000000..7de05ee5 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch @@ -0,0 +1,21 @@ +From 9fb298c398f88a63d71432be1410d52fae089063 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Mon, 8 Aug 2016 11:39:54 -0500 + +--- + wscript | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wscript b/wscript +index ca843f4..eb4a26a 100644 +--- a/wscript ++++ b/wscript +@@ -84,7 +84,7 @@ def configure(ctx): + ctx.check_cc(lib = lib, uselib_store = uselib) + + # Check required functions +- req_funcs = [('memset', 'string.h', []) ,('sqrt', 'math.h', ['m'])] ++ req_funcs = [('memset', 'string.h', [])] + for func, header, uselib in req_funcs: + ctx.check_cc(function_name = func, header_name = header, + uselib = uselib, mandatory = True) diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch new file mode 100644 index 00000000..72b8debe --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch @@ -0,0 +1,43 @@ +From: Otavio Salvador +Subject: [PATCH] build: Check packages to be used by the enabled flavors +Organization: O.S. Systems Software LTDA. + +The packages shouldn't be dynamically detected otherwise the build +predictability is lost. We now have all packages as mandatory but +dependent of the flavors which use them. + +Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/8] + +Signed-off-by: Otavio Salvador +--- + wscript | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/wscript b/wscript +index cab62a3..e7eaed0 100644 +--- a/wscript ++++ b/wscript +@@ -121,13 +121,17 @@ def configure(ctx): + ('mirclient','mirclient', '0.13', list_contains(ctx.options.flavors, 'mir')), + ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')), + ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))] +- for (pkg, uselib, atleast, mandatory) in opt_pkgs: ++ for (pkg, uselib, atleast, check) in opt_pkgs: ++ # Check packages required by the flavors ++ if not check: ++ continue ++ + if atleast is None: + ctx.check_cfg(package = pkg, uselib_store = uselib, +- args = '--cflags --libs', mandatory = mandatory) ++ args = '--cflags --libs', mandatory = True) + else: + ctx.check_cfg(package = pkg, uselib_store = uselib, atleast_version=atleast, +- args = '--cflags --libs', mandatory = mandatory) ++ args = '--cflags --libs', mandatory = True) + + + # Prepend CXX flags so that they can be overriden by the +-- +2.4.6 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb new file mode 100644 index 00000000..99050e70 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb @@ -0,0 +1,62 @@ +SUMMARY = "OpenGL (ES) 2.0 benchmark" +DESCRIPTION = "glmark2 is a benchmark for OpenGL (ES) 2.0. \ +It uses only the subset of the OpenGL 2.0 API that is compatible with OpenGL ES 2.0." +HOMEPAGE = "https://launchpad.net/glmark2" +BUGTRACKER = "https://bugs.launchpad.net/glmark2" + +LICENSE = "GPLv3+ & SGIv1" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552" + +DEPENDS = "libpng jpeg udev" + +PV = "2017.07+${SRCPV}" + +COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '.*-linux*', 'null', d)}" + +SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \ + file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \ + file://Fix-configure-for-sqrt-check.patch \ + file://0001-Fix-clang-warnings.patch \ + " +SRCREV = "ed20c633f1926d1dd78e3e89043c85a81302cbe6" + +S = "${WORKDIR}/git" + +inherit waf pkgconfig distro_features_check + +REQUIRED_DISTRO_FEATURES += "opengl" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gl wayland-gles2', '', d)} \ + drm-gl drm-gles2" + +# Enable C++11 features +CXXFLAGS += "-std=c++11" + +PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11" +PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11" +PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm virtual/libgbm" +PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm virtual/libgbm" +PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland" +PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland" + +python __anonymous() { + packageconfig = (d.getVar("PACKAGECONFIG") or "").split() + flavors = [] + if "x11-gles2" in packageconfig: + flavors.append("x11-glesv2") + if "x11-gl" in packageconfig: + flavors.append("x11-gl") + if "wayland-gles2" in packageconfig: + flavors.append("wayland-glesv2") + if "wayland-gl" in packageconfig: + flavors.append("wayland-gl") + if "drm-gles2" in packageconfig: + flavors.append("drm-glesv2") + if "drm-gl" in packageconfig: + flavors.append("drm-gl") + if flavors: + d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors)) +} + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/copyright.txt b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/copyright.txt new file mode 100644 index 00000000..3468fa92 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/copyright.txt @@ -0,0 +1,62 @@ +LICENSE: + + Copyright 1991, 1992, 1994, 1998, 1999, 2002 William D. Norcott + + License to freely use and distribute this software is hereby granted + by the author, subject to the condition that this copyright notice + remains intact. The author retains the exclusive right to publish + derivative works based on this work, including, but not limited to + revised versions of this work. + + + +Below is author reply to question about distributing iozone3 in +OpenEmbedded: + +======================================================================== + +Marcin, + + Re-distribution is permitted as long as the copyright is + maintained and the source code is not changed. I do not + see a problem with your mods to enable fileop for Linux-arm, + as these mods have been returned to the Iozone folks, + and they have been accepted for inclusion in the next + release :-) + +Thank you for your contribution, +Don Capps + +----- Original Message ----- +From: "Marcin Juszkiewicz" +To: "Don Capps" ; "William D. Norcott" + +Sent: Sunday, October 29, 2006 4:55 PM +Subject: iozone3 263 patch for arm and License question + + +> Morning +> +> I want to include iozone3 in OpenEmbedded [1] metadata to give it for +> other developers. Currently OE is used to build few distributions for +> misc platforms: ARM, SH3, SH4, x86, PowerPC and different types of +> machines (PDA, settopbox, devboards, desktops, thin clients, routers). +> +> According to your distribution of derivations is forbidden. Packaging +> iozone3 in OpenEmbedded will not involve any source code changes. But +> when I was building it for ARM I discovered that fileop binary was not +> built - so I created patch for it (attached). Not yet tested it on target +> device. +> +> Thus, I seek your written permission via e-mail to distribute a package of +> the unmodified source code and also a package of the pre-compiled binary. +> Your copyright statement will be included in the package. +> +> +> 1. http://www.openembedded.org/ +> +> Regards +> -- +> JID: hrw-jabber.org +> OpenEmbedded developer/consultant + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/parallelism.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/parallelism.patch new file mode 100644 index 00000000..d5622ed2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/parallelism.patch @@ -0,0 +1,97 @@ +remove libasync.o and libbif.o from deps + +there are no implicit rules to build them and they get wrong CFLAGS +when compiled with implicit rule. + +They are built as part of iozone_linux.o target anyway + +Only fixed linux targets for now + +Signed-off-by: Khem Raj +Upstream-Status: Pending + + + +--- current/makefile.org 2016-12-06 02:19:10.367911020 +0000 ++++ current/makefile 2016-12-06 02:21:38.767911020 +0000 +@@ -167,7 +167,7 @@ + # + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # +-linux: iozone_linux.o libasync.o libbif.o fileop_linux.o pit_server.o ++linux: iozone_linux.o fileop_linux.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux.o libasync.o libbif.o -lpthread \ + -lrt -o iozone + $(CC) -O3 -Dlinux fileop_linux.o -o fileop +@@ -176,7 +176,7 @@ + # + # GNU 'C' compiler Linux build for powerpc chip with threads, largefiles, async I/O + # +-linux-powerpc: iozone_linux-powerpc.o libbif.o libasync.o fileop_linux-ppc.o pit_server.o ++linux-powerpc: iozone_linux-powerpc.o fileop_linux-ppc.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux-powerpc.o libasync.o \ + libbif.o -lpthread -lrt -o iozone + $(CC) -O3 -Dlinux fileop_linux-ppc.o -o fileop +@@ -184,7 +184,7 @@ + # + # GNU 'C' compiler Linux build for sparc chip with threads, largefiles, async I/O + # +-linux-sparc: iozone_linux-sparc.o libbif.o libasync.o fileop_linux.o pit_server.o ++linux-sparc: iozone_linux-sparc.o fileop_linux.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux-sparc.o libasync.o libbif.o \ + -lpthread -lrt -o iozone + $(CC) -O3 -Dlinux fileop_linux.o -o fileop +@@ -193,7 +193,7 @@ + # + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # +-linux-ia64: iozone_linux-ia64.o libbif.o libasync.o fileop_linux-ia64.o pit_server.o ++linux-ia64: iozone_linux-ia64.o fileop_linux-ia64.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux-ia64.o libbif.o libasync.o \ + -lrt -lpthread -o iozone + $(CC) -O3 -Dlinux fileop_linux-ia64.o -o fileop +@@ -202,7 +202,7 @@ + # + # GNU 'C' compiler Linux build for powerpc chip with threads, largefiles, async I/O + # +-linux-powerpc64: iozone_linux-powerpc64.o libbif.o libasync.o fileop_linux-ppc64.o pit_server-linux-powerpc64.o ++linux-powerpc64: iozone_linux-powerpc64.o fileop_linux-ppc64.o pit_server-linux-powerpc64.o + $(CC) -O3 -Dunix -DHAVE_ANSIC_C -DSHARED_MEM -DASYNC_IO \ + -D_LARGEFILE64_SOURCE -Dlinux \ + iozone_linux-powerpc64.o libasync.o libbif.o -lpthread \ +@@ -213,7 +213,7 @@ + # + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # +-linux-arm: iozone_linux-arm.o libbif.o libasync.o fileop_linux-arm.o pit_server.o ++linux-arm: iozone_linux-arm.o fileop_linux-arm.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux-arm.o libbif.o libasync.o \ + -lrt -lpthread -o iozone + $(CC) -O3 -Dlinux fileop_linux-arm.o -o fileop +@@ -222,7 +222,7 @@ + # + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # +-linux-AMD64: iozone_linux-AMD64.o libbif.o libasync.o fileop_linux-AMD64.o pit_server.o ++linux-AMD64: iozone_linux-AMD64.o fileop_linux-AMD64.o pit_server.o + $(CC) -O3 $(LDFLAGS) iozone_linux-AMD64.o libbif.o libasync.o \ + -lrt -lpthread -o iozone + $(CC) -O3 -Dlinux fileop_linux-AMD64.o -o fileop +@@ -231,7 +231,7 @@ + # + # GNU 'C' compiler Linux build with S/390, threads, largfiles, async I/O + # +-linux-S390: iozone_linux-s390.o libbif.o libasync.o fileop_linux-s390.o pit_server.o ++linux-S390: iozone_linux-s390.o fileop_linux-s390.o pit_server.o + $(CC) -O2 $(LDFLAGS) -lpthread -lrt iozone_linux-s390.o \ + libbif.o libasync.o -o iozone + $(CC) -O3 -Dlinux fileop_linux-s390.o -o fileop +@@ -240,7 +240,7 @@ + # + # GNU 'C' compiler Linux build with S/390, threads, largfiles, async I/O + # +-linux-S390X: iozone_linux-s390x.o libbif.o libasync.o fileop_linux-s390x.o pit_server.o ++linux-S390X: iozone_linux-s390x.o fileop_linux-s390x.o pit_server.o + $(CC) -O2 $(LDFLAGS) -lpthread -lrt iozone_linux-s390x.o \ + libbif.o libasync.o -o iozone + $(CC) -O3 -Dlinux fileop_linux-s390x.o -o fileop diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_484.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_484.bb new file mode 100644 index 00000000..f218b87e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_484.bb @@ -0,0 +1,119 @@ +SUMMARY = "Filesystem and Disk Benchmarking Tool" +HOMEPAGE = "http://www.iozone.org/" +AUTHOR = "Don Capps , William D. Norcott " +SECTION = "console/tests" +LICENSE = "iozone3" +LIC_FILES_CHKSUM = "file://iozone.c;beginline=37;endline=48;md5=7331260091868dcad0f9edea735b5f4b \ + file://iozone.c;beginline=269;endline=275;md5=77f9ee51e45b57a7e7519c4fa0b4f00b \ +" +SRC_URI = "http://www.iozone.org/src/current/${BPN}_${PV}.tar \ + file://parallelism.patch \ + file://copyright.txt \ +" +SRC_URI[md5sum] = "aa6b88ab83793cb6809ca06949a6ab01" +SRC_URI[sha256sum] = "e816e6ae2f02003f2a6d19d47fcd9a50fdd8078da4f35fe3d4b9caf91c3d7216" + +UPSTREAM_CHECK_REGEX = "iozone3_(?P\d+).tar" + +S = "${WORKDIR}/${BPN}_${PV}/src/current/" + +# +# All other arches can use the default OEMAKE except those +# explicitly listed below. Another, the iozone3 Makefile +# needs to be told about the cross-compiler explicitly here. +# +EXTRA_OEMAKE_powerpc = "linux-powerpc CC='${CC}' GCC='${CC}'" +EXTRA_OEMAKE_powerpc64 = "linux-powerpc64 CC='${CC}' GCC='${CC}'" +EXTRA_OEMAKE_x86-64 = "linux-AMD64 CC='${CC}' GCC='${CC}'" +EXTRA_OEMAKE_arm = "linux-arm CC='${CC}' GCC='${CC}'" +EXTRA_OEMAKE = "linux CC='${CC}' GCC='${CC}'" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install() { + install -d ${D}${bindir} \ + ${D}${mandir}/man1 \ + ${D}${datadir}/doc/${BPN}/examples + + install -m 0755 ${S}/iozone ${D}${bindir} + install -m 0755 ${S}/fileop ${D}${bindir} + install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/iozone.1 ${D}${mandir}/man1/ + install -m 0644 ${WORKDIR}/copyright.txt ${D}${datadir}/doc/${BPN}/ + + install -m 0644 ${S}/*.dem ${D}${datadir}/doc/${BPN}/examples + install -m 0644 ${S}/client_list ${D}${datadir}/doc/${BPN}/examples + install -m 0644 ${S}/Gnuplot.txt ${D}${datadir}/doc/${BPN}/examples + + install -m 0755 ${S}/Generate_Graphs ${D}${datadir}/doc/${BPN}/examples + install -m 0755 ${S}/gengnuplot.sh ${D}${datadir}/doc/${BPN}/examples + install -m 0755 ${S}/report.pl ${D}${datadir}/doc/${BPN}/examples + + install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/Iozone_ps.gz ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/IOzone_msword_98.pdf ${D}${datadir}/doc/${BPN}/ + install -m 0644 ${WORKDIR}/${BPN}_${PV}/docs/Run_rules.doc ${D}${datadir}/doc/${BPN}/ +} + +FILES_${PN} += "${datadir}/doc/${PN}/copyright.txt" + +# LICENSE: +# +# Copyright 1991, 1992, 1994, 1998, 1999, 2002 William D. Norcott +# +# License to freely use and distribute this software is hereby granted +# by the author, subject to the condition that this copyright notice +# remains intact. The author retains the exclusive right to publish +# derivative works based on this work, including, but not limited to +# revised versions of this work. +# + +# +# Below is author reply to question about distributing iozone3 in +# OpenEmbedded: +# +# ======================================================================== +# +# Marcin, +# +# Re-distribution is permitted as long as the copyright is +# maintained and the source code is not changed. I do not +# see a problem with your mods to enable fileop for Linux-arm, +# as these mods have been returned to the Iozone folks, +# and they have been accepted for inclusion in the next +# release :-) +# +# Thank you for your contribution, +# Don Capps +# +# ----- Original Message ----- +# From: "Marcin Juszkiewicz" +# To: "Don Capps" ; "William D. Norcott" +# +# Sent: Sunday, October 29, 2006 4:55 PM +# Subject: iozone3 263 patch for arm and License question +# +# +# > Morning +# > +# > I want to include iozone3 in OpenEmbedded [1] metadata to give it for +# > other developers. Currently OE is used to build few distributions for +# > misc platforms: ARM, SH3, SH4, x86, PowerPC and different types of +# > machines (PDA, settopbox, devboards, desktops, thin clients, routers). +# > +# > According to your distribution of derivations is forbidden. Packaging +# > iozone3 in OpenEmbedded will not involve any source code changes. But +# > when I was building it for ARM I discovered that fileop binary was not +# > built - so I created patch for it (attached). Not yet tested it on target +# > device. +# > +# > Thus, I seek your written permission via e-mail to distribute a package of +# > the unmodified source code and also a package of the pre-compiled binary. +# > Your copyright statement will be included in the package. +# > +# > +# > 1. http://www.openembedded.org/ +# > +# > Regards +# > -- +# > JID: hrw-jabber.org +# > OpenEmbedded developer/consultant + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb new file mode 100644 index 00000000..1322d078 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics" +HOMEPAGE = "https://sourceforge.net/projects/iperf2/" +SECTION = "console/network" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e136a7b2560d80bcbf0d9b3e1356ecff" + +SRC_URI = " ${SOURCEFORGE_MIRROR}/iperf2/iperf-${PV}.tar.gz" + +SRC_URI[md5sum] = "097cf0754bc1afa165975c06a91e6906" +SRC_URI[sha256sum] = "7fe4348dcca313b74e0aa9c34a8ccd713b84a5615b8578f4aa94cedce9891ef2" + +S = "${WORKDIR}/iperf-${PV}" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--exec-prefix=${STAGING_DIR_HOST}${layout_exec_prefix}" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch new file mode 100644 index 00000000..06eb41ac --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch @@ -0,0 +1,31 @@ +From 6db0e28f906bc3784019dfb5bb011237a8034fda Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 14 Jul 2017 13:00:16 -0700 +Subject: [PATCH 2/2] Remove -pg from profile_CFLAGS + +musl fails to link with missing gcrt1.o + +Signed-off-by: Khem Raj +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 23b0c72..6268145 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -49,9 +49,9 @@ iperf3_LDFLAGS = -g + iperf3_profile_SOURCES = main.c \ + $(libiperf_la_SOURCES) + +-iperf3_profile_CFLAGS = -pg -g ++iperf3_profile_CFLAGS = -g + iperf3_profile_LDADD = libiperf.la +-iperf3_profile_LDFLAGS = -pg -g ++iperf3_profile_LDFLAGS = -g + + # Specify the sources and various flags for the test cases + t_timer_SOURCES = t_timer.c +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/automake-foreign.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/automake-foreign.patch new file mode 100644 index 00000000..06c394e5 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/automake-foreign.patch @@ -0,0 +1,17 @@ +Pass the 'foreign' option to automake to enable iperf3 to build. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Chunrong Guo + +--- a/configure.ac 2015-10-19 02:49:30.471867352 -0500 ++++ b/configure.ac 2015-10-19 02:46:36.207873572 -0500 +@@ -33,7 +33,7 @@ + + + # Initialize the automake system +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign]) + AM_MAINTAINER_MODE + AM_CONFIG_HEADER(src/iperf_config.h) + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.6.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.6.bb new file mode 100644 index 00000000..4e11d823 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.6.bb @@ -0,0 +1,33 @@ +SUMMARY = "Network benchmark tool" +DESCRIPTION = "\ +iperf is a tool for active measurements of the maximum achievable bandwidth \ +on IP networks. It supports tuning of various parameters related to timing, \ +protocols, and buffers. For each test it reports the bandwidth, loss, and \ +other parameters." +HOMEPAGE = "http://software.es.net/iperf/" +SECTION = "console/network" +BUGTRACKER = "https://github.com/esnet/iperf/issues" +AUTHOR = "ESNET , Lawrence Berkeley National Laboratory " +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a9a036136b748453e839c0eb8906ef2e" + +DEPENDS = "openssl" + +SRC_URI = "git://github.com/esnet/iperf.git \ + file://automake-foreign.patch \ + file://0002-Remove-pg-from-profile_CFLAGS.patch \ + " + +SRCREV = "88f3ad87f38762081a6d7127890ff5c3a052b06a" + +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" + +CFLAGS += "-D_GNU_SOURCE" + +EXTRA_OECONF = "--with-openssl=${RECIPE_SYSROOT}${prefix}" + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb new file mode 100644 index 00000000..f534c73b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb @@ -0,0 +1,17 @@ +SUMMARY = "Tests to compare standard functions of different libc implementations" +DESCRIPTION = "libc-bench is a set of time- and memory-efficiency tests to compare \ +implementations of various C/POSIX standard library functions." +HOMEPAGE = "http://www.etalabs.net/libc-bench.html" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://Makefile;md5=e12f113da27dfe9cfb6c2c537da8d8df" + +SRC_URI = "http://www.etalabs.net/releases/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "f763de90f95fe68e4e03e5b6f49698ac" +SRC_URI[sha256sum] = "6825260aa5f15f4fbc7957ec578e9c859cbbe210e025ec74c4a0d05677523794" + +do_install () { + install -d ${D}${bindir} + install -m 0755 ${B}/libc-bench ${D}${bindir} +} diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch new file mode 100644 index 00000000..a84414c0 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch @@ -0,0 +1,23 @@ +From 351d1de09dd80049b7a2cb02c5750635d0389873 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:25:57 -0700 +Subject: [PATCH] include stddef.h for ptrdiff_t + +Signed-off-by: Khem Raj + +--- + morecore.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/morecore.c b/morecore.c +index 6563bbd..0eef782 100644 +--- a/morecore.c ++++ b/morecore.c +@@ -19,6 +19,7 @@ + + #define _GNU_SOURCE + ++#include + #include + #include + #include diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch new file mode 100644 index 00000000..53f35abb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch @@ -0,0 +1,41 @@ +From 0077532b07e268347cb8557be6d70148d5f0e840 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Wed, 21 Aug 2013 15:44:57 +0800 +Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm + +Hard coded path makes the script impossible to run out of source tree. +After 'make install', we can use hugeadm utility under DESTDIR. + +Upstream-Status: Submitted + +Signed-off-by: Ting Liu + +--- + tests/run_tests.py | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/tests/run_tests.py b/tests/run_tests.py +index 3c95a03..560df6b 100755 +--- a/tests/run_tests.py ++++ b/tests/run_tests.py +@@ -234,9 +234,19 @@ def get_pagesizes(): + Use libhugetlbfs' hugeadm utility to get a list of page sizes that have + active mount points and at least one huge page allocated to the pool. + """ ++ local_env = os.environ.copy() ++ local_env["PATH"] = "../obj:%s" % local_env.get("PATH", "") + sizes = set() + out = "" +- (rc, out) = bash("../obj/hugeadm --page-sizes") ++ try: ++ p = subprocess.Popen("hugeadm --page-sizes", shell=True, env=local_env, stdout=subprocess.PIPE) ++ rc = p.wait() ++ except KeyboardInterrupt: ++ return sizes ++ except OSError: ++ return sizes ++ out = p.stdout.read().strip() ++ + if rc != 0 or out == "": return sizes + + for size in out.split("\n"): sizes.add(int(size)) diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch new file mode 100644 index 00000000..8cb184a6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch @@ -0,0 +1,37 @@ +From 0f548286848c70aa325c6748d80e8651389b4938 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:32:59 -0700 +Subject: [PATCH] Mark glibc specific code so + +Signed-off-by: Khem Raj + +--- + morecore.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/morecore.c b/morecore.c +index 0eef782..d48509c 100644 +--- a/morecore.c ++++ b/morecore.c +@@ -364,6 +364,7 @@ void hugetlbfs_setup_morecore(void) + + INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr); + ++#ifdef __GLIBC__ + heaptop = heapbase = (void *)heapaddr; + if (__hugetlb_opts.thp_morecore) + __morecore = &thp_morecore; +@@ -371,7 +372,6 @@ void hugetlbfs_setup_morecore(void) + __morecore = &hugetlbfs_morecore; + + /* Set some allocator options more appropriate for hugepages */ +- + if (__hugetlb_opts.shrink_ok) + mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2); + else +@@ -381,4 +381,5 @@ void hugetlbfs_setup_morecore(void) + * This doesn't appear to prohibit malloc() from falling back + * to mmap() if we run out of hugepages. */ + mallopt(M_MMAP_MAX, 0); ++#endif + } diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch new file mode 100644 index 00000000..aca7e803 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch @@ -0,0 +1,46 @@ +From 9ff04d7acc700387e3837f8ab11a41efea5ee8b0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:44:26 -0700 +Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux + +musl does not have it + +Signed-off-by: Khem Raj + +--- + alloc.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/alloc.c b/alloc.c +index bce9464..cf7eb40 100644 +--- a/alloc.c ++++ b/alloc.c +@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr) + __free_huge_pages(ptr, 1); + } + ++static size_t get_cacheline_size() { ++#if defined(__linux__) ++ FILE * fp = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r"); ++ unsigned int line_size = 0; ++ if (fp) { ++ fscanf(fp, "%d", &line_size); ++ fclose(fp); ++ } ++ return line_size; ++#else ++ return sysconf(_SC_LEVEL2_CACHE_LINESIZE); ++#endif ++} + /* + * Offset the buffer using bytes wasted due to alignment to avoid using the + * same cache lines for the start of every buffer returned by +@@ -261,7 +274,7 @@ void *cachecolor(void *buf, size_t len, size_t color_bytes) + + /* Lookup our cacheline size once */ + if (cacheline_size == 0) { +- cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE); ++ cacheline_size = get_cacheline_size(); + linemod = time(NULL); + } + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch new file mode 100644 index 00000000..58776e87 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch @@ -0,0 +1,28 @@ +From 9ce323432a7f4d99f617970c7e35b607b9bbf843 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:48:04 -0700 +Subject: [PATCH] shm.c: Mark glibc specific changes so + +Signed-off-by: Khem Raj + +--- + shm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/shm.c b/shm.c +index 1f82cab..9447b63 100644 +--- a/shm.c ++++ b/shm.c +@@ -48,10 +48,11 @@ + * system shmget() may be performed without worry as there is no dynamic + * call chain. + */ ++#ifdef __GLIBC__ + extern void *dlsym (void *__restrict __handle, __const char *__restrict __name) + __attribute__((weak)) __THROW __nonnull ((2)); + extern char *dlerror (void) __attribute__((weak)) __THROW; +- ++#endif + + /* call syscall shmget through the generic syscall mechanism */ + static int syscall_shmget(key_t key, size_t size, int shmflg) diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch new file mode 100644 index 00000000..08174200 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch @@ -0,0 +1,26 @@ +From bb8c370aaaf25b1fe1fbf984e73177018026cb91 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:51:02 -0700 +Subject: [PATCH] Include dirent.h for ino_t + +Fixes +error: unknown type name 'ino_t'; did you mean 'int'? + +Signed-off-by: Khem Raj + +--- + tests/hugetests.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/hugetests.h b/tests/hugetests.h +index 8b1d8d9..056042c 100644 +--- a/tests/hugetests.h ++++ b/tests/hugetests.h +@@ -22,6 +22,7 @@ + + #include + #include ++#include + + #include "libhugetlbfs_privutils.h" + #include "libhugetlbfs_testprobes.h" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..2ead21fb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,40 @@ +From 5f64aa8c47c2d3a155a97e262f89cc47394a69eb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Jun 2018 19:58:53 -0700 +Subject: [PATCH] include limits.h for PATH_MAX + +Fixes + +error: 'PATH_MAX' undeclared + +Signed-off-by: Khem Raj + +--- + hugeadm.c | 1 + + tests/gethugepagesizes.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/hugeadm.c b/hugeadm.c +index fe4211d..8db274c 100644 +--- a/hugeadm.c ++++ b/hugeadm.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c +index 9551b38..2645e3f 100644 +--- a/tests/gethugepagesizes.c ++++ b/tests/gethugepagesizes.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include "hugetests.h" + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch new file mode 100644 index 00000000..f95e9e85 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch @@ -0,0 +1,97 @@ +From 82a4f60ab24dff121f5f9d3bbcd9a8a28bb7caef Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Sun, 8 Sep 2013 23:21:49 -0500 +Subject: [PATCH] libhugetlbfs: avoid search host library path for cross + compilation + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Chunrong Guo + +--- + ldscripts/elf32ppclinux.xB | 2 +- + ldscripts/elf32ppclinux.xBDT | 2 +- + ldscripts/elf64ppc.xB | 2 +- + ldscripts/elf64ppc.xBDT | 2 +- + ldscripts/elf_x86_64.xB | 2 +- + ldscripts/elf_x86_64.xBDT | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB +index 28ad88d..33d482d 100644 +--- a/ldscripts/elf32ppclinux.xB ++++ b/ldscripts/elf32ppclinux.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", + "elf32-powerpc") + OUTPUT_ARCH(powerpc:common) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT +index 497882b..823475e 100644 +--- a/ldscripts/elf32ppclinux.xBDT ++++ b/ldscripts/elf32ppclinux.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", + "elf32-powerpc") + OUTPUT_ARCH(powerpc:common) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf64ppc.xB b/ldscripts/elf64ppc.xB +index 1a9c1ab..8cc557d 100644 +--- a/ldscripts/elf64ppc.xB ++++ b/ldscripts/elf64ppc.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", + "elf64-powerpc") + OUTPUT_ARCH(powerpc:common64) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + PHDRS + { +diff --git a/ldscripts/elf64ppc.xBDT b/ldscripts/elf64ppc.xBDT +index 5477294..53e0749 100644 +--- a/ldscripts/elf64ppc.xBDT ++++ b/ldscripts/elf64ppc.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", + "elf64-powerpc") + OUTPUT_ARCH(powerpc:common64) + ENTRY(_start) +-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT( -lhugetlbfs ); + PHDRS + { +diff --git a/ldscripts/elf_x86_64.xB b/ldscripts/elf_x86_64.xB +index ed21a2c..ba50e9f 100644 +--- a/ldscripts/elf_x86_64.xB ++++ b/ldscripts/elf_x86_64.xB +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", + "elf64-x86-64") + OUTPUT_ARCH(i386:x86-64) + ENTRY(_start) +-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +diff --git a/ldscripts/elf_x86_64.xBDT b/ldscripts/elf_x86_64.xBDT +index 1855202..c62d245 100644 +--- a/ldscripts/elf_x86_64.xBDT ++++ b/ldscripts/elf_x86_64.xBDT +@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", + "elf64-x86-64") + OUTPUT_ARCH(i386:x86-64) + ENTRY(_start) +-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); ++/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch new file mode 100644 index 00000000..7cc180a4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch @@ -0,0 +1,39 @@ +From b5887693d90c430291b644c2f5713b5fdd1777ce Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Tue, 4 Nov 2014 00:49:11 -0800 +Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for + cross compilation + +Upstream-Status: Inappropriate [cross compile specific] + +Signed-off-by: Jackie Huang + +--- + ldscripts/elf_i386.xB | 1 - + ldscripts/elf_i386.xBDT | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB +index 43fe51c..eae0fa8 100644 +--- a/ldscripts/elf_i386.xB ++++ b/ldscripts/elf_i386.xB +@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", + "elf32-i386") + OUTPUT_ARCH(i386) + ENTRY(_start) +-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ +diff --git a/ldscripts/elf_i386.xBDT b/ldscripts/elf_i386.xBDT +index d72aebe..3bac1b1 100644 +--- a/ldscripts/elf_i386.xBDT ++++ b/ldscripts/elf_i386.xBDT +@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", + "elf32-i386") + OUTPUT_ARCH(i386) + ENTRY(_start) +-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); + INPUT(-lhugetlbfs); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch new file mode 100644 index 00000000..a13c5389 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch @@ -0,0 +1,24 @@ +From 183a4dafe141197de5840f2e48c266ef209307aa Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Mon, 18 Jun 2012 16:37:05 +0800 +Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Ting Liu + +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 51e41f0..373df3c 100644 +--- a/Makefile ++++ b/Makefile +@@ -177,7 +177,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32)) + REALLIB64 = $(realpath $(PREFIX)/$(LIB64)) + ifneq ($(realpath $(PREFIX)),) + ifeq ($(REALLIB32),$(REALLIB64)) +-$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64) + endif + endif + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch new file mode 100644 index 00000000..b8b2f8e6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch @@ -0,0 +1,28 @@ +From f1ad8ff887f16daee8d06eca3df0f2541bfdaac0 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Mon, 23 Sep 2013 08:00:55 +0000 +Subject: [PATCH] libhugetlbfs: add recipe + +Upstream-Status: Submitted + +TESTS_64 is empty, install will fail due to missing file operand + +Signed-off-by: Ting Liu + +--- + tests/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile b/tests/Makefile +index 073df96..0ca3716 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -295,7 +295,7 @@ obj64/install: + $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 +- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 ++ $(INSTALL) -m 755 $(TESTS_64_STATIC:%=obj64/%_static) $(DESTDIR)$(INST_TESTSDIR64)/obj64 + $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64) + + install: $(OBJDIRS:%=%/install) diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb new file mode 100644 index 00000000..66fd8e21 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb @@ -0,0 +1,72 @@ +SUMMARY = "A library which provides easy access to huge pages of memory" +HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = "sysfsutils" +RDEPENDS_${PN} += "bash python python-io python-lang python-subprocess python-resource" +RDEPENDS_${PN}-tests += "bash" + +PV = "2.21" +PE = "1" + +SRCREV = "73d06e69108f231696e9c5c44f4b42690fc5d752" +SRC_URI = " \ + git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \ + file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \ + file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \ + file://tests-Makefile-install-static-4G-edge-testcases.patch \ + file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ + file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \ + file://0001-include-stddef.h-for-ptrdiff_t.patch \ + file://0002-Mark-glibc-specific-code-so.patch \ + file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \ + file://0004-shm.c-Mark-glibc-specific-changes-so.patch \ + file://0005-Include-dirent.h-for-ino_t.patch \ + file://0006-include-limits.h-for-PATH_MAX.patch \ +" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" + +LIBARGS = "LIB32=${baselib} LIB64=${baselib}" +LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" +LIBHUGETLBFS_ARCH_powerpc = "ppc" +LIBHUGETLBFS_ARCH_powerpc64 = "ppc64" +EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" +PARALLEL_MAKE = "" +CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" + +export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" + +TARGET_CC_ARCH += "${LDFLAGS}" + +#The CUSTOM_LDSCRIPTS doesn't work with the gold linker +inherit cpan-base +do_configure() { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then + sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile + fi +} + +do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} \ + INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \ + INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \ + install-tests +} + + +PACKAGES =+ "${PN}-tests " +FILES_${PN} += "${libdir}/*.so" +FILES_${PN}-dev = "${includedir}" +FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" +FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests" + +INSANE_SKIP_${PN} = "dev-so" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb new file mode 100644 index 00000000..aed95cda --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "LINPACK Benchmarks are a measure of a system's floating point computing power" +SUMMARY = "LINPACK is a software library for performing numerical linear algebra on digital computers" + +LICENSE = "PD" +LIC_FILES_CHKSUM ="file://${WORKDIR}/linpacknew.c;beginline=1;endline=23;md5=aa025e3bc44190c71e4c5e3b084fed87" + +SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpacknew.c" +SRC_URI[md5sum] = "1c5d0b6a31264685d2e651c920e3cdf4" +SRC_URI[sha256sum] = "a63f2ec86512959f1fd926bfafb85905b2d7b7402942ffae3af374d48745e97e" + +S = "${WORKDIR}" + +do_compile () { + ${CC} ${CFLAGS} ${LDFLAGS} -o linpack linpacknew.c -lm +} + +do_install () { + install -Dm 0755 linpack ${D}${bindir}/linpack +} + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch new file mode 100644 index 00000000..d7169495 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch @@ -0,0 +1,27 @@ +From ac1657e11cbb0545bdf4d1124def8c013958ed7e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Jul 2017 18:08:51 -0700 +Subject: [PATCH] Check for musl define guard before redefining socklen_t + +musl uses __DEFINED_socklen_t so check for that as well +along with HAVE_socklen_t + +Signed-off-by: Khem Raj + +--- + src/bench.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bench.h b/src/bench.h +index 597d068..2ebdf5a 100644 +--- a/src/bench.h ++++ b/src/bench.h +@@ -77,7 +77,7 @@ typedef long long int64; + #endif /* HAVE_int64_t */ + #endif /* HAVE_int64 */ + +-#ifndef HAVE_socklen_t ++#if !defined(HAVE_socklen_t) && !defined(__DEFINED_socklen_t) + typedef int socklen_t; + #endif + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch new file mode 100644 index 00000000..943b3ec8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch @@ -0,0 +1,24 @@ +From 7c05fa5353ad91acae6e5e8a01f65d54935ef778 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 14:39:10 -0700 +Subject: [PATCH] lat_http.c: Add printf format + +Signed-off-by: Khem Raj + +--- + src/lat_http.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lat_http.c b/src/lat_http.c +index c630d59..28d04f7 100644 +--- a/src/lat_http.c ++++ b/src/lat_http.c +@@ -27,7 +27,7 @@ http(char *server, char *file, int prog) + sock = tcp_connect(server, prog, SOCKOPT_REUSE); + sprintf(buf, "GET /%s HTTP/1.0\r\n\r\n\n", file); + if (debug) { +- printf(buf); ++ printf("%s", buf); + } + write(sock, buf, strlen(buf)); + while ((n = read(sock, buf, XFERSIZE)) > 0) { diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch new file mode 100644 index 00000000..04cef960 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch @@ -0,0 +1,34 @@ +From ea683a0dbaa30a0bf101adb09a1a2531c7112c62 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Mon, 27 Aug 2018 11:02:45 +0800 +Subject: [PATCH] src/Makefile: use libdir instead of hardcoded /lib + +use libdir instead of hardcoded /lib + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mingli Yu +--- + src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 4678d54..b73ddb6 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -141,10 +141,10 @@ install-target: + if [ ! -d $(BASE) ]; then mkdir $(BASE); fi + if [ ! -d $(BASE)/bin ]; then mkdir $(BASE)/bin; fi + if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi +- if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi ++ if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir $(DESTDIR)$(libdir); fi + cp $(EXES) $(BASE)/bin + cp $(INCS) $(BASE)/include +- cp $O/lmbench.a $(BASE)/lib/libmbench.a ++ cp $O/lmbench.a $(DESTDIR)$(libdir)/libmbench.a + cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install + + +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch new file mode 100644 index 00000000..353d80b3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch @@ -0,0 +1,73 @@ +From b27c253bfb78fa3c5f416e6caee101098a4b58cc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Jul 2017 18:09:46 -0700 +Subject: [PATCH] build: Adjust CFLAGS/LDFLAGS to append values passed from env + +For musl we have to pass additional arguments via cflags and ldflags +to link in librirpc, make room for those changes to take effect + +Signed-off-by: Khem Raj + +--- + scripts/build | 2 +- + src/Makefile | 14 +++++++------- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/scripts/build b/scripts/build +index 34a1371..3786741 100755 +--- a/scripts/build ++++ b/scripts/build +@@ -18,7 +18,7 @@ done + + trap 'rm -f ${BASE}$$.s ${BASE}$$.c ${BASE}$$.o ${BASE}$$; exit 1' 1 2 15 + +-LDLIBS=-lm ++LDLIBS+=-lm + + # check for HP-UX's ANSI compiler + echo "main(int ac, char *av[]) { int i; }" > ${BASE}$$.c +diff --git a/src/Makefile b/src/Makefile +index d9efd54..96467d7 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -112,8 +112,8 @@ LIBOBJS= $O/lib_tcp.o $O/lib_udp.o $O/lib_unix.o $O/lib_timing.o \ + $O/lib_sched.o + + lmbench: $(UTILS) +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build all +- -@env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="k$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build opt ++ @env CFLAGS+=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build all ++ -@env CFLAGS+=-O MAKE="$(MAKE)" MAKEFLAGS="k$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build opt + + results: lmbench + @env OS="${OS}" ../scripts/config-run +@@ -137,7 +137,7 @@ os: lmbench + @env OS="${OS}" BENCHMARK_HARDWARE=NO BENCHMARK_OS=YES ../scripts/results + + install: lmbench +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build install-target ++ @env CFLAGS+=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build install-target + + install-target: + if [ ! -d $(BASE) ]; then mkdir $(BASE); fi +@@ -155,16 +155,16 @@ all: $(EXES) $O/lmbench + opt: $(OPT_EXES) + asm: $(ASMS) + $(ASMS): +- $(CC) -S $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ `basename $@ .s`.c ++ $(CC) -S $(CFLAGS) $(CPPFLAGS) -o $@ `basename $@ .s`.c $(LDFLAGS) + + Wall: +- @env CFLAGS="-g -O -Wall" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt ++ @env CFLAGS+="-g -O -Wall" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt + + debug: +- @env CFLAGS="-g -O -DDEBUG" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt ++ @env CFLAGS+="-g -O -DDEBUG" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt + + assembler: +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build asm ++ @env CFLAGS+=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build asm + + + tag: diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch new file mode 100644 index 00000000..cbab5c42 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch @@ -0,0 +1,215 @@ +From 65180976c9963432d166b47a0b692260a69c0d47 Mon Sep 17 00:00:00 2001 +From: Qingming Su +Date: Tue, 19 Aug 2014 05:16:17 -0400 +Subject: [PATCH] lmbench: Can't proceed on some targets + +lmbench can't proceed on some targets. The memory check fails because the +memory latency of each page is longer then 10us, which is a time limit set +in the original memsize.c. + +The memory latency is very different on different targets due to the +hardware and current system load. The targets with slower memory +chips or heavy system load need much longer time to read or write +the memory. + +This fix changes the fixed time limit of 10us to a specific value calculated +from the runtime target. + +Also set an upper limit of memory size used for lmbench testing. The memory +check sometimes fails if the target has a large amount of memory, for +example more than 4G. + +Signed-off-by: Qingming Su +Signed-off-by: Fupan Li + +Add and reword above comments + +Upstream-status: inappropriate [ configuration ] + +Signed-off-by: Mark Hatle + +--- + scripts/config-run | 12 +++++++--- + src/Makefile | 4 ++-- + src/memsize.c | 66 +++++++++++++++++++++++++++++++++++------------------- + 3 files changed, 54 insertions(+), 28 deletions(-) + +diff --git a/scripts/config-run b/scripts/config-run +index 918cbdf..096ed12 100755 +--- a/scripts/config-run ++++ b/scripts/config-run +@@ -197,6 +197,12 @@ The bigger the range, the more accurate the results, but larger sizes + take somewhat longer to run the benchmark. + + EOF ++ ++# By default, use 512M memory as the upper limit for lmbench test ++if [ $MB -gt 512 ];then ++MB=512 ++fi ++ + echo $ECHON "MB [default $MB]: $ECHOC" + read TMP + if [ X$TMP != X ] +@@ -687,10 +693,10 @@ case $MAIL in + ;; + esac + +-INFO=`../scripts/info` ++INFO=`../scripts/hostinfo` + if [ $MAIL = yes ] + then if [ ! -f $INFO ] +- then cp ../scripts/info-template $INFO ++ then cp ../scripts/hostinfo-template $INFO + chmod +w $INFO + REUSE=no + else +@@ -733,7 +739,7 @@ EOF + then EDITOR=$TMP + fi + if [ X$EDITOR != "none" ] +- then $EDITOR `../scripts/info` ++ then $EDITOR `../scripts/hostinfo` + fi + fi + fi +diff --git a/src/Makefile b/src/Makefile +index c7e4e3c..d9efd54 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -50,7 +50,7 @@ TARGET=`../scripts/target` + BINDIR=../bin/$(OS) + CONFIG=../bin/$(OS)/`../scripts/config` + UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \ +- ../scripts/info ../scripts/info-template ../scripts/version \ ++ ../scripts/hostinfo ../scripts/hostinfo-template ../scripts/version \ + ../scripts/config ../scripts/config-run ../scripts/results \ + ../scripts/lmbench ../scripts/make ../scripts/build + INSTALL=cp +@@ -240,7 +240,7 @@ $O/getopt.o : getopt.c $(INCS) + $(COMPILE) -c getopt.c -o $O/getopt.o + + $(UTILS) : +- -cd ../scripts; make get ++ -cd ../scripts; cp info hostinfo; cp info-template hostinfo-template + + # Do not remove the next line, $(MAKE) depend needs it + # MAKEDEPEND follows +diff --git a/src/memsize.c b/src/memsize.c +index eb25a09..82d7faf 100644 +--- a/src/memsize.c ++++ b/src/memsize.c +@@ -14,9 +14,12 @@ char *id = "$Id$\n"; + + #define CHK(x) if ((x) == -1) { perror("x"); exit(1); } + +-#ifndef TOO_LONG +-#define TOO_LONG 10 /* usecs */ +-#endif ++//#ifndef TOO_LONG ++//#define TOO_LONG 10 /* usecs */ ++//#endif ++ ++#define MEMORY_SIZE_1MB (1024 * 1024) ++#define MEMORY_SIZE_8MB (8 * 1024 * 1024) + + int alarm_triggered = 0; + +@@ -35,10 +38,10 @@ main(int ac, char **av) + size_t delta; + + if (ac == 2) { +- max = size = bytes(av[1]) * 1024 * 1024; ++ max = size = bytes(av[1]) * MEMORY_SIZE_1MB; + } +- if (max < 1024 * 1024) { +- max = size = 1024 * 1024 * 1024; ++ if (max < MEMORY_SIZE_1MB) { ++ max = size = 1024 * MEMORY_SIZE_1MB; + } + /* + * Binary search down and then binary search up +@@ -48,7 +51,7 @@ main(int ac, char **av) + } + /* delta = size / (2 * 1024 * 1024) */ + for (delta = (size >> 21); delta > 0; delta >>= 1) { +- uint64 sz = (uint64)size + (uint64)delta * 1024 * 1024; ++ uint64 sz = (uint64)size + (uint64)delta * MEMORY_SIZE_1MB; + size_t check = sz; + if (max < sz) continue; + if (check < sz || !test_malloc(sz)) break; +@@ -66,41 +69,58 @@ timeit(char *where, size_t size) + { + int sum = 0; + size_t n; +- size_t s_prev; ++ size_t s_prev = MEMORY_SIZE_8MB; + size_t range; +- size_t incr = 1024 * 1024; ++ size_t incr = MEMORY_SIZE_1MB; + size_t pagesize = getpagesize(); +- unsigned long long s; +- +- if (size < 1024*1024 - 16*1024) { +- fprintf(stderr, "Bad size\n"); +- return; +- } ++ size_t time_each_page = 0; ++ size_t too_long = 0; ++ unsigned long long s; ++ ++ if (pagesize < MEMORY_SIZE_1MB) ++ range = MEMORY_SIZE_1MB; ++ else ++ range = MEMORY_SIZE_8MB; ++ ++ incr = MEMORY_SIZE_1MB; ++ ++ if (size < range) { ++ fprintf(stderr, "Bad size\n"); ++ return; ++ } ++ ++ //Touch range of memory, get the average time (usec) of operating each memory page on this system ++ start(0); ++ touchRange(where, range, pagesize); ++ sum = stop(0, 0); ++ ++ if ((time_each_page = sum * pagesize / range) < 1) ++ time_each_page = 1; ++ //Set the uper limit of time spending on one page ++ too_long = 10 * time_each_page; + +- range = 1024 * 1024; +- incr = 1024 * 1024; +- touchRange(where, range, pagesize); + for (range += incr; range <= size; range += incr) { + n = range / pagesize; +- set_alarm(n * TOO_LONG); ++ set_alarm(n * too_long); + touchRange(where + range - incr, incr, pagesize); + clear_alarm(); +- set_alarm(n * TOO_LONG); ++ set_alarm(n * too_long); + start(0); + touchRange(where, range, pagesize); + sum = stop(0, 0); + clear_alarm(); +- if ((sum / n) > TOO_LONG || alarm_triggered) { ++ if ((sum / n) > too_long || alarm_triggered) { + size = range - incr; ++ fprintf(stderr, "Error! Memory testing timeout! Touch one page of memory needs more than %d (usecs)\n ", too_long); + break; + } +- for (s = 8 * 1024 * 1024; s <= range; s_prev = s, s *= 2) ++ for (s = s_prev; s <= range; s_prev = s, s *= 2) + if (s < s_prev) break; + incr = s / 8; + if (range < size && size < range + incr) { + incr = size - range; + } +- fprintf(stderr, "%dMB OK\r", (int)(range/(1024*1024))); ++ fprintf(stderr, "%dMB OK\r", (int)(range/MEMORY_SIZE_1MB)); + } + fprintf(stderr, "\n"); + printf("%d\n", (int)(size>>20)); diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch new file mode 100644 index 00000000..30708c81 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch @@ -0,0 +1,69 @@ +From b21ca9f3911628fb66f308c6916485bbbcfb29a4 Mon Sep 17 00:00:00 2001 +From: Lin Yu +Date: Tue, 19 Aug 2014 05:16:16 -0400 +Subject: [PATCH] lmbench: Fix "make html" graph failure + +The html-list perl script cannot parse the first line of the result +files about the lmbench version. + +Additional fixes are to make the result's html pages easier to understand. + +Signed-off-by: Lin Yu +Signed-off-by: Fupan Li + +Reworded patch description. + +Upstream-status: inappropriate [ configuration ] + +Signed-off-by: Mark Hatle + +--- + results/Makefile | 1 + + scripts/html-list | 7 ++----- + 2 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/results/Makefile b/results/Makefile +index 0935376..1ef9a15 100644 +--- a/results/Makefile ++++ b/results/Makefile +@@ -186,6 +186,7 @@ paper: + # scratch makes you want a Ghz machine. + html: dirs + -make clean ++ make ps + #$(SCRIPTS)bghtml $(BG) + $(SCRIPTS)html-list $(LIST) + $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs +diff --git a/scripts/html-list b/scripts/html-list +index 9850461..6383115 100755 +--- a/scripts/html-list ++++ b/scripts/html-list +@@ -14,7 +14,7 @@ open(H, ">HTML/specific.html"); + print H <LMBENCH System Results +

LMBENCH System Results

+-

Summary of results

++

Summary of results

+
+ EOF + +@@ -47,7 +47,7 @@ foreach $os (@os) { + open(F, $file); + $_ = ; + close(F); +- next unless /lmbench1.[01]/; ++ next unless /lmbench[0-9]+.[01]/; + chop; + $title = $_; + #s/.lmbench1.? results for //; +@@ -103,10 +103,7 @@ EOF + if $i < $#os; + print S<$title +-Information on this benchmark (Not up to date) +

\n

+- +-LMBENCH table of contents + + System results table of contents +

diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch new file mode 100644 index 00000000..fa5e6dbd --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch @@ -0,0 +1,36 @@ +From 182a5d3dba3f440bbf35551da6d21ab1c990eb58 Mon Sep 17 00:00:00 2001 +From: Noor Ahsan +Date: Mon, 29 Aug 2011 16:17:51 +0000 +Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe) + +In some cases the host may have too old of a ranlib to work. Since it's +not exactly a great idea to not be using the cross ranlib anyhow, fix the +Makefile so we can override ranlib and then override it + +Upstream-Status: Inappropriate [build system specific change] + +--- + src/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 4962815..c7a8c79 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -38,6 +38,7 @@ CC=`../scripts/compiler` + MAKE=`../scripts/make` + AR=ar + ARCREATE=cr ++RANLIB=ranlib + + # base of installation location + BASE=/usr/local +@@ -217,7 +218,7 @@ $O/lmbench : ../scripts/lmbench version.h + $O/lmbench.a: $(LIBOBJS) + /bin/rm -f $O/lmbench.a + $(AR) $(ARCREATE) $O/lmbench.a $(LIBOBJS) +- -ranlib $O/lmbench.a ++ -$(RANLIB) $O/lmbench.a + + $O/lib_timing.o : lib_timing.c $(INCS) + $(COMPILE) -c lib_timing.c -o $O/lib_timing.o diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch new file mode 100644 index 00000000..44bc7bbc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch @@ -0,0 +1,22 @@ +From aca1a59d888421c1fc553229b8049be47e8b3ddf Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Fri, 1 Mar 2013 09:50:42 +0000 +Subject: [PATCH] lmbench: update config script + +Upstream-Status: Pending + +--- + scripts/config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/config b/scripts/config +index b58cb60..25d9d77 100755 +--- a/scripts/config ++++ b/scripts/config +@@ -3,5 +3,5 @@ + UNAME=`uname -n 2>/dev/null` + if [ X$UNAME = X ] + then echo CONFIG +-else echo CONFIG.$UNAME ++else echo ../scripts/CONFIG.$UNAME + fi diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch new file mode 100644 index 00000000..31c4aecb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch @@ -0,0 +1,170 @@ +From 4955021bc283be404df62b97b86af3943efd29de Mon Sep 17 00:00:00 2001 +From: Noor Ahsan +Date: Mon, 29 Aug 2011 16:17:51 +0000 +Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe) + +Now that we have our binaries in /usr/bin rather than the normal +lmbench hierarchy we need to update the scripts as well to behave well here. + +Upstream-Status: Inappropriate [This is related to the OE-specific behavior +of installing into /usr/bin, etc, rather than dumping everything into +/usr/share/lmbench or similar] + +--- + scripts/config-run | 40 ++++++++++++++++++++-------------------- + scripts/results | 8 +++----- + 2 files changed, 23 insertions(+), 25 deletions(-) + +diff --git a/scripts/config-run b/scripts/config-run +index a2d5ba4..918cbdf 100755 +--- a/scripts/config-run ++++ b/scripts/config-run +@@ -132,20 +132,20 @@ export LMBENCH_SCHED + ############################################################################ + echo $L; echo ""; + echo "Hang on, we are calculating your timing granularity." +-../bin/$OS/msleep 250 +-ENOUGH=`../bin/$OS/enough` ++msleep 250 ++ENOUGH=`enough` + export ENOUGH + echo "OK, it looks like you can time stuff down to $ENOUGH usec resolution." + echo "" + echo "Hang on, we are calculating your timing overhead." +-../bin/$OS/msleep 250 +-TIMING_O=`../bin/$OS/timing_o` ++msleep 250 ++TIMING_O=`timing_o` + export TIMING_O + echo "OK, it looks like your gettimeofday() costs $TIMING_O usecs." + echo "" + echo "Hang on, we are calculating your loop overhead." +-../bin/$OS/msleep 250 +-LOOP_O=`../bin/$OS/loop_o` ++msleep 250 ++LOOP_O=`loop_o` + export LOOP_O + echo "OK, it looks like your benchmark loop costs $LOOP_O usecs." + echo "" +@@ -177,7 +177,7 @@ then + fi + if [ X$MB = X ] + then $ECHON "Probing system for available memory: $ECHOC" +- MB=`../bin/$OS/memsize 4096` ++ MB=`memsize 4096` + fi + TOTAL_MEM=$MB + MB=`echo \( $MB \* 7 \) / 10 | bc 2>/dev/null` +@@ -205,9 +205,9 @@ fi + # Certain machines tend to barf when you try and bcopy 8MB. + # Figure out how much we can use. + echo "Checking to see if you have $MB MB; please wait for a moment..." +-MB=`../bin/$OS/memsize $MB` +-MB=`../bin/$OS/memsize $MB` +-MB=`../bin/$OS/memsize $MB` ++MB=`memsize $MB` ++MB=`memsize $MB` ++MB=`memsize $MB` + if [ `expr $SYNC_MAX \* $MB` -gt `expr $TOTAL_MEM` ] + then + MB=`expr $TOTAL_MEM / $SYNC_MAX` +@@ -223,8 +223,8 @@ then echo Warning: you have only ${MB}MB available memory. + fi + + echo "Hang on, we are calculating your cache line size." +-../bin/$OS/msleep 250 +-LINE_SIZE=`../bin/$OS/lm_line -M ${MB}M` ++msleep 250 ++LINE_SIZE=`lm_line -M ${MB}M` + export LINE_SIZE + echo "OK, it looks like your cache line is $LINE_SIZE bytes." + echo "" +@@ -479,7 +479,7 @@ EOF + then + for i in $disks + do if [ -r $i ] +- then ../bin/$OS/flushdisk $i ++ then flushdisk $i + if [ $? -eq 1 ] + then echo "Must be root to run disk benchmarks." + echo "Root is needed to flush the buffer cache" +@@ -584,7 +584,7 @@ fi + echo $L + echo "" + echo "Calculating mhz, please wait for a moment..." +-MHZ=`../bin/$OS/mhz` ++MHZ=`mhz` + cat< $C + echo DISK_DESC=\"$DISK_DESC\" >> $C + echo OUTPUT=$OUTPUT >> $C +diff --git a/scripts/results b/scripts/results +index cd07c15..d5aa558 100755 +--- a/scripts/results ++++ b/scripts/results +@@ -8,11 +8,11 @@ RESULTS=results/$OS + BASE=../$RESULTS/`uname -n` + EXT=0 + +-if [ ! -f "../bin/$OS/$CONFIG" ] ++if [ ! -f "$CONFIG" ] + then echo "No config file?" + exit 1 + fi +-. ../bin/$OS/$CONFIG ++. $CONFIG + + if [ ! -d ../$RESULTS ] + then mkdir -p ../$RESULTS +@@ -23,11 +23,9 @@ do EXT=`expr $EXT + 1` + RESULTS=$BASE.$EXT + done + +-cd ../bin/$OS +-PATH=.:${PATH}; export PATH + export SYNC_MAX + export OUTPUT +-lmbench $CONFIG 2>../${RESULTS} ++lmbench $CONFIG 2>${RESULTS} + + if [ X$MAIL = Xyes ] + then echo Mailing results diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch new file mode 100644 index 00000000..b964bef1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch @@ -0,0 +1,80 @@ +From 25738bb9c75f94b451201acfd6bcab13bdeee512 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Thu, 5 May 2016 09:52:01 +0800 +Subject: [PATCH] [PATCH] avoid gcc optimize-away the loops + +Upstream-Status: pending + +Change expression used in do_integer_mul and do_uint64_mul +benchmarks so GCC doesn't optimize-away the loops, other +things are same: +- TEN(r *= s;); r -= t; ++ i = 0; ++ while ( i++ < 10) ++ r *= s; ++ r -= t; + +and TEN is macro: + #define TEN(a) a a a a a a a a a a + +Signed-off-by: Roy Li + +--- + src/lat_ops.c | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) + +diff --git a/src/lat_ops.c b/src/lat_ops.c +index d343ff3..457072b 100644 +--- a/src/lat_ops.c ++++ b/src/lat_ops.c +@@ -126,11 +126,23 @@ do_integer_mul(iter_t iterations, void* cookie) + struct _state *pState = (struct _state*)cookie; + register int r = pState->N + 37431; + register int s = pState->N + 4; +- register int t = r * s * s * s * s * s * s * s * s * s * s - r; ++ register int t = r; ++ int i = 0; ++ ++ while ( i++ < 10) ++ t *= s; ++ t -= r; + + while (iterations-- > 0) { +- TEN(r *= s;); r -= t; +- TEN(r *= s;); r -= t; ++ i = 0; ++ while ( i++ < 10) ++ r *= s; ++ r -= t; ++ ++ i = 0; ++ while ( i++ < 10) ++ r *= s; ++ r -= t; + } + use_int(r); + } +@@ -207,13 +219,21 @@ do_int64_mul(iter_t iterations, void* cookie) + register int64 r = (int64)pState->N + 37420; + register int64 s = (int64)pState->N + 4; + register int64 t; ++ int i = 0; + + r += (int64)(pState->N + 6)<<32; + t = r * s * s * s * s * s * s * s * s * s * s - r; + + while (iterations-- > 0) { +- TEN(r *= s;); r -= t; +- TEN(r *= s;); r -= t; ++ i = 0; ++ while ( i++ < 10) ++ r *= s; ++ r -= t; ++ ++ i = 0; ++ while ( i++ < 10) ++ r *= s; ++ r -= t; + } + use_int((int)r); + } diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/lmbench-run b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/lmbench-run new file mode 100644 index 00000000..e904c75e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/lmbench-run @@ -0,0 +1,23 @@ +#!/bin/sh +# Wrapper script for lmbench written for the +# Debian GNU/Linux distribution by +# Javier Fernandez-Sanguino. +# Distributed under the GPL +SHAREDIR=/usr/share/lmbench/ +BINDIR=/usr/lib/lmbench/ +SCRIPTSDIR=$SHAREDIR/scripts +RESULTSDIR=$SHAREDIR/results +CONFIG=/var/lib/lmbench/config/`$SCRIPTSDIR/config` +runuid=`id -u` + +[ $runuid -gt 0 ] && { + echo "You must run this as the root user" + exit 0 +} +cd $SCRIPTSDIR +[ ! -f $CONFIG ] && ./config-run +./results + +echo "Benchmark run finished...." +echo "Remember you can find the results of the benchmark " +echo "under $RESULTSDIR" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch new file mode 100644 index 00000000..b42ee7d0 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch @@ -0,0 +1,30 @@ +From 16823f5c3d3d5adad0b70e9055c08cb4e18d255b Mon Sep 17 00:00:00 2001 +From: Noor Ahsan +Date: Mon, 29 Aug 2011 16:17:51 +0000 +Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe) + +Both lmbench and util-linux-ng packages provide own /usr/bin/line binaries. +Even though the binaries name is the same, their functionality is different. +This patch renames lmbench's line binary as lm_line to avoid conflicts with +util-linux-ng. script/config-run is also modified (patch) to call lm_line +instead of line. + +Upstream-Status: Inappropriate [build system specific change] + +--- + scripts/config-run | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/config-run b/scripts/config-run +index f620c15..a2d5ba4 100755 +--- a/scripts/config-run ++++ b/scripts/config-run +@@ -224,7 +224,7 @@ fi + + echo "Hang on, we are calculating your cache line size." + ../bin/$OS/msleep 250 +-LINE_SIZE=`../bin/$OS/line -M ${MB}M` ++LINE_SIZE=`../bin/$OS/lm_line -M ${MB}M` + export LINE_SIZE + echo "OK, it looks like your cache line is $LINE_SIZE bytes." + echo "" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb new file mode 100644 index 00000000..8e6e803a --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb @@ -0,0 +1,92 @@ +SUMMARY = "Tools for performance analysis" +HOMEPAGE = "http://lmbench.sourceforge.net/" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPL-2.0-with-lmbench-restriction" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ + file://COPYING-2;md5=8e9aee2ccc75d61d107e43794a25cdf9" + +inherit autotools-brokensep + +DEPENDS += "libtirpc" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LDLIBS += " -ltirpc " + +PR = "r2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \ + file://lmbench-run \ + file://rename-line-binary.patch \ + file://update-results-script.patch \ + file://obey-ranlib.patch \ + file://update-config-script.patch \ + file://lmbench_result_html_report.patch \ + file://fix-lmbench-memory-check-failure.patch \ + file://0001-avoid-gcc-optimize-away-the-loops.patch \ + file://0001-lat_http.c-Add-printf-format.patch \ + file://0001-Check-for-musl-define-guard-before-redefining-sockle.patch \ + file://0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch \ + file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \ + " +SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf" +SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/lmbench/files/development/" +UPSTREAM_CHECK_REGEX = "lmbench-(?P\d+(\.\d+)+-[a-z]+\d+)" + +EXTRA_OEMAKE = 'CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" LDLIBS="${LDLIBS}" LD="${LD}" OS="${TARGET_SYS}" \ + TARGET="${TARGET_OS}" BASE="${prefix}" MANDIR="${mandir}"' + +do_configure() { + : +} + +do_compile () { + for CONFIG_SITE_ITEM in $CONFIG_SITE; do + . $CONFIG_SITE_ITEM + done + if [ X"$ac_cv_uint" = X"yes" ]; then + CFLAGS="${CFLAGS} -DHAVE_uint" + fi + install -d ${S}/bin/${TARGET_SYS} + oe_runmake -C src +} + +do_install () { + install -d ${D}${sysconfdir}/default/volatiles \ + ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \ + ${D}${datadir}/lmbench/scripts + + echo "d root root 0755 ${localstatedir}/run/${BPN} none" \ + > ${D}${sysconfdir}/default/volatiles/99_lmbench + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/${BPN} - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/lmbench.conf + fi + + oe_runmake BASE="${D}${prefix}" MANDIR="${D}${mandir}" \ + DESTDIR="${D}" \ + -C src install + mv ${D}${bindir}/line ${D}${bindir}/lm_line + install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/ + sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${BPN},;' \ + -e 's,^BINDIR=.*$,BINDIR=${libdir}/${BPN},;' \ + -e 's,^CONFIG=.*$,CONFIG=`$SCRIPTSDIR/config`,;' \ + ${D}${bindir}/lmbench-run + install -m 0755 ${S}/scripts/lmbench ${D}${bindir} + install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts +} + +pkg_postinst_${PN} () { + if [ -z "$D" ]; then + if command -v systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi +} + +RDEPENDS_${PN} = "perl" +FILES_${PN} += "${datadir}/lmbench ${libdir}/lmbench" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/files/Makefile.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/files/Makefile.patch new file mode 100644 index 00000000..971e52ac --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/files/Makefile.patch @@ -0,0 +1,28 @@ +From 9a950b14b9f7767d83e5faac2e1e8203c500e2c2 Mon Sep 17 00:00:00 2001 +From: Rod Whitby +Date: Tue, 25 Oct 2011 18:43:50 -0500 +Subject: [PATCH] memtester: Added patch to Makefile to change no-longer-supported 'head -1' syntax to 'head -n 1'. + +Signed-off-by: Joel A Fernandes +--- + Makefile | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index a271bf5..6bccff3 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,8 +32,8 @@ install: all + auto-ccld.sh: \ + conf-cc conf-ld warn-auto.sh + ( cat warn-auto.sh; \ +- echo CC=\'`head -1 conf-cc`\'; \ +- echo LD=\'`head -1 conf-ld`\' \ ++ echo CC=\'`head -n 1 conf-cc`\'; \ ++ echo LD=\'`head -n 1 conf-ld`\' \ + ) > auto-ccld.sh + + compile: \ +-- +1.7.0.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb new file mode 100644 index 00000000..0964c048 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "Utility to test for faulty memory subsystem" +HOMEPAGE = "http://pyropus.ca/software/memtester/" +SECTION = "console/utils" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +SRC_URI = "http://pyropus.ca/software/memtester/old-versions/${BP}.tar.gz" +SRC_URI += "file://Makefile.patch" + +SRC_URI[md5sum] = "598f41b7308e1f736164bca3ab84ddbe" +SRC_URI[sha256sum] = "f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88" + +do_compile () { + echo '${CC} ${CFLAGS} -DPOSIX -c' > conf-cc + echo '${CC} ${LDFLAGS}' > conf-ld + oe_runmake +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}${mandir}/man8 + install -m 0755 memtester ${D}${bindir}/ + install -m 0755 memtester.8 ${D}${mandir}/man8/ +} diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/Makefile-add-more-dependencies-to-pointer.h.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/Makefile-add-more-dependencies-to-pointer.h.patch new file mode 100644 index 00000000..abdb4344 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/Makefile-add-more-dependencies-to-pointer.h.patch @@ -0,0 +1,23 @@ +Makefile: add more dependencies to pointer.h + +Upstream-Status: Inappropriate [no upstream] + +Signed-off-by: Otavio Salvador +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 915866d..edd9ea2 100644 +--- a/Makefile ++++ b/Makefile +@@ -122,7 +122,7 @@ emfloat.o: emfloat.h emfloat.c nmglobal.h pointer.h Makefile + pointer.h: Makefile + touch pointer.h ; + +-misc.o: misc.h misc.c Makefile ++misc.o: misc.h misc.c nmglobal.h pointer.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c misc.c + + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/nbench_32bits.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/nbench_32bits.patch new file mode 100644 index 00000000..1b8a4dc0 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte/nbench_32bits.patch @@ -0,0 +1,46 @@ +From 81f4043a6787060029ef20eed21cdcf3e50337df Mon Sep 17 00:00:00 2001 +From: Chase Maupin +Date: Tue, 28 Feb 2012 14:58:35 -0600 +Subject: [PATCH] nbench: modify Makefile for 32bit + +* Patch taken from OE classic git repository as of commit id + ad42bf9065928b2902d7d9534709d3ccea7ec956 and was added by: + * Marcin Juszkiewicz +* Notes from original patch were: + +BYTE Magazine's native benchmarks (also called BYTEmark) designed to +expose the capabilities of a system's CPU, FPU and memory system. + +http://www.tux.org/~mayer/linux/ + +Recipe from old Atmel overlay. + +Upstream-Status: Inappropriate [no upstream] + +Signed-off-by: Chase Maupin +--- + Makefile | 8 ++------ + 1 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 5045c77..915866d 100644 +--- a/Makefile ++++ b/Makefile +@@ -119,12 +119,8 @@ emfloat.o: emfloat.h emfloat.c nmglobal.h pointer.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c emfloat.c + +-pointer.h: pointer Makefile +- $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ +- -o pointer pointer.c +- rm -f pointer.h +- if [ "4" = `./pointer` ] ; then touch pointer.h ;\ +- else echo "#define LONG64" >pointer.h ; fi ++pointer.h: Makefile ++ touch pointer.h ; + + misc.o: misc.h misc.c Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ +-- +1.7.0.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb new file mode 100644 index 00000000..22bb0416 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/nbench-byte/nbench-byte_2.2.3.bb @@ -0,0 +1,28 @@ +SUMMARY = "A CPU benchmark utility" +DESCRIPTION = "BYTE Magazine's native benchmarks (also called BYTEmark) \ +designed to expose the capabilities of a system's CPU, FPU, \ +and memory system." +HOMEPAGE = "http://www.tux.org/~mayer/linux/" +LICENSE = "nbench-byte" +LIC_FILES_CHKSUM = "file://README;beginline=57;endline=66;md5=020ef579f8fa5746b7e307a54707834f" +SECTION = "console/utils" + +SRC_URI = "https://fossies.org/linux/misc/${BP}.tar.gz \ + file://nbench_32bits.patch \ + file://Makefile-add-more-dependencies-to-pointer.h.patch" + +SRC_URI[md5sum] = "285dfab361080759d477ea1fe7d3093a" +SRC_URI[sha256sum] = "723dd073f80e9969639eb577d2af4b540fc29716b6eafdac488d8f5aed9101ac" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +TARGET_CC_ARCH += "${LDFLAGS}" +do_compile() { + oe_runmake +} + +do_install () { + install -d ${D}${bindir} + install -m 0644 NNET.DAT ${D}${bindir}/ + install -m 0755 nbench ${D}${bindir}/ +} diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_8.0.1.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_8.0.1.bb new file mode 100644 index 00000000..b1fa51bf --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_8.0.1.bb @@ -0,0 +1,41 @@ +SUMMARY = "Phoronix Test Suite" +DESCRIPTION = "The Phoronix Test Suite is designed to carry out both qualitative \ +and quantitative benchmarks in a clean, reproducible, and easy-to-use manner." +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +SECTION = "console/tests" + +SRC_URI = "http://www.phoronix-test-suite.com/releases/${BP}.tar.gz" +SRC_URI[md5sum] = "3dc3a0e490e909f188379a9e05fd4780" +SRC_URI[sha256sum] = "6306549109c7254baf31edb385265b19557b5692217d2dfcf96f6fb17de8e842" + +S = "${WORKDIR}/phoronix-test-suite" + +inherit systemd allarch + +do_install() { + DESTDIR=${D} ./install-sh ${exec_prefix} + + if [ "${systemd_unitdir}" != "/usr/lib/systemd" ]; then + install -d ${D}/${systemd_unitdir}/system/ + mv ${D}/usr/lib/systemd/system/* ${D}/${systemd_unitdir}/system/ + rm -rf ${D}/usr/lib/ + fi +} + +# It is not advisable to enable these services by default since they can cause +# continual target reboots if they encounter network problems. +# +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE_${PN} = "phoromatic-client.service phoromatic-server.service" + +RDEPENDS_${PN} += "bash python php-cli util-linux-lscpu os-release lsb" + +FILES_${PN} += " \ + ${datadir}/phoronix-test-suite \ + ${datadir}/appdata/phoronix-test-suite.appdata.xml \ + ${datadir}/icons/hicolor/48x48/apps/phoronix-test-suite.png \ + ${datadir}/icons/hicolor/64x64/mimetypes/application-x-openbenchmarking.png \ + ${datadir}/mime/packages/openbenchmarking-mime.xml \ + ${systemd_unitdir}/* \ +" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb new file mode 100644 index 00000000..77d17281 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/s-suite/s-suite_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "Small collection of benchmarks for storage I/O" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b529aaa6a0c50f15d29f89609b5c22f3" + +SRCREV = "79698f645bfb28d0d966484ddad3a1efb562246d" +PV = "0.0+git${SRCPV}" +SRC_URI = "git://github.com/Algodev-github/S.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +# installing in /opt/S-suite since the package has +# dependencies to the directory structure. +do_install() { + install -d ${D}/opt/S-suite + for i in $(find ${S}/* -type d); do + install -d ${D}/opt/S-suite/$(basename $i) + install -m0755 -p ${S}/$(basename $i)/* ${D}/opt/S-suite/$(basename $i) + done + + install -m0755 ${S}/config_params.sh ${D}/opt/S-suite + install -m0755 ${S}/def_config_params.sh ${D}/opt/S-suite +} + +RDEPENDS_${PN} = "bash bc coreutils gawk g++ gcc fio libaio libaio-dev sysstat" + +FILES_${PN} = "/opt/S-suite/" + +# added to INSANE_SKIP since s-suite have an runtime +# dependency (RDEPENDS) on libaio-dev. +INSANE_SKIP_${PN} += "dev-deps" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb new file mode 100644 index 00000000..708c71f4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb @@ -0,0 +1,26 @@ +SUMMARY = "System performance benchmark" +HOMEPAGE = "http://github.com/akopytov/sysbench" +SECTION = "console/tests" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +inherit autotools + +# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from +# Launchpad until the next release is available from Github. +SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz" + +SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d" +SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)}" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," +PACKAGECONFIG[aio] = "--enable-aio,--disable-aio,libaio," +PACKAGECONFIG[mysql] = "--with-mysql \ + --with-mysql-includes=${STAGING_INCDIR}/mysql \ + --with-mysql-libs=${STAGING_LIBDIR}, \ + --without-mysql,mysql5" + +do_configure_prepend() { + touch ${S}/NEWS ${S}/AUTHORS +} diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb new file mode 100644 index 00000000..8cb59da7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "A simple memory benchmark program, which tries to measure the \ +peak bandwidth of sequential memory accesses and the latency of random memory \ +accesses. Bandwidth is measured by running different assembly code for the \ +aligned memory blocks and attempting different prefetch strategies" +HOMEPAGE = "https://github.com/ssvb/tinymembench/wiki" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://main.c;endline=22;md5=879b9bbb60851454885b5fa47eb6b345" + +PV = "0.4.0+git${SRCPV}" + +SRCREV = "2c789849709d837b4bd114c11ed2d9bdc65afbc6" +SRC_URI = "git://github.com/ssvb/tinymembench.git" + +S = "${WORKDIR}/git" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install() { + install -d ${D}${bindir} + install -m755 tinymembench ${D}${bindir}/ +} + +# Fails to build with thumb-1 (qemuarm) +#| {standard input}: Assembler messages: +#| {standard input}:66: Error: instruction not supported in Thumb16 mode -- `subs r1,r1,#16' +#| {standard input}:69: Error: instruction not supported in Thumb16 mode -- `subs r1,r1,#16' +#| {standard input}:82: Error: selected processor does not support Thumb mode `mla r3,r4,r3,r5' +#| {standard input}:82: Error: unshifted register required -- `and r8,r7,r3,lsr#16' +ARM_INSTRUCTION_SET = "arm" +# +# Does not work for 64bit mips. +# +COMPATIBLE_HOST = "^(?!mips64).*" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch new file mode 100644 index 00000000..5aebb956 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch @@ -0,0 +1,30 @@ +From 5429ab90eb33eb243fa7b9cd247e0490d72b9da5 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Wed, 9 Sep 2015 15:04:45 +0000 +Subject: [PATCH] Drop 'inline' of crc32 function to fix build using GCC 5.2 +Organization: O.S. Systems Software LTDA. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + crc32.h | 1 - + crc32.o | Bin 748 -> 2056 bytes + 2 files changed, 1 deletion(-) + +diff --git a/crc32.h b/crc32.h +index 62b3433..8fc62b6 100644 +--- a/crc32.h ++++ b/crc32.h +@@ -18,7 +18,6 @@ + #ifndef CRC32_H + #define CRC32_H + +-inline + unsigned long crc32( const void* const buffer, + unsigned long length, + unsigned long crc); + +-- +2.1.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch new file mode 100644 index 00000000..cfd34f02 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch @@ -0,0 +1,49 @@ +From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 17 Jun 2017 08:08:56 -0700 +Subject: [PATCH] Specify printf formats + +Fixes +tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + tiotest.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tiotest.c b/tiotest.c +index 6b3d0c3..3e6166a 100644 +--- a/tiotest.c ++++ b/tiotest.c +@@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess) + { + if (value <= 0) + { +- printf(mess); ++ printf("%s",mess); + printf("Try 'tiotest -h' for more information.\n"); + exit(1); + } +@@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess) + { + if (value < 0) + { +- printf(mess); ++ printf("%s", mess); + printf("Try 'tiotest -h' for more information\n"); + exit(1); + } +@@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential, + if(args.debugLevel > 4) + { + printf("Created %d threads\n", i); +- fprintf(stderr, debugMessage); ++ fprintf(stderr, "%s", debugMessage); + fflush(stderr); + } + +-- +2.13.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch new file mode 100644 index 00000000..321d2998 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch @@ -0,0 +1,57 @@ +From: Otavio Salvador +Subject: [PATCH] Avoid aligned allocation function name clashes + +glibc added new methods for aligned allocation and it clashes with the +local version used by 'tiobench'. To fix it, we prefix the methods +with '_'. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + tiotest.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tiotest.c b/tiotest.c +index 38f54e7..6b3d0c3 100644 +--- a/tiotest.c ++++ b/tiotest.c +@@ -31,7 +31,7 @@ static const char* versionStr = "tiotest v0.3.3 (C) 1999-2000 Mika Kuoppala threads[i].thread_attr), + PTHREAD_SCOPE_SYSTEM); + +- d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize ); ++ d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize ); + if( d->threads[i].buffer == NULL ) + { + perror("Error allocating memory"); +@@ -383,7 +383,7 @@ void cleanup_test( ThreadTest *d ) + { + if (!args.rawDrives) + unlink(d->threads[i].fileName); +- aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); ++ _aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); + d->threads[i].buffer = 0; + + pthread_attr_destroy( &(d->threads[i].thread_attr) ); +-- +1.7.7 + diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch new file mode 100644 index 00000000..f820c7e3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch @@ -0,0 +1,49 @@ +Adapt tiobench to OE +Author: Ludovic Desroches + +Upstream-Status: Inappropriate [not author] + +Index: Makefile +=================================================================== +--- a/Makefile 2011-05-26 07:48:46.341400974 +0200 ++++ b/Makefile 2011-05-30 06:32:38.091401358 +0200 +@@ -1,8 +1,9 @@ + # Makefile for tiotest + +-CC=gcc ++CC?=gcc + #CFLAGS=-O3 -fomit-frame-pointer -Wall + CFLAGS=-O2 -Wall ++LDFLAGS?= + + #DEFINES=-DUSE_MMAP + #-DUSE_MADVISE +@@ -14,16 +15,16 @@ + + #DEFINES= + +-LINK=gcc ++LINK?=$(CC) + EXE=tiotest + PROJECT=tiobench + # do it once instead of each time referenced + VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g") + DISTNAME=$(PROJECT)-$(VERSION) + INSTALL=install +-PREFIX=/usr/local ++PREFIX?=/usr/local + BINDIR=$(PREFIX)/bin +-DOCDIR=/usr/local/doc/$(DISTNAME) ++DOCDIR=$(PREFIX)/share/doc/$(DISTNAME) + + all: $(EXE) + +@@ -34,7 +35,7 @@ + $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o + + $(EXE): tiotest.o crc32.o +- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread ++ $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS) + @echo + @echo "./tiobench.pl --help for usage options" + @echo diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb new file mode 100644 index 00000000..427ce67d --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb @@ -0,0 +1,30 @@ +SUMMARY = "Threaded I/O tester" +HOMEPAGE = "http://sourceforge.net/projects/tiobench/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" + +PR = "r1" + +SRC_URI = "\ + http://sourceforge.net/projects/tiobench/files/tiobench/${PV}/${BP}.tar.gz \ + file://tiobench-makefile.patch \ + file://avoid-glibc-clashes.patch \ + file://0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch \ + file://0001-Specify-printf-formats.patch \ +" +SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128" +SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc" + +EXTRA_OEMAKE = "PREFIX=${D}/usr" + +do_install() { + oe_runmake install +} + +RDEPENDS_${PN} = "\ + perl \ + perl-module-exporter-heavy \ + perl-module-getopt-long \ + perl-module-overload \ + perl-module-strict \ +" diff --git a/external/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb b/external/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb new file mode 100644 index 00000000..8fad04e3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Whetstone benchmark is a synthetic benchmark for evaluating the performance of computers" +SUMMARY = "CPU benchmark to measure floating point performance" + +LICENSE = "PD" +LIC_FILES_CHKSUM ="file://${WORKDIR}/whetstone.c;beginline=1;endline=52;md5=c795edc15e7e1d92ca8f88ad718449f5" + +SRC_URI = "http://www.netlib.org/benchmark/whetstone.c" +SRC_URI[md5sum] = "d8eb2cd7104bb5a12d614ac6d3f1f9fb" +SRC_URI[sha256sum] = "333e4ceca042c146f63eec605573d16ae8b07166cbc44a17bec1ea97c6f1efbf" + +S = "${WORKDIR}" + +do_compile () { + ${CC} ${CFLAGS} ${LDFLAGS} -Ofast -o whetstone whetstone.c -lm +} + +do_install () { + install -Dm 0755 whetstone ${D}${bindir}/whetstone +} + -- cgit 1.2.3-korg