Alright... I'm getting a little delayed on the prerelease for cgminer... mingw is a pain in the ass..
Yeah, mingw is most certainly a giant PITA.
To compile cgminer with mingw, the trick is to use msys and get pkg-config and libcurl installed properly
For pkg-config, the best is to install this:
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zipOnce you have that, libcurl is rather easy.
trying a full cygwin install next...
Mmmh. Not sure this'll get you very far.
If your main dev box is windows and your goal is to integrate
phatk into cgminer, your best bet is probably to install a small
virtual machine (qemu or vmplayer) running ubuntu inside your
windows box and work on cgminer directly on Linux in there.
That's exactly what I do (the other way round) when I have to
try windows-specific things or a piece of code.
Yeah, I think I will stay away from using the mingw environment from now on... Cygwin was easy as pie. No issues, I think can cross compile from cygwin using mingw if I want native Win32 support. Apparently, getting pkg-conf (i think) working without POSIX support is terrible. I got my kernel working around 5am last night linking against the cygwin dlls.. so tonight I will release the changes when I get home.
Alright... I'm getting a little delayed on the prerelease for cgminer... mingw is a pain in the ass.. trying a full cygwin install next...
Bear with me, hopefully I'll get it running tomorrow.
-Phateus
You could just tell me what to do to interface it with cgminer (i.e. what new variables you want) and I'd copy most of your kernel across. Only the return code and define macros are actually different in cgminer in the kernel itself.
Yeah, if you want, I can send you the changes tonight so you can put it in your release. The only modifications I had to make to the kernel is changing VECTORS to VECTORS2 , hardcoding OUTPUT_SIZE = 4095 and hardcoding WORKSIZE=256 (I really do need this passed to the kernel though). Also, my kernel only uses WORKSIZE+1 entries in the buffer, it would be better if you made the buffer that size.
As for the changes in the miner, I think I only had to change the precalc_hash() function, the kernel input and output file name, queue_phatk_kernel() function
what I will do tonight, is add KL_PHATK_2_2 to the cl_kernel enum and copy the function code and add the corresponding command line argument (right now I have just replaced PHATK with mine) and add -DWORKSIZE= arguments for the kernel.
Anyway, I will give you more details tonight when I am in front of my code.
My fork is
https://github.com/Phateus/cgminer, I will upload the changes tonight (as soon as I figure out git... never used that before)
-Phateus
P.S. thanks for the easy to read code
