diff --git a/cgminer/Makefile b/cgminer/Makefile index 43b161c..418575f 100644 --- a/cgminer/Makefile +++ b/cgminer/Makefile @@ -12,7 +12,7 @@ PKG_NAME:=cgminer PKG_VERSION:=20120504 PKG_REV:=614328352cf22671401f3f6de14a804b0aa4fdb6 # this is upstream version 2.4.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_INSTALL:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz diff --git a/cgminer/patches/0001-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch.patch b/cgminer/patches/0001-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch.patch deleted file mode 100644 index 0318993..0000000 --- a/cgminer/patches/0001-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/driver-icarus.c b/driver-icarus.c -index b0c3b4f..b2c8503 100644 ---- a/driver-icarus.c -+++ b/driver-icarus.c -@@ -356,7 +356,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work, - return ESTIMATE_HASHES; - } - --#ifndef __BIG_ENDIAN__ -+#if !defined (__BIG_ENDIAN__) && !defined(MIPSEB) - nonce = swab32(nonce); - #endif - diff --git a/cgminer/patches/0001-work_decode-only-needs-swab32-on-midstate-under-BIG-.patch b/cgminer/patches/0001-work_decode-only-needs-swab32-on-midstate-under-BIG-.patch new file mode 100644 index 0000000..9f47e9c --- /dev/null +++ b/cgminer/patches/0001-work_decode-only-needs-swab32-on-midstate-under-BIG-.patch @@ -0,0 +1,48 @@ +From 9414fa7c182eef279e4b21d3c3edeb11461af5bd Mon Sep 17 00:00:00 2001 +From: Xiangfu +Date: Fri, 11 May 2012 11:00:14 +0800 +Subject: [PATCH 1/2] work_decode only needs swab32 on midstate under BIG + ENDIAN + +--- + cgminer.c | 17 +++++------------ + 1 files changed, 5 insertions(+), 12 deletions(-) + +diff --git a/cgminer.c b/cgminer.c +index 118747b..d8b8e6f 100644 +--- a/cgminer.c ++++ b/cgminer.c +@@ -1182,6 +1182,11 @@ static bool work_decode(const json_t *val, struct work *work) + sha2_starts( &ctx, 0 ); + sha2_update( &ctx, data.c, 64 ); + memcpy(work->midstate, ctx.state, sizeof(work->midstate)); ++#if defined(__BIG_ENDIAN__) || defined(MIPSEB) ++ int i; ++ for (i = 0; i < 8; i++) ++ (((uint32_t*) (work->midstate))[i]) = swab32(((uint32_t*) (work->midstate))[i]); ++#endif + } + + if (likely(!jobj_binary(val, "hash1", work->hash1, sizeof(work->hash1), false))) { +@@ -1196,18 +1201,6 @@ static bool work_decode(const json_t *val, struct work *work) + + memset(work->hash, 0, sizeof(work->hash)); + +-#ifdef __BIG_ENDIAN__ +- int swapcounter = 0; +- for (swapcounter = 0; swapcounter < 32; swapcounter++) +- (((uint32_t*) (work->data))[swapcounter]) = swab32(((uint32_t*) (work->data))[swapcounter]); +- for (swapcounter = 0; swapcounter < 16; swapcounter++) +- (((uint32_t*) (work->hash1))[swapcounter]) = swab32(((uint32_t*) (work->hash1))[swapcounter]); +- for (swapcounter = 0; swapcounter < 8; swapcounter++) +- (((uint32_t*) (work->midstate))[swapcounter]) = swab32(((uint32_t*) (work->midstate))[swapcounter]); +- for (swapcounter = 0; swapcounter < 8; swapcounter++) +- (((uint32_t*) (work->target))[swapcounter]) = swab32(((uint32_t*) (work->target))[swapcounter]); +-#endif +- + gettimeofday(&work->tv_staged, NULL); + + return true; +-- +1.7.5.4 + diff --git a/cgminer/patches/0002-add-MIPSEB-to-icarus-for-BIG_ENDIAN.patch b/cgminer/patches/0002-add-MIPSEB-to-icarus-for-BIG_ENDIAN.patch new file mode 100644 index 0000000..f2380dd --- /dev/null +++ b/cgminer/patches/0002-add-MIPSEB-to-icarus-for-BIG_ENDIAN.patch @@ -0,0 +1,25 @@ +From b1785d1f07d9482b5ed6104c87b39a3888fa8efb Mon Sep 17 00:00:00 2001 +From: Xiangfu +Date: Fri, 11 May 2012 11:04:28 +0800 +Subject: [PATCH 2/2] add-MIPSEB-to-icarus-for-BIG_ENDIAN + +--- + driver-icarus.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/driver-icarus.c b/driver-icarus.c +index dba6617..5ef3300 100644 +--- a/driver-icarus.c ++++ b/driver-icarus.c +@@ -350,7 +350,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work, + return ESTIMATE_HASHES; + } + +-#ifndef __BIG_ENDIAN__ ++#if !defined (__BIG_ENDIAN__) && !defined(MIPSEB) + nonce = swab32(nonce); + #endif + +-- +1.7.5.4 +