coremark: fix 64bit support

This commit is contained in:
coolsnowwolf 2019-04-18 18:56:22 +08:00
parent bd1a07d14a
commit 3e3bc0c4c4
3 changed files with 14 additions and 6 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autocore
PKG_VERSION:=1
PKG_RELEASE:=16
PKG_RELEASE:=17
include $(INCLUDE_DIR)/package.mk

View File

@ -679,7 +679,7 @@
<table width="100%" cellspacing="10">
<tr><td width="33%"><%:Hostname%></td><td><%=luci.sys.hostname() or "?"%></td></tr>
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or boardinfo.system or "?")%></td></tr>
<tr><td width="33%"><%:CPU Info%></td><td><%=luci.sys.exec("grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'")%> MHz <%=luci.sys.exec("sensors | grep 'Core 0' | cut -c10-24")%></td></tr>
<tr><td width="33%"><%:CPU Info%></td><td><%=luci.sys.exec("grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'")%> MHz <%=luci.sys.exec("cat /tmp/bench.log") or " "%> <%=luci.sys.exec("sensors | grep 'Core 0' | cut -c10-24")%></td></tr>
<tr><td width="33%"><%:Firmware Version%></td><td>
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> /
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>)

View File

@ -15,7 +15,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=coremark
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/eembc/coremark.git
@ -29,17 +29,25 @@ define Package/coremark
CATEGORY:=Utilities
TITLE:=CoreMark Embedded Microprocessor Benchmark
URL:=https://github.com/eembc/coremark
DEPENDS:=@!TARGET_x86
endef
define Package/coremark/description
Embedded Microprocessor Benchmark
endef
DIR_ARCH:=linux
ifeq ($(ARCH),x86_64)
DIR_ARCH:=linux64
endif
ifeq ($(ARCH),aarch64)
DIR_ARCH:=linux64
endif
define Build/Compile
$(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/linux/core_portme.mak
$(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/$(DIR_ARCH)/core_portme.mak
mkdir $(PKG_BUILD_DIR)/$(ARCH)
cp -r $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)
cp -r $(PKG_BUILD_DIR)/$(DIR_ARCH)/* $(PKG_BUILD_DIR)/$(ARCH)
$(MAKE) XCFLAGS="-DMULTITHREAD=8 -DUSE_PTHREAD" -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \
compile
endef