Build Hackrf Lib & Tools on Kali 2.0

Kali 2.0 has installed Hackrf driver, uninstall it first~

sudo apt-get remove hackrf

Install dependences:

sudo apt-get install git build-essential cmake libusb-1.0-0-dev liblog4cpp5-dev libboost-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev swig pgk-config libudev-dev -y

Choose your working path and clone the code:

cd ~
git clone https://github.com/mossmann/hackrf.git

Build: (Before inputing every commands, confirm that there is no error first.)

cd hackrf/host
mkdir build && cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig

Tips:

1) Use DINSTALL_UDEV_RULES=ON to allow accessing USB device without root privilage.

2) After running make, you will find bin files in the ‘~/hackrf/host/build’ folder (in libhackrf/src & hacrf-tools/src)

3) To build hackrf-tools only, follow this:

cd ~/hackrf/host/hackrf-tools
mkdir build && cd build
cmake ../
make

You will get bin files in ‘~/hackrf/host/hackrf-tools/build/src/’.

Build your own modified source codes by this way.

To modify build config, edit CMakeLists.txt.

标签: none

评论已关闭