Date:2012-04-08 16:08:52 (8 years 1 month ago)
Author:Xiangfu
Commit:9d550b847a0de57d235b3c5a830e2356b6f17b02
Message:cgminer update to 2.3.2, update the BIT_ENDIAN patch

Files: cgminer/Makefile (2 diffs)
cgminer/patches/0001-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch.patch (2 diffs)
cgminer/patches/0002-Increase-the-MAX_DEVICES-to-64.patch (1 diff)

Change Details

cgminer/Makefile
99include $(TOPDIR)/rules.mk
1010
1111PKG_NAME:=cgminer
12PKG_VERSION:=20120315
13PKG_REV:=22ff7a406951f97af57cbca75d282c4bbf41a3e7
14PKG_RELEASE:=3
12PKG_VERSION:=20120408
13PKG_REV:=ef76ec8a77d473382303b39de1247b75a4c4ae71
14PKG_RELEASE:=1
1515PKG_INSTALL:=1
1616
1717PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
18PKG_SOURCE_URL:=git://github.com/kanoi/cgminer.git
18PKG_SOURCE_URL:=git://github.com/ckolivas/cgminer.git
1919PKG_SOURCE_PROTO:=git
2020PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
2121PKG_SOURCE_VERSION:=$(PKG_REV)
...... 
4747TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
4848
4949define Package/cgminer/install
50    $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/cgminer $(1)/etc/init.d
50    $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
5151
5252    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin
5353    $(INSTALL_BIN) $(FILES_DIR)/cgminer $(1)/etc/init.d
54    $(CP) $(PKG_BUILD_DIR)/miner.php $(1)/usr/share/cgminer
5554endef
5655
5756$(eval $(call BuildPackage,cgminer))
cgminer/patches/0001-add-MIPSED-to-icarus-for-BIG_ENDIAN.patch.patch
1From 01cd959ba71d577c8a13efbdc868b46515c88334 Mon Sep 17 00:00:00 2001
1From 1a19591a7f4cfa873f2c6fe58b48d7588187e4c7 Mon Sep 17 00:00:00 2001
22From: Xiangfu <xiangfu@openmobilefree.net>
33Date: Sun, 19 Feb 2012 22:20:22 +0800
4Subject: [PATCH 1/2] add-MIPSED-to-icarus-for-BIG_ENDIAN.patch
4Subject: [PATCH] add-MIPSED-to-icarus-for-BIG_ENDIAN.patch
55
66---
7 icarus.c | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
7 cgminer.c | 4 ++--
8 icarus.c | 2 +-
9 uthash.h | 2 +-
10 3 files changed, 4 insertions(+), 4 deletions(-)
911
12diff --git a/cgminer.c b/cgminer.c
13index cfb0216..2976092 100644
14--- a/cgminer.c
15@@ -1102,7 +1102,7 @@ static bool work_decode(const json_t *val, struct work *work)
16
17     memset(work->hash, 0, sizeof(work->hash));
18
19-#ifdef __BIG_ENDIAN__
20+#if defined(__BIG_ENDIAN__) || defined(MIPSEB)
21         int swapcounter = 0;
22         for (swapcounter = 0; swapcounter < 32; swapcounter++)
23             (((uint32_t*) (work->data))[swapcounter]) = swab32(((uint32_t*) (work->data))[swapcounter]);
24@@ -1479,7 +1479,7 @@ static bool submit_upstream_work(const struct work *work)
25         return rc;
26     }
27
28-#ifdef __BIG_ENDIAN__
29+#if defined(__BIG_ENDIAN__) || defined(MIPSEB)
30         int swapcounter = 0;
31         for (swapcounter = 0; swapcounter < 32; swapcounter++)
32             (((uint32_t*) (work->data))[swapcounter]) = swab32(((uint32_t*) (work->data))[swapcounter]);
1033diff --git a/icarus.c b/icarus.c
11index 48dabe5..c4c3736 100644
34index 276cd8c..0ad7398 100644
1235--- a/icarus.c
1336+++ b/icarus.c
14@@ -290,7 +290,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work,
37@@ -294,7 +294,7 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work,
1538         if (nonce == 0 && ret)
1639                 return 0xffffffff;
1740
...... 
2044     nonce = swab32(nonce);
2145 #endif
2246     work->blk.nonce = 0xffffffff;
47diff --git a/uthash.h b/uthash.h
48index 4cedb9c..f55fc77 100644
49--- a/uthash.h
50@@ -500,7 +500,7 @@ do {
51 #define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2)
52 #define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3)
53 #define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
54-#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
55+#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) || defined(MIPSEB)
56 #define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
57 #define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
58 #define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8))
2359--
24601.7.5.4
2561
cgminer/patches/0002-Increase-the-MAX_DEVICES-to-64.patch
1From 6334588efe26a774f4ebaac345073f8ad5f9172c Mon Sep 17 00:00:00 2001
2From: Xiangfu <xiangfu@openmobilefree.net>
3Date: Wed, 21 Mar 2012 13:54:53 +0800
4Subject: [PATCH 2/2] Increase the MAX_DEVICES to 64
5
6 miner.h | 2 +-
7 1 files changed, 1 insertions(+), 1 deletions(-)
8
9diff --git a/miner.h b/miner.h
10index 5f5fd68..e1cc07f 100644
11+++ b/miner.h
12@@ -473,7 +473,7 @@ extern int add_pool_details(bool live, char *url, char *user, char *pass);
13 #define ADD_POOL_OK 0
14
15 #define MAX_GPUDEVICES 16
16-#define MAX_DEVICES 32
17+#define MAX_DEVICES 64
18 #define MAX_POOLS (32)
19
20 #define MIN_INTENSITY -10
211.7.5.4
22

Archive Download the corresponding diff file



interactive