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

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

Signed-off-by: sadik <[email protected]>

---

Changes in v2:
 - separate patch for master branch.
 - Include Coremark licese file in licenses
 - Use oe_runmake with compiler flags for cross-compilation
 - change subject line to include recipe name
 - append _git to recipe name for tracking of version
 - include package version in recipe

Link to v1:https://lists.yoctoproject.org/g/meta-arago/message/16707

---
 meta-arago-test/licenses/Coremark             | 91 +++++++++++++++++++
 .../coremark/coremark_git.bb                  | 17 ++++
 .../recipes-core/packagegroups/ti-test.bb     |  1 +
 3 files changed, 109 insertions(+)
 create mode 100644 meta-arago-test/licenses/Coremark
 create mode 100644 meta-arago-test/recipes-benchmark/coremark/coremark_git.bb

diff --git a/meta-arago-test/licenses/Coremark 
b/meta-arago-test/licenses/Coremark
new file mode 100644
index 00000000..c6e062f8
--- /dev/null
+++ b/meta-arago-test/licenses/Coremark
@@ -0,0 +1,91 @@
+COREMARK® ACCEPTABLE USE AGREEMENT
+This ACCEPTABLE USE AGREEMENT (this “Agreement”) is offered by Embedded 
Microprocessor Benchmark Consortium, a California nonprofit corporation 
(“Licensor”), to users of its CoreMark® software (“Licensee”) exclusively on 
the following terms.
+
+Licensor offers benchmarking software (“Software”) pursuant to an open source 
license, but carefully controls use of its benchmarks and their associated 
goodwill. Licensor has registered its trademark in one of the benchmarks 
available through the Software, COREMARK, Ser. No. 85/487,290; Reg. No. 
4,179,307 (the “Trademark”), and promotes the use of a standard metric as a 
benchmark for assessing the performance of embedded systems. Solely on the 
terms described herein, Licensee may use and display the Trademark in 
connection with the generation of data regarding measurement and analysis of 
computer and embedded system benchmarking via the Software (the “Licensed Use”).
+
+Article 1 – License Grant.
+1.1. License. Subject to the terms and conditions of this Agreement, Licensor 
hereby grants to Licensee, and Licensee hereby accepts from Licensor, a 
personal, non-exclusive, royalty-free, revocable right and license to use and 
display the Trademark during the term of this Agreement (the “Term”), solely 
and exclusively in connection with the Licensed Use. During the Term, Licensee 
(i) shall not modify or otherwise create derivative works of the Trademark, and 
(ii) may use the Trademark only to the extent permitted under this License. 
Neither Licensee nor any affiliate or agent thereof shall otherwise use the 
Trademark without the prior express written consent of Licensor, which may be 
withheld in its sole and absolute discretion. All rights not expressly granted 
to Licensee hereunder shall remain the exclusive property of Licensor.
+
+1.2. Modifications to the Software. Licensee shall not use the Trademark in 
connection with any use of a modified, derivative, or otherwise altered copy of 
the Software.
+
+1.3. Licensor’s Use. Nothing in this Agreement shall preclude Licensor or any 
of its successors or assigns from using or permitting other entities to use the 
Trademark, whether or not such entity directly or indirectly competes or 
conflicts with Licensee’s Licensed Use in any manner.
+
+1.4. Term and Termination. This Agreement is perpetual unless terminated by 
either of the parties. Licensee may terminate this Agreement for convenience, 
without cause or liability, for any reason or for no reason whatsoever, upon 
ten (10) business days written notice. Licensor may terminate this Agreement 
effective immediately upon notice of breach. Upon termination, Licensee shall 
immediately remove all implementations of the Trademark from the Licensed Use, 
and delete all digitals files and records of all materials related to the 
Trademark.
+
+Article 2 – Ownership.
+2.1. Ownership. Licensee acknowledges and agrees that Licensor is the owner of 
all right, title, and interest in and to the Trademark, and all such right, 
title, and interest shall remain with Licensor. Licensee shall not contest, 
dispute, challenge, oppose, or seek to cancel Licensor’s right, title, and 
interest in and to the Trademark. Licensee shall not prosecute any application 
for registration of the Trademark. Licensee shall display appropriate notices 
regarding ownership of the Trademark in connection with the Licensed Use.
+
+2.2. Goodwill. Licensee acknowledges that Licensee shall not acquire any 
right, title, or interest in the Trademark by virtue of this Agreement other 
than the license granted hereunder, and disclaims any such right, title, 
interest, or ownership. All goodwill and reputation generated by Licensee’s use 
of the Trademark shall inure to the exclusive benefit of Licensor. Licensee 
shall not by any act or omission use the Trademark in any manner that 
disparages or reflects adversely on Licensor or its Licensed Use or reputation. 
Licensee shall not take any action that would interfere with or prejudice 
Licensor’s ownership or registration of the Trademark, the validity of the 
Trademark or the validity of the license granted by this Agreement. If Licensor 
determines and notifies Licensee that any act taken in connection with the 
Licensed Use (i) is inaccurate, unlawful or offensive to good taste; (ii) fails 
to provide for proper trademark notices, or (iii) otherwise violates Licensee’s 
obligations under this Agreement, the license granted under this Agreement 
shall terminate.
+
+Article 3 – Indemnification.
+3.1. Indemnification Generally. Licensee agrees to indemnify, defend, and hold 
harmless (collectively “indemnify” or “indemnification”) Licensor, including 
Licensor’s members, managers, officers, and employees (collectively “Related 
Persons”), from and against, and pay or reimburse Licensor and such Related 
Persons for, any and all third-party actions, claims, demands, proceedings, 
investigations, inquiries (collectively, “Claims”), and any and all 
liabilities, obligations, fines, deficiencies, costs, expenses, royalties, 
losses, and damages (including reasonable outside counsel fees and expenses) 
associated with such Claims, to the extent that such Claim arises out of (i) 
Licensee’s material breach of this Agreement, or (ii) any allegation(s) that 
Licensee’s actions infringe or violate any third-party intellectual property 
right, including without limitation, any U.S. copyright, patent, or trademark, 
or are otherwise found to be tortious or criminal (whether or not such 
indemnified person is a named party in a legal proceeding).
+
+3.2. Notice and Defense of Claims. Licensor shall promptly notify Licensee of 
any Claim for which indemnification is sought, following actual knowledge of 
such Claim, provided however that the failure to give such notice shall not 
relieve Licensee of its obligations hereunder except to the extent that 
Licensee is materially prejudiced by such failure. In the event that any 
third-party Claim is brought, Licensee shall have the right and option to 
undertake and control the defense of such action with counsel of its choice, 
provided however that (i) Licensor at its own expense may participate and 
appear on an equal footing with Licensee in the defense of any such Claim, (ii) 
Licensor may undertake and control such defense in the event of the material 
failure of Licensee to undertake and control the same; and (iii) the defense of 
any Claim relating to the intellectual property rights of Licensor or its 
licensors and any related counterclaims shall be solely controlled by Licensor 
with counsel of its choice. Licensee shall not consent to judgment or concede 
or settle or compromise any Claim without the prior written approval of 
Licensor (whose approval shall not be unreasonably withheld), unless such 
concession or settlement or compromise includes a full and unconditional 
release of Licensor and any applicable Related Persons from all liabilities in 
respect of such Claim.
+
+Article 4 – Miscellaneous.
+4.1. Relationship of the Parties. This Agreement does not create a 
partnership, franchise, joint venture, agency, fiduciary, or employment 
relationship between the parties.
+
+4.2. No Third-Party Beneficiaries. Except for the rights of Related Persons 
under Article 3 (Indemnification), there are no third-party beneficiaries to 
this Agreement.
+
+4.3. Assignment. Licensee’s rights hereunder are non-assignable, and may not 
be sublicensed.
+
+4.4. Equitable Relief. Licensee acknowledges that the remedies available at 
law for any breach of this Agreement will, by their nature, be inadequate. 
Accordingly, Licensor may obtain injunctive relief or other equitable relief to 
restrain a breach or threatened breach of this Agreement or to specifically 
enforce this Agreement, without proving that any monetary damages have been 
sustained, and without the requirement of posting of a bond prior to obtaining 
such equitable relief.
+
+4.5. Governing Law. This Agreement will be interpreted, construed, and 
enforced in all respects in accordance with the laws of the State of 
California, without reference to its conflict of law principles.
+
+4.6. Attorneys’ Fees. If any legal action, arbitration or other proceeding is 
brought for the enforcement of this Agreement, or because of an alleged 
dispute, breach, default, or misrepresentation in connection with any of the 
provisions of this Agreement, the successful or prevailing party shall be 
entitled to recover its reasonable attorneys’ fees and other reasonable costs 
incurred in that action or proceeding, in addition to any other relief to which 
it may be entitled.
+
+4.7. Amendment; Waiver. This Agreement may not be amended, nor may any rights 
under it be waived, except in writing by Licensor.
+
+4.8. Severability. If any provision of this Agreement is held by a court of 
competent jurisdiction to be contrary to law, the provision shall be modified 
by the court and interpreted so as best to accomplish the objectives of the 
original provision to the fullest extent permitted by law, and the remaining 
provisions of this Agreement shall remain in effect.
+
+4.9. Entire Agreement. This Agreement constitutes the entire agreement between 
the parties and supersedes all prior and contemporaneous agreements, proposals 
or representations, written or oral, concerning its subject matter.
+
+Apache License
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+Definitions.
+"License" shall mean the terms and conditions for use, reproduction, and 
distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the 
copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other 
entities that control, are controlled by, or are under common control with that 
entity. For the purposes of this definition, "control" means (i) the power, 
direct or indirect, to cause the direction or management of such entity, 
whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or 
more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising 
permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, 
including but not limited to software source code, documentation source, and 
configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or 
translation of a Source form, including but not limited to compiled object 
code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, 
made available under the License, as indicated by a copyright notice that is 
included in or attached to the work (an example is provided in the Appendix 
below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that 
is based on (or derived from) the Work and for which the editorial revisions, 
annotations, elaborations, or other modifications represent, as a whole, an 
original work of authorship. For the purposes of this License, Derivative Works 
shall not include works that remain separable from, or merely link (or bind by 
name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original 
version of the Work and any modifications or additions to that Work or 
Derivative Works thereof, that is intentionally submitted to Licensor for 
inclusion in the Work by the copyright owner or by an individual or Legal 
Entity authorized to submit on behalf of the copyright owner. For the purposes 
of this definition, "submitted" means any form of electronic, verbal, or 
written communication sent to the Licensor or its representatives, including 
but not limited to communication on electronic mailing lists, source code 
control systems, and issue tracking systems that are managed by, or on behalf 
of, the Licensor for the purpose of discussing and improving the Work, but 
excluding communication that is conspicuously marked or otherwise designated in 
writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf 
of whom a Contribution has been received by Licensor and subsequently 
incorporated within the Work.
+
+Grant of Copyright License. Subject to the terms and conditions of this 
License, each Contributor hereby grants to You a perpetual, worldwide, 
non-exclusive, no-charge, royalty-free, irrevocable copyright license to 
reproduce, prepare Derivative Works of, publicly display, publicly perform, 
sublicense, and distribute the Work and such Derivative Works in Source or 
Object form.
+
+Grant of Patent License. Subject to the terms and conditions of this License, 
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, 
no-charge, royalty-free, irrevocable (except as stated in this section) patent 
license to make, have made, use, offer to sell, sell, import, and otherwise 
transfer the Work, where such license applies only to those patent claims 
licensable by such Contributor that are necessarily infringed by their 
Contribution(s) alone or by combination of their Contribution(s) with the Work 
to which such Contribution(s) was submitted. If You institute patent litigation 
against any entity (including a cross-claim or counterclaim in a lawsuit) 
alleging that the Work or a Contribution incorporated within the Work 
constitutes direct or contributory patent infringement, then any patent 
licenses granted to You under this License for that Work shall terminate as of 
the date such litigation is filed.
+
+Redistribution. You may reproduce and distribute copies of the Work or 
Derivative Works thereof in any medium, with or without modifications, and in 
Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of 
this License; and You must cause any modified files to carry prominent notices 
stating that You changed the files; and You must retain, in the Source form of 
any Derivative Works that You distribute, all copyright, patent, trademark, and 
attribution notices from the Source form of the Work, excluding those notices 
that do not pertain to any part of the Derivative Works; and If the Work 
includes a "NOTICE" text file as part of its distribution, then any Derivative 
Works that You distribute must include a readable copy of the attribution 
notices contained within such NOTICE file, excluding those notices that do not 
pertain to any part of the Derivative Works, in at least one of the following 
places: within a NOTICE text file distributed as part of the Derivative Works; 
within the Source form or documentation, if provided along with the Derivative 
Works; or, within a display generated by the Derivative Works, if and wherever 
such third-party notices normally appear. The contents of the NOTICE file are 
for informational purposes only and do not modify the License. You may add Your 
own attribution notices within Derivative Works that You distribute, alongside 
or as an addendum to the NOTICE text from the Work, provided that such 
additional attribution notices cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide 
additional or different license terms and conditions for use, reproduction, or 
distribution of Your modifications, or for any such Derivative Works as a 
whole, provided Your use, reproduction, and distribution of the Work otherwise 
complies with the conditions stated in this License.
+
+Submission of Contributions. Unless You explicitly state otherwise, any 
Contribution intentionally submitted for inclusion in the Work by You to the 
Licensor shall be under the terms and conditions of this License, without any 
additional terms or conditions. Notwithstanding the above, nothing herein shall 
supersede or modify the terms of any separate license agreement you may have 
executed with Licensor regarding such Contributions.
+
+Trademarks. This License does not grant permission to use the trade names, 
trademarks, service marks, or product names of the Licensor, except as required 
for reasonable and customary use in describing the origin of the Work and 
reproducing the content of the NOTICE file.
+
+Disclaimer of Warranty. Unless required by applicable law or agreed to in 
writing, Licensor provides the Work (and each Contributor provides its 
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express or implied, including, without limitation, any warranties 
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 
PARTICULAR PURPOSE. You are solely responsible for determining the 
appropriateness of using or redistributing the Work and assume any risks 
associated with Your exercise of permissions under this License.
+
+Limitation of Liability. In no event and under no legal theory, whether in 
tort (including negligence), contract, or otherwise, unless required by 
applicable law (such as deliberate and grossly negligent acts) or agreed to in 
writing, shall any Contributor be liable to You for damages, including any 
direct, indirect, special, incidental, or consequential damages of any 
character arising as a result of this License or out of the use or inability to 
use the Work (including but not limited to damages for loss of goodwill, work 
stoppage, computer failure or malfunction, or any and all other commercial 
damages or losses), even if such Contributor has been advised of the 
possibility of such damages.
+
+Accepting Warranty or Additional Liability. While redistributing the Work or 
Derivative Works thereof, You may choose to offer, and charge a fee for, 
acceptance of support, warranty, indemnity, or other liability obligations 
and/or rights consistent with this License. However, in accepting such 
obligations, You may act only on Your own behalf and on Your sole 
responsibility, not on behalf of any other Contributor, and only if You agree 
to indemnify, defend, and hold each Contributor harmless for any liability 
incurred by, or claims asserted against, such Contributor by reason of your 
accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/meta-arago-test/recipes-benchmark/coremark/coremark_git.bb 
b/meta-arago-test/recipes-benchmark/coremark/coremark_git.bb
new file mode 100644
index 00000000..1e002c06
--- /dev/null
+++ b/meta-arago-test/recipes-benchmark/coremark/coremark_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "The benchmark utility to measure the performance of CPU"
+
+LICENSE = "Coremark"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0a18b17ae63deaa8a595035f668aebe1"
+
+SRC_URI = "git://github.com/eembc/coremark.git;branch=main;protocol=https"
+PV = "1.01+git"
+SRCREV = "1f483d5b8316753a742cbf5590caf5bd0a4e4777"
+
+do_compile() {
+    oe_runmake PORT_DIR=linux CC="${CC}" XCFLAGS="${CFLAGS}" 
LFLAGS_END="${LDFLAGS}" compile
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/coremark.exe ${D}${bindir}/coremark
+}
diff --git a/meta-arago-test/recipes-core/packagegroups/ti-test.bb 
b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
index 586cbe15..22957218 100644
--- a/meta-arago-test/recipes-core/packagegroups/ti-test.bb
+++ b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
@@ -96,6 +96,7 @@ TI_TEST_BASE:append:armv7ve = " \
 TI_TEST_TI_TOOLS = " \
     arm-benchmarks \
     arm-ddr-bandwidth \
+    coremark \
     input-utils \
     ltp-ddt \
     openssl-perf \
-- 
2.34.1



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


Reply via email to