diff options
Diffstat (limited to 'usrp/firmware')
-rw-r--r-- | usrp/firmware/include/usrp_ids.h | 3 | ||||
-rwxr-xr-x | usrp/firmware/src/common/build_eeprom.py | 22 | ||||
-rw-r--r-- | usrp/firmware/src/usrp2/Makefile.am | 4 |
3 files changed, 21 insertions, 8 deletions
diff --git a/usrp/firmware/include/usrp_ids.h b/usrp/firmware/include/usrp_ids.h index 4f9ac4f9d..46a069434 100644 --- a/usrp/firmware/include/usrp_ids.h +++ b/usrp/firmware/include/usrp_ids.h @@ -54,6 +54,9 @@ #define USB_PID_FSF_BDALE_7 0x0011 // Bdale Garbee <bdale@gag.com> #define USB_PID_FSF_BDALE_8 0x0012 // Bdale Garbee <bdale@gag.com> #define USB_PID_FSF_BDALE_9 0x0013 // Bdale Garbee <bdale@gag.com> +#define USB_PID_FSF_HPSDR_HERMES 0x0014 // HPSDR Hermes +#define USB_PID_FSF_THINKRF 0x0015 // Catalin Patulea <catalin.patulea@thinkrf.com> +#define USB_PID_FSF_MSA 0x0016 // Hans de Bok <hdbok@dionaea.demon.nl> Scotty's Modular Spectrum Analyzer #define USB_PID_FSF_LBNL_UXO 0x0018 // http://recycle.lbl.gov/~ldoolitt/uxo/ diff --git a/usrp/firmware/src/common/build_eeprom.py b/usrp/firmware/src/common/build_eeprom.py index 023c4b3f5..d73cbbc4f 100755 --- a/usrp/firmware/src/common/build_eeprom.py +++ b/usrp/firmware/src/common/build_eeprom.py @@ -140,13 +140,13 @@ 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 ('sleep 1\n') + out.write ('usrper -x load_firmware ' + prefix + '/share/usrp/rev%d/std.ihx\n' % rev) + out.write ('sleep 2\n') # print "len(image) =", len(image) @@ -161,11 +161,13 @@ def build_shell_script (out, ihx_filename, rev): (i2c_addr, rom_addr, ''.join (hex_image[0:l]))) hex_image = hex_image[l:] rom_addr = rom_addr + l - out.write ('sleep 1\n') + out.write ('sleep 2\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 $@ |