diff options
| author | Damien Walsh <me@damow.net> | 2013-06-27 02:57:15 -0700 |
|---|---|---|
| committer | Damien Walsh <me@damow.net> | 2013-06-27 02:57:15 -0700 |
| commit | 22d78b72515a0bbc6a20c872c60a35b2bbf830ea (patch) | |
| tree | b604d4c2123032ad14e4b42c9024c157e5e9f0ea | |
| parent | e4d9765a8d9527e7703407039aed246be1206af4 (diff) | |
| parent | 2a97c01e22bcc0770e108008c095096742981175 (diff) | |
Adding support for hackrf (tested, builds OK).
| -rw-r--r-- | Vagrantfile | 3 | ||||
| -rw-r--r-- | cookbooks/gnuradio/attributes/default.rb | 1 | ||||
| -rw-r--r-- | cookbooks/gnuradio/recipes/default.rb | 47 |
3 files changed, 51 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile index ef51993..5366668 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,9 +7,12 @@ Vagrant.configure('2') do |config| config.ssh.forward_x11 = true config.vm.provider 'virtualbox' do |v| + v.customize ['modifyvm', :id, '--cpus', 1] + v.customize ['modifyvm', :id, '--memory', 1024] v.customize ['modifyvm', :id, '--usb', 'on'] v.customize ['modifyvm', :id, '--usbehci', 'on'] v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'rtl2832u', '--vendorid', '0x0bda'] + v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'Great Scott Gadgets HackRF [0100]', '--vendorid', '0x1D50', '--product', '0x604B'] end config.vm.provision :chef_solo do |chef| diff --git a/cookbooks/gnuradio/attributes/default.rb b/cookbooks/gnuradio/attributes/default.rb index 648836e..049cac5 100644 --- a/cookbooks/gnuradio/attributes/default.rb +++ b/cookbooks/gnuradio/attributes/default.rb @@ -4,3 +4,4 @@ default[:repos][:gnuradio] = 'http://gnuradio.org/git/gnuradio.git' default[:repos][:rtlsdr] = 'git://git.osmocom.org/rtl-sdr' default[:repos][:gr_osmosdr] = 'git://git.osmocom.org/gr-osmosdr' default[:repos][:gqrx] = 'git://github.com/csete/gqrx.git' +default[:repos][:hackrf] = 'https://github.com/mossmann/hackrf.git' diff --git a/cookbooks/gnuradio/recipes/default.rb b/cookbooks/gnuradio/recipes/default.rb index e936588..3bebda9 100644 --- a/cookbooks/gnuradio/recipes/default.rb +++ b/cookbooks/gnuradio/recipes/default.rb @@ -26,6 +26,15 @@ git 'Checkout rtl-sdr' do group 'vagrant' end +git 'Checkout hackrf' do + repository node[:repos][:hackrf] + reference 'master' + action :checkout + destination node[:workingdir] + '/hackrf' + user 'vagrant' + group 'vagrant' +end + git 'Checkout gr-osmosdr' do repository node[:repos][:gr_osmosdr] reference 'master' @@ -64,6 +73,44 @@ bash 'Install rtl-sdr' do EOH end +bash 'Compile libhackrf' do + user 'vagrant' + group 'vagrant' + cwd node[:workingdir] + '/hackrf/host/libhackrf' + code <<-EOH + cmake . + make clean + make + EOH +end + +bash 'Install libhackrf' do + cwd node[:workingdir] + '/hackrf/host/libhackrf' + code <<-EOH + make install + ldconfig + EOH +end + +bash 'Compile hackrf-tools' do + user 'vagrant' + group 'vagrant' + cwd node[:workingdir] + '/hackrf/host/hackrf-tools' + code <<-EOH + cmake . + make clean + make + EOH +end + +bash 'Install hackrf-tools' do + cwd node[:workingdir] + '/hackrf/host/hackrf-tools' + code <<-EOH + make install + ldconfig + EOH +end + bash 'Compile GNU Radio' do user 'vagrant' group 'vagrant' |
