forked from ckolivas/cgminer
-
Notifications
You must be signed in to change notification settings - Fork 35
/
windows-build.txt
134 lines (93 loc) · 4.23 KB
/
windows-build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Building cgminer on Windows 10
------------------------------
One way to build cgminer on Windows 10 is to use
WSL - Windows Subsystem for Linux
Install WSL:
Either google 'WSL Ubuntu' or visit the Microsft store to download it for free:
https://www.microsoft.com/store/productId/9NBLGGH4MSV6
The 'Get' link will open the 'Microsoft Store' app on your Windows 10 computer
If the above link has changed, go to https://ubuntu.com/wsl to get the link
This will allow you to install WSL for Ubuntu
After installing WSL, enable WSL under 'Windows Features'
- search 'Turn Windows Feaures on' using the windows search bar, at the bottom
left, to find the 'Turn Windows features on or off' control panel
In the control panel, scroll down and click on the check box
'Windows Subsystem for Linux' to enable it, then on OK
Windows may get some updates then require you to restart for the updates
Once the computer update/restart has completed you will find a 'Ubuntu' option
in the windows menu.
Click on this to install Ubuntu
When it's ready, be sure to give it a username and password you can remember.
Now you will have a Ubuntu terminal login that you can run at any time
using the above 'Ubuntu' menu option in the windows menu.
How to cross compile cgminer using MXE on WSL or linux
------------------------------------------------------
** Commands require internet access to download software
** In Ubuntu, issue the following commands:
sudo apt update
** Update ubuntu packages with any recent updates:
sudo apt upgrade -y
** Check what version of Ubuntu you are running:
cat /etc/lsb-release
** The steps below and mxe.sh work on Ubuntu 22.04 as at 2024-06
** See the end for information about rebooting
** and upgrading your Ubuntu to a later release if required
** Install git that we use to download some of the required code.
** It may already be installed:
sudo apt install git
** Download cgminer - but don't build it yet:
cd
git clone https://github.com/kanoi/cgminer.git
cd cgminer/
** There is a script in the cgminer directory called mxe.sh
** This script is used to type some of the long commands required.
** To see what mxe.sh does just type: cat mxe.sh
** It is designed specifically for Ubuntu
** If it needs updating, raise an issue on https://github.com/kanoi/cgminer
** You can of course type the commands yourself and modify them as needed
** The next command will install all the extra linux software needed.
** It downloads each package it requires:
sudo ./mxe.sh a
** Download MXE and build the libraries cgminer needs:
cd
cgminer/mxe.sh mxe
cd mxe/
** This compiles the mxe code needed - it can take a few hours in WSL ...
** It also downloads each package it needs to build:
../cgminer/mxe.sh b
** Build cgminer:
cd
cd cgminer/
autoreconf -fi
** Next you must decide what miners you need to support - select as few as
** possible e.g. to select just the Gekko and Icarus USB miners:
./mxe.sh c --enable-gekko --enable-icarus
** If instead you wish to build a debug version of cgminer use:
./mxe.sh d --enable-gekko --enable-icarus
** Then finally build cgminer:
./mxe.sh make
** Copy cgminer to your desktop (replace YourUser with your windows username):
cp -v cgminer.exe /mnt/c/Users/YourUser/Desktop/
** See README for the setup of Zadig for all USB miners on windows
** To run cgminer, open a cmd window then type:
cd Desktop
** See README for how to run cgminer.exe
------------------------------
If you wish to reset the WSL Ubuntu system you created so it will start again
from scratch next time you run it:
Close all your Ubuntu windows, right-click the windows menu 'Ubuntu' app,
select More->App Settings, then in the settings window use the 'Reset' button.
------------------------------
If Ubuntu ever requires a reboot, in the ubuntu window shutdown ubuntu with:
wsl.exe --terminate $WSL_DISTRO_NAME
When you next start Ubuntu from windows it will be the same as a reboot
------------------------------
To check what release of Ubuntu you are running:
cat /etc/lsb-release
To upgrade the Ubuntu release e.g. from v20.04 to v22.04
you must first update it fully and reboot:
sudo apt update
sudo apt upgrade -y
wsl.exe --terminate $WSL_DISTRO_NAME
Next after restarting, to do a release upgrade:
sudo do-release-upgrade