summaryrefslogtreecommitdiff
path: root/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'usrp')
-rwxr-xr-xusrp/firmware/src/common/build_eeprom.py18
-rw-r--r--usrp/firmware/src/usrp2/Makefile.am4
-rw-r--r--usrp/host/lib/db_wbxng_adf4350_regs.cc22
-rw-r--r--usrp/host/lib/db_wbxng_adf4350_regs.h22
4 files changed, 54 insertions, 12 deletions
diff --git a/usrp/firmware/src/common/build_eeprom.py b/usrp/firmware/src/common/build_eeprom.py
index 023c4b3f5..ed9bb56a4 100755
--- a/usrp/firmware/src/common/build_eeprom.py
+++ b/usrp/firmware/src/common/build_eeprom.py
@@ -140,12 +140,12 @@ def build_eeprom_image (filename, rev):
assert (len (image) <= 256)
return image
-def build_shell_script (out, ihx_filename, rev):
+def build_shell_script (out, ihx_filename, rev, prefix):
image = build_eeprom_image (ihx_filename, rev)
out.write ('#!/bin/sh\n')
- out.write ('usrper -x load_firmware /usr/local/share/usrp/rev%d/std.ihx\n' % rev)
+ out.write ('usrper -x load_firmware ' + prefix + '/share/usrp/rev%d/std.ihx\n' % rev)
out.write ('sleep 1\n')
# print "len(image) =", len(image)
@@ -164,8 +164,10 @@ def build_shell_script (out, ihx_filename, rev):
out.write ('sleep 1\n')
if __name__ == '__main__':
- usage = "usage: %prog -r REV [options] bootfile.ihx"
+ usage = "usage: %prog -p PREFIX -r REV [options] bootfile.ihx"
parser = OptionParser (usage=usage)
+ parser.add_option ("-p", "--prefix", type="string", default="",
+ help="Specify install prefix from configure")
parser.add_option ("-r", "--rev", type="int", default=-1,
help="Specify USRP revision number REV (2 or 4)")
(options, args) = parser.parse_args ()
@@ -176,7 +178,15 @@ if __name__ == '__main__':
sys.stderr.write (
"You must specify the USRP revision number (2 or 4) with -r REV\n")
sys.exit (1)
+ if options.prefix == "":
+ sys.stderr.write (
+ "You must specify the install prefix with -p PREFIX\n")
+ sys.exit (1)
+ if not os.path.isdir(options.prefix):
+ sys.stderr.write (
+ "PREFIX dir (" + options.prefix + "), does not exist\n")
+ sys.exit (1)
ihx_filename = args[0]
- build_shell_script (sys.stdout, ihx_filename, options.rev)
+ build_shell_script (sys.stdout, ihx_filename, options.rev, options.prefix)
diff --git a/usrp/firmware/src/usrp2/Makefile.am b/usrp/firmware/src/usrp2/Makefile.am
index e380b1907..4402cd636 100644
--- a/usrp/firmware/src/usrp2/Makefile.am
+++ b/usrp/firmware/src/usrp2/Makefile.am
@@ -108,11 +108,11 @@ eeprom_boot.ihx: $(EEPROM_BOOT_OBJS) $(LIBDEP)
$(XCC) $(LINKOPTS) -o $@ $(EEPROM_BOOT_OBJS)
burn-usrp2-eeprom: eeprom_boot.ihx
- $(PYTHON) $(srcdir)/../common/build_eeprom.py -r2 eeprom_boot.ihx > $@
+ $(PYTHON) $(srcdir)/../common/build_eeprom.py -p$(prefix) -r2 eeprom_boot.ihx > $@
chmod +x $@
burn-usrp4-eeprom: eeprom_boot.ihx
- $(PYTHON) $(srcdir)/../common/build_eeprom.py -r4 eeprom_boot.ihx > $@
+ $(PYTHON) $(srcdir)/../common/build_eeprom.py -p$(prefix) -r4 eeprom_boot.ihx > $@
chmod +x $@
diff --git a/usrp/host/lib/db_wbxng_adf4350_regs.cc b/usrp/host/lib/db_wbxng_adf4350_regs.cc
index bc859158e..21d77dcce 100644
--- a/usrp/host/lib/db_wbxng_adf4350_regs.cc
+++ b/usrp/host/lib/db_wbxng_adf4350_regs.cc
@@ -1,6 +1,22 @@
-/*
- * Copyright 2009 Ettus Research LLC
- */
+//
+// Copyright 2009 Free Software Foundation, Inc.
+//
+// This file is part of GNU Radio
+//
+// GNU Radio is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either asversion 3, or (at your option)
+// any later version.
+//
+// GNU Radio is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GNU Radio; see the file COPYING. If not, write to
+// the Free Software Foundation, Inc., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
#include "db_wbxng_adf4350_regs.h"
#include "db_wbxng_adf4350.h"
diff --git a/usrp/host/lib/db_wbxng_adf4350_regs.h b/usrp/host/lib/db_wbxng_adf4350_regs.h
index 3973b4d6b..0018aa07f 100644
--- a/usrp/host/lib/db_wbxng_adf4350_regs.h
+++ b/usrp/host/lib/db_wbxng_adf4350_regs.h
@@ -1,6 +1,22 @@
-/*
- * Copyright 2009 Ettus Research LLC
- */
+//
+// Copyright 2009 Free Software Foundation, Inc.
+//
+// This file is part of GNU Radio
+//
+// GNU Radio is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either asversion 3, or (at your option)
+// any later version.
+//
+// GNU Radio is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GNU Radio; see the file COPYING. If not, write to
+// the Free Software Foundation, Inc., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
#ifndef ADF4350_REGS_H
#define ADF4350_REGS_H