windows-build.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. Building cgminer on Windows 10
  2. ------------------------------
  3. One way to build cgminer on Windows 10 is to use
  4. WSL - Windows Subsystem for Linux
  5. Install WSL:
  6. Either google 'WSL Ubuntu' or visit the Microsft store to download it for free:
  7. https://www.microsoft.com/store/productId/9NBLGGH4MSV6
  8. The 'Get' link will open the 'Microsoft Store' app on your Windows 10 computer
  9. If the above link has changed, go to https://ubuntu.com/wsl to get the link
  10. This will allow you to install WSL for Ubuntu
  11. After installing WSL, enable WSL under 'Windows Features'
  12. - search 'Turn Windows Feaures on' using the windows search bar, at the bottom
  13. left, to find the 'Turn Windows features on or off' control panel
  14. In the control panel, scroll down and click on the check box
  15. 'Windows Subsystem for Linux' to enable it, then on OK
  16. Windows may get some updates then require you to restart for the updates
  17. Once the computer update/restart has completed you will find a 'Ubuntu' option
  18. in the windows menu.
  19. Click on this to install Ubuntu
  20. When it's ready, be sure to give it a username and password you can remember.
  21. Now you will have a Ubuntu terminal login that you can run at any time
  22. using the above 'Ubuntu' menu option in the windows menu.
  23. How to cross compile cgminer using MXE on WSL or linux
  24. ------------------------------------------------------
  25. ** Commands require internet access to download software
  26. ** In Ubuntu, issue the following commands:
  27. sudo apt update
  28. ** Update ubuntu packages with any recent updates:
  29. sudo apt upgrade -y
  30. ** Install git that we use to download some of the required code.
  31. ** It may already be installed:
  32. sudo apt install git
  33. ** Download cgminer - but don't build it yet:
  34. cd
  35. git clone https://github.com/kanoi/cgminer.git
  36. cd cgminer/
  37. ** There is a script in the cgminer directory called mxe.sh
  38. ** This script is used to type some of the long commands required.
  39. ** To see what mxe.sh does just type: cat mxe.sh
  40. ** It is designed specifically for Ubuntu
  41. ** If it needs updating, raise an issue on https://github.com/kanoi/cgminer
  42. ** You can of course type the commands yourself and modify them as needed
  43. ** The next command will install all the extra linux software needed.
  44. ** It downloads each package it requires:
  45. sudo ./mxe.sh a
  46. ** Download MXE and build the libraries cgminer needs:
  47. cd
  48. cgminer/mxe.sh mxe
  49. cd mxe/
  50. ** The versions of MXE after build-2020-06-06 fail to build cmake on WSL
  51. ** You can skip this line if they ever fix that:
  52. git checkout build-2020-06-06
  53. ** This compiles the mxe code needed - it can take a few hours in WSL ...
  54. ** It also downloads each package it needs to build:
  55. ../cgminer/mxe.sh b
  56. ** Build cgminer:
  57. cd
  58. cd cgminer/
  59. autoreconf -fi
  60. ** Next you must decide what miners you need to support - select as few as
  61. ** possible e.g. to select just the Gekko USB miners:
  62. ./mxe.sh c --enable-gekko
  63. ** If instead you wish to build a debug version of cgminer use:
  64. ./mxe.sh d --enable-gekko
  65. ** Then finally build cgminer:
  66. ./mxe.sh make
  67. ** Copy cgminer to your desktop (replace YourUser with your windows username):
  68. cp -v cgminer.exe /mnt/c/Users/YourUser/Desktop/
  69. ** See README for the setup of Zadig for all USB miners on windows
  70. ** To run cgminer, open a cmd window then type:
  71. cd Desktop
  72. ** See README for how to run cgminer.exe
  73. ------------------------------
  74. If you wish to reset the WSL Ubuntu system you created so it will start again
  75. from scratch next time you run it:
  76. Close all your Ubuntu windows, right-click the windows menu 'Ubuntu' app,
  77. select More->App Settings, then in the settings window use the 'Reset' button.