mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 17:03:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
0d155c70be
commit
32600acc60
14258 files changed
+3954570
No files matched your search
@@ -0,0 +1,83 @@
|
||||
#
|
||||
# Copyright (C) 2018 Lim Guo Wei
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=coremark
|
||||
PKG_SOURCE_DATE:=2025-05-01
|
||||
PKG_SOURCE_VERSION:=1f483d5b8316753a742cbf5590caf5bd0a4e4777
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/eembc/coremark/tar.gz/$(PKG_SOURCE_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Lim Guo Wei <limguowei@gmail.com>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE.md
|
||||
|
||||
PKG_BUILD_FLAGS:=no-mips16 lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/coremark
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=CoreMark Embedded Microprocessor Benchmark
|
||||
URL:=https://github.com/eembc/coremark
|
||||
endef
|
||||
|
||||
define Package/coremark/description
|
||||
Embedded Microprocessor Benchmark
|
||||
endef
|
||||
|
||||
define Package/coremark/config
|
||||
config COREMARK_OPTIMIZE_O3
|
||||
bool "Use all optimizations (-O3)"
|
||||
depends on PACKAGE_coremark
|
||||
default y
|
||||
help
|
||||
This enables additional optmizations using the -O3 compilation flag.
|
||||
|
||||
config COREMARK_ENABLE_MULTITHREADING
|
||||
bool "Enable multithreading support"
|
||||
depends on PACKAGE_coremark
|
||||
default y
|
||||
help
|
||||
This enables multithreading support
|
||||
|
||||
config COREMARK_NUMBER_OF_THREADS
|
||||
int "Number of threads"
|
||||
depends on COREMARK_ENABLE_MULTITHREADING
|
||||
default 16
|
||||
help
|
||||
Number of threads to run in parallel
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_COREMARK_OPTIMIZE_O3),y)
|
||||
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_COREMARK_ENABLE_MULTITHREADING),y)
|
||||
EXTRA_CFLAGS := -DMULTITHREAD=$(CONFIG_COREMARK_NUMBER_OF_THREADS) -DUSE_PTHREAD
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/posix/core_portme.mak
|
||||
mkdir -p $(PKG_BUILD_DIR)/$(ARCH)
|
||||
$(CP) $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)/
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \
|
||||
PORT_CFLAGS="$(TARGET_CFLAGS)" XCFLAGS="$(EXTRA_CFLAGS)" compile
|
||||
endef
|
||||
|
||||
define Package/coremark/install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/coremark $(1)/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,coremark))
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
sed -i '/coremark/d' /etc/crontabs/root
|
||||
echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root
|
||||
crontab /etc/crontabs/root
|
||||
|
||||
touch /etc/bench.log
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
/bin/coremark > /tmp/coremark.log
|
||||
|
||||
cat /tmp/coremark.log | grep "CoreMark 1.0" | cut -d "/" -f 1 > /etc/bench.log
|
||||
sed -i 's/CoreMark 1.0/ (CpuMark/g' /etc/bench.log
|
||||
echo " Scores)" >> /etc/bench.log
|
||||
|
||||
if [ -f "/etc/bench.log" ]; then
|
||||
sed -i '/coremark/d' /etc/crontabs/root
|
||||
crontab /etc/crontabs/root
|
||||
fi
|
||||
Reference in new issue
Block a user