Merge Official Source
This commit is contained in:
57
Makefile
Normal file
57
Makefile
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# 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_VERSION:=2023.01.25~d5fad6bd
|
||||
PKG_RELEASE:=1
|
||||
|
||||
ifeq ($(CONFIG_USE_MUSL),y)
|
||||
PKG_LIBC:=musl
|
||||
else
|
||||
PKG_LIBC:=glibc
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/coremark
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=CoreMark Embedded Microprocessor Benchmark
|
||||
DEPENDS:=@(aarch64||x86_64)
|
||||
URL:=https://github.com/eembc/coremark
|
||||
endef
|
||||
|
||||
define Package/coremark/description
|
||||
Embedded Microprocessor Benchmark
|
||||
endef
|
||||
|
||||
define Package/coremark/conffiles
|
||||
/etc/bench.log
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/coremark/install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_LIBC)/coremark.$(ARCH) $(1)/bin/coremark
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_BIN) ./coremark.sh $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./coremark $(1)/etc/uci-defaults/xxx-coremark
|
||||
endef
|
||||
|
||||
define Package/coremark/postinst
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || sed -i '/coremark/d' /etc/crontabs/root
|
||||
[ -n "$${IPKG_INSTROOT}" ] || echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root
|
||||
[ -n "$${IPKG_INSTROOT}" ] || crontab /etc/crontabs/root
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,coremark))
|
||||
7
coremark
Executable file
7
coremark
Executable file
@@ -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
|
||||
12
coremark.sh
Executable file
12
coremark.sh
Executable file
@@ -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
|
||||
BIN
src/glibc/coremark.aarch64
Normal file
BIN
src/glibc/coremark.aarch64
Normal file
Binary file not shown.
BIN
src/glibc/coremark.x86_64
Normal file
BIN
src/glibc/coremark.x86_64
Normal file
Binary file not shown.
BIN
src/musl/coremark.aarch64
Normal file
BIN
src/musl/coremark.aarch64
Normal file
Binary file not shown.
BIN
src/musl/coremark.x86_64
Normal file
BIN
src/musl/coremark.x86_64
Normal file
Binary file not shown.
Reference in New Issue
Block a user