标签 bitcoin 下的文章

porting cgminer to arm9(steps)

前段时间把cgminer移植到了arm9芯片上,我这里用的是micro2440的开发板。运行很多天后,基本没有问题。今天把移植的步骤总结下,免得忘记了。

1.download packages
因为cgminer需要一些依赖包,所以一并下载下来。具体依赖参考cgminier的github为主。

Cgminer

CURL

Jansson

ncurses

版本参考:

CURL: 7.30.0

Jansson: 2.4

ncurses: 5.9

2.Porting CURL

#!/bin/sh 
./configure --prefix=/home/blackrose/cgminer-port --disable-debug --disable-ldap --disable-ldaps --disable-rtsp \
--disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp \
--disable-gopher --with-gnu-ld --host=arm-linux
make
make install

3.Porting Jansson

#!/bin/sh
./configure --prefix=/home/blackrose/cgminer-port --with-gnu-ld --host=arm-linux
make
make install

4.Porting ncurses

#!/bin/sh
./configure --prefix=/home/blackrose/cgminer-port --with-gnu-ld --host=arm-linux \
--without-ada --without-tests --enable-pc-files --enable-widec --with-shared
make
make install

5.Porting CGminer

#!/bin/sh
export PKG_CONFIG_PATH=/home/blackrose/cgminer-port:${PKG_CONFIG_PATH}
export LIBCURL_CFLAGS=-I/home/blackrose/cgminer-port/include
export LD_LIBRARY_PATH=/home/blackrose/cgminer-port/lib${LD_LIBRARY_PATH}
./configure --prefix=/home/blackrose/cgminer-port --disable-opencl --disable-adl --disable-cpumining \
--disable-bflsc --disable-bitforce --enable-icarus --disable-ztex \
--disable-option-checking --with-gnu-ld --host=arm-linux
make
make install

6.Running cgminer

./cgminer -c ozco.conf -S /dev/ttyUSB0

First time to buy stock in my life

长这么大,第一次买股票,各种小心翼翼啊。玩了几天后,确实学到了不少东西,比如说交易相关的英文词汇。还是那句话,股市有风险,入市需谨慎!

how to mining as p2pool method

自从加入挖矿大军后,就不断地尝试各种方法去挖矿,江湖传言,p2pool挖矿是比较难的方法之一,主要在于配置繁杂。下面是我配置p2pool挖矿的步骤,仅供参考。

1.Install three software packages

These are cgminer, bincoin client and p2pool.You can find it on google or github.Just install these follow each steps.

2.Prepare work1

Firstly, sync all block data from internet, when you intalled bitcoin client.This may be spent some hours.A tip, you need have a space disk to store these block data.I recommend you use next command:

bitcoin-qt -datadir=/media/work1/btcblock

The block data will store to btcblock directory in here.

Secondly, configure your bitcoin client as a server.Here, you need to write a config file and put it under btcblock directory.

bitcoin.conf
rpcuser=abc
rpcpassword=123
server=1

Next is restart bitcoin client.

bitcoin-qt -conf=/media/work1/btcblock/bitcoin.conf -datadir=/media/work1/btcblock -server

3.Prepare work2

Thirdly, execute the p2pool software.

python run_p2pool.py -a your_bitcoin_addr abc 123

That bitcoin addr was created by bitcoin client.You must be write correct rpcuse and rpcpasword.The reason is bitcoin doesn't use default directory as work directory to store config file and block data.

When you see three "success" words, congratulates!

4.Use cgminer to mining

I write a config file instead of parameters.

{
"pools" : [
{
"url" : "127.0.0.1:9332",
"user" : "123",
"pass" : "p2pool"
}
]
}

Save it as p2pool.conf and execute next command:

cgminer -G -c p2pool.conf -S /dev/ttyUSB0

Here, i use Icarus as a miner.That user and pass value is which you want to write.It's not important.

cgminer use stratum protcoal to mining

先吐槽一番,ozco.in的网站注册码很二,竟然是太小敏感的。然后,我就一直被提示验证码错误,出于倔强的本性,我就一直试了N遍,最后就放弃鸟。突然觉悟到,然后就注册成功鸟,我,,,还能说什么啊!

登陆进去后,create worker后,用cgminer连接出现了问题,因为ozco的pool是stratum协议的。

1.Install stratum mining proxy

git clone https://github.com/CryptoManiac/stratum-mining-proxy.git
cd stratum-mining-proxy
sudo python distribute_setup.py

2.Running stratum mining proxy

./mining_proxy -o stratum.ozco.in -p 3333

3.Running cgminer

./cgminer -G -o 127.0.0.1

以上骤就可以用stratum协议来mining了,话说为什么用ozco后速率就降低了呢。

最新文章

最近回复

  • Blackrose: 感谢拍砖!嗯,那句话...
  • aa: “Raspberry...
  • Blackrose: 外部只是帮你把芯片启...
  • : 内部时钟比外部的频率...
  • Blackrose: 你这评论比正文更有内容么
  • 7hao: CR+LF ...
  • Blackrose: 可以是你更新软件源后...
  • sxk: 博主,我的系统是ub...
  • Blackrose: 你深得精髓么
  • qihao: 这篇文章的简单总结就...

分类

归档

其它