Date:2012-05-16 04:08:31 (11 years 10 months ago)
Author:Xiangfu
Commit:5b1da6f024ae09bcddd10b188537e7a8b1518d49
Message:cgminer: update to 2.4.1

Files: cgminer/Makefile (1 diff)
cgminer/patches/0001-work_decode-only-needs-swab32-on-midstate-under-BIG-.patch (1 diff)
cgminer/patches/0002-add-MIPSEB-to-icarus-for-BIG_ENDIAN.patch (1 diff)

Change Details

cgminer/Makefile
99include $(TOPDIR)/rules.mk
1010
1111PKG_NAME:=cgminer
12PKG_VERSION:=20120504
13PKG_REV:=614328352cf22671401f3f6de14a804b0aa4fdb6
14# this is upstream version 2.4.0
15PKG_RELEASE:=2
12PKG_VERSION:=20120516
13PKG_REV:=b69d735cfe468c489a24677ffef1d6d998818cac
14# this is upstream version 2.4.1
15PKG_RELEASE:=1
1616PKG_INSTALL:=1
1717
1818PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
cgminer/patches/0001-work_decode-only-needs-swab32-on-midstate-under-BIG-.patch
1From 9414fa7c182eef279e4b21d3c3edeb11461af5bd Mon Sep 17 00:00:00 2001
2From: Xiangfu <xiangfu@openmobilefree.net>
3Date: Fri, 11 May 2012 11:00:14 +0800
4Subject: [PATCH 1/2] work_decode only needs swab32 on midstate under BIG
5 ENDIAN
6
7 cgminer.c | 17 +++++------------
8 1 files changed, 5 insertions(+), 12 deletions(-)
9
10diff --git a/cgminer.c b/cgminer.c
11index 118747b..d8b8e6f 100644
12+++ b/cgminer.c
13@@ -1182,6 +1182,11 @@ static bool work_decode(const json_t *val, struct work *work)
14         sha2_starts( &ctx, 0 );
15         sha2_update( &ctx, data.c, 64 );
16         memcpy(work->midstate, ctx.state, sizeof(work->midstate));
17+#if defined(__BIG_ENDIAN__) || defined(MIPSEB)
18+ int i;
19+ for (i = 0; i < 8; i++)
20+ (((uint32_t*) (work->midstate))[i]) = swab32(((uint32_t*) (work->midstate))[i]);
21+#endif
22     }
23
24     if (likely(!jobj_binary(val, "hash1", work->hash1, sizeof(work->hash1), false))) {
25@@ -1196,18 +1201,6 @@ static bool work_decode(const json_t *val, struct work *work)
26
27     memset(work->hash, 0, sizeof(work->hash));
28
29-#ifdef __BIG_ENDIAN__
30- int swapcounter = 0;
31- for (swapcounter = 0; swapcounter < 32; swapcounter++)
32- (((uint32_t*) (work->data))[swapcounter]) = swab32(((uint32_t*) (work->data))[swapcounter]);
33- for (swapcounter = 0; swapcounter < 16; swapcounter++)
34- (((uint32_t*) (work->hash1))[swapcounter]) = swab32(((uint32_t*) (work->hash1))[swapcounter]);
35- for (swapcounter = 0; swapcounter < 8; swapcounter++)
36- (((uint32_t*) (work->midstate))[swapcounter]) = swab32(((uint32_t*) (work->midstate))[swapcounter]);
37- for (swapcounter = 0; swapcounter < 8; swapcounter++)
38- (((uint32_t*) (work->target))[swapcounter]) = swab32(((uint32_t*) (work->target))[swapcounter]);
39-#endif
40-
41     gettimeofday(&work->tv_staged, NULL);
42
43     return true;
441.7.5.4
45
cgminer/patches/0002-add-MIPSEB-to-icarus-for-BIG_ENDIAN.patch
1From b1785d1f07d9482b5ed6104c87b39a3888fa8efb Mon Sep 17 00:00:00 2001
2From: Xiangfu <xiangfu@openmobilefree.net>
3Date: Fri, 11 May 2012 11:04:28 +0800
4Subject: [PATCH 2/2] add-MIPSEB-to-icarus-for-BIG_ENDIAN
5
6 driver-icarus.c | 2 +-
7 1 files changed, 1 insertions(+), 1 deletions(-)
8
9diff --git a/driver-icarus.c b/driver-icarus.c
10index dba6617..5ef3300 100644
11+++ b/driver-icarus.c
12@@ -350,7 +350,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work,
13         return ESTIMATE_HASHES;
14     }
15
16-#ifndef __BIG_ENDIAN__
17+#if !defined (__BIG_ENDIAN__) && !defined(MIPSEB)
18     nonce = swab32(nonce);
19 #endif
20
211.7.5.4
22

Archive Download the corresponding diff file



interactive