Saturday, December 28, 2013

Compiling obj-c 2.0 with Foundation Kit on xubuntu 12.04 LTS with clang & llvm

This was tricky for me, so I am posting a guide as usual.

1. sudo apt-get install subversion
2. sudo apt-get install build-essential
3. sudo apt-get install pacman
4. sudo apt-get install libobjc2
5. sudo apt-get install clang

6. Then follow the instructions here:
        http://clang.llvm.org/get_started.html


Here is a sample program:

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{

    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        
    }
    return 0;

}

Save it as main.m and to compile it do:

sudo clang main.m `gnustep-config --objc-flags` `gnustep-config --objc-libs` -x objective-c -fconstant-string-class=NSConstantString -fobjc-nonfragile-abi -fblocks -lgnustep-base -lgnustep-gui -ldispatch -I /usr/include/GNUstep -L /usr/lib/GNUstep

it will create a file called a.out, to run it do:

sudo ./a.out

References:
http://sohanikh.blogspot.com/2013/02/how-to-build-llvm-from-source-on-ubuntu.html
http://clang.llvm.org/get_started.html
http://stackoverflow.com/questions/14921482/clang-compiling-error-undefined-reference-to-objc-autoreleasepoolpush

Saturday, December 14, 2013

3930k GA-x79-UP5 Hackintosh 10.9 Mavericks

There was some trouble for me to get this up and running, so I am posting some clarifications on how to do it.

1. The ram that you choose doesn't matter, at least in my experience, I tried 4 different brands at different speeds and they all worked.
The motherboard does matter, I tried with an ASRock x79 Extreme4 and couldn't enter the installer.

2. I used 
tonymacx86's guide:
http://www.tonymacx86.com/374-unibeast-install-os-x-mavericks-any-supported-intel-based-pc.html

And Dingleberry's guide:
http://www.tonymacx86.com/user-builds/93089-new-success-dingleberrys-content-creator-build-ga-x79s-up5-x79-c606-i7-3930k-32gb-gtx670.html

4. For GPU I got a ASUS nvidia 240 gt off of ebay for 60$.
    For mobo I used GA-x79-UP5 off of ebay for 220$.
    For CPU 3930k
    Everything else choice doesn't matter(case,psu,hd etc)

5. When starting up, and you get to the screen where you can choose to boot from your usb stick, you need to type in 

-v GraphicsEnabler=No npci=0x3000 cpus=1

Then hit enter.
This isn't listed in the guide and is necessary to progress.

6. In verbose mode when you get to the part where it says cannot load bootcache just wait, it takes a little bit to progress to the next part.


7. After you go through the general guide you need to disable EIST in the bios, and then apply the VoodooTSCSync.kext using KextBeast, both are in Dingleberry's post. Disabling EIST will run your cpu at what you set it in the bios instead of 1.3Ghz, and VoodooTSCSync.kext is supposed to enable all six cores on the 3930k so you do not have to boot with cpus=1.

8. Setup I used:



9. Right now I am still booting with -v GraphicsEnabler=No npci=0x3000,
but you can edit the org.chameleon.Boot.plist, and put '-v GraphicsEnabler=No npci=0x3000' for the string under the 'Kernel Flags' key. Then you don't need to type anything when the comp boots up.


10. To get sound working use this link
http://www.tonymacx86.com/audio/99315-ga-x79s-up5-ml-10-8-3-3970x-no-sound.html


Good luck!







Saturday, December 7, 2013

BFL Jalapeno Xubuntu Mining

In April 2013, I saw that asics were shipping for mining bitcoin. I ordered a Jalapeno, which came in Sept 2013. After mining with it for about two weeks using cgminer for OSX I tried to sell it on ebay, but people would just keep bidding and not paying after the auction ended.

So I set it up on my linux server to mine and here are the steps to do it.

I had help from reading this guide, I am going to copy and paste some of the steps incase that page disappears so this guide doesn't become fragmented.

https://coinaxis.com/index.php/tutorials/entry/how-to-configure-linux-and-build-cgminer-for-bitcoin-and-litecoin

1. Create a usb install key for Xubuntu 12.04 using 'linux live usb creator' on Windows.
2. Install it on a pc and boot to it.
3. Open a Terminal window and type these commands

sudo apt-get install libcurl4-openssl-dev pkg-config libtool libncurses5-dev libudev-dev screen xterm
sudo apt-get install git-core
sudo apt-get install openssh-server byobu
sudo apt-get install autoconf
sudo apt-get install automake

git clone https://github.com/ckolivas/cgminer
cd cgminer
./autogen.sh

CFLAGS="-O2 -Wall -march=native" ./configure --enable-scrypt --enable-bflsc --enable-bitforce
sudo make
sudo make install

sudo usermod -G plugdev -a yourusernamehere

sudo cp 01-cgminer.rules /etc/udev/rules.d/

sudo reboot



4. After reboot open another terminal window and type



cd cgminer
./cgminer



5. Then enter in your pool information. If you want to mine bitcoin make an account at btcguild.com. I am going to use the asic to mine Peercoin and will evaluate some pools before I post one here.