From 1e3cb86432ee1d695a12fd99590206e43caab2cc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 4 Feb 2012 15:12:37 -0800 Subject: uhd: added/renamed various readme files --- README.txt | 19 ++++++++++++++ firmware/README | 6 ----- firmware/README.txt | 31 +++++++++++++++++++++++ fix-copyright-years | 71 ----------------------------------------------------- fpga/README | 4 --- images/README | 25 ------------------- images/README.txt | 25 +++++++++++++++++++ 7 files changed, 75 insertions(+), 106 deletions(-) create mode 100644 README.txt delete mode 100644 firmware/README create mode 100644 firmware/README.txt delete mode 100755 fix-copyright-years delete mode 100644 fpga/README delete mode 100644 images/README create mode 100644 images/README.txt diff --git a/README.txt b/README.txt new file mode 100644 index 000000000..64066d522 --- /dev/null +++ b/README.txt @@ -0,0 +1,19 @@ +######################################################################## +## Welcome to the USRP source code tree +######################################################################## + +host/ + + Description: source code for user-space driver + +firmware/ + + Description: source code for various micro processors + +fpga/ + + Description: source code for FPGA designs + +images/ + + Description: package builder for FPGA and firmware images diff --git a/firmware/README b/firmware/README deleted file mode 100644 index 251486955..000000000 --- a/firmware/README +++ /dev/null @@ -1,6 +0,0 @@ -######################################################################## -# Firmware for USRP devices -######################################################################## - -fx2 - firmware for USRP1 -zpu - firmware for USRP2 and N Series diff --git a/firmware/README.txt b/firmware/README.txt new file mode 100644 index 000000000..1c233de1d --- /dev/null +++ b/firmware/README.txt @@ -0,0 +1,31 @@ +######################################################################## +# Firmware for USRP devices +######################################################################## + +fx2/ + + Description: firmware for FX2 device + + Devices: USRP1 and B100 + + Tools: sdcc, cmake + + Build Instructions: + 1) mkdir + 2) cd + 3) cmake + 4) make + +zpu/ + + Description: firmware for soft CPU in FPGA + + Devices: USRP2 and N Series + + Tools: zpu-gcc, cmake + + Build Instructions: + 1) mkdir + 2) cd + 3) cmake + 4) make diff --git a/fix-copyright-years b/fix-copyright-years deleted file mode 100755 index 97630041b..000000000 --- a/fix-copyright-years +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python - -import re -import optparse -import datetime -import subprocess -import multiprocessing - -co_line_matcher = re.compile('^.*Copyright (.*) Ettus Research LLC$') - -def command(*args): return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0] - -def get_co_line(lines): - for i, line in enumerate(lines[:5]): - if co_line_matcher.match(line): return line, i - return None, None - -def fix_co_years(files, keep_years): - for file in files: - print file - lines = open(file).readlines() - line, num = get_co_line(lines) - if line is None: continue - - #extract the years from the git history - log_years = map( - lambda l: int(l.split()[-2]), - filter( - lambda l: l.startswith('Date'), - command('git', 'log', file).splitlines(), - ), - ) - log_years = min(log_years), max(log_years) - - #extract years from co string - try: - co_years_str = co_line_matcher.match(line).groups()[0] - co_years = map(int, co_years_str.split('-')) - co_years = min(co_years), max(co_years) - except Exception, e: - print ' format error on line %d: "%s"'%(num, line), e - continue - - #keep years means log years is a superset - if keep_years: log_years = min(co_years+log_years), max(co_years+log_years) - - if log_years != co_years: - print ' log years: %s != copyright years: %s'%(log_years, co_years) - year_now = datetime.datetime.now().year - all_years = min(log_years), max(list(log_years)+[year_now]) #add the current year - all_years_str = '%s-%s'%all_years - if all_years[0] == all_years[1]: all_years_str = str(all_years[0]) - new_text = ''.join(lines[:num] + [line.replace(co_years_str, all_years_str)] + lines[num+1:]) - open(file, 'w').write(new_text) - -if __name__ == "__main__": - parser = optparse.OptionParser(usage="usage: %prog [options] path") - parser.add_option("-k", "--keep", action="store_true", help="keep copyright years", default=False) - (options, args) = parser.parse_args() - - #get recursive list of files in the repo - files = command('git', 'ls-tree', '--name-only', 'HEAD', '-r', args[0]).splitlines() - - #start n+1 processes to handle the files - num_procs = multiprocessing.cpu_count() - procs = [multiprocessing.Process( - target=lambda *files: fix_co_years(files, keep_years=options.keep), - args=files[num::num_procs], - ) for num in range(num_procs)] - map(multiprocessing.Process.start, procs) - map(multiprocessing.Process.join, procs) diff --git a/fpga/README b/fpga/README deleted file mode 100644 index aacafecfd..000000000 --- a/fpga/README +++ /dev/null @@ -1,4 +0,0 @@ -This is a placeholder for the fpga code (verilog, makefiles, corgens...) - -The layout should have a common library and various top level builds -and testbenches that are organized hierarchically. diff --git a/images/README b/images/README deleted file mode 100644 index 2f9c6a95e..000000000 --- a/images/README +++ /dev/null @@ -1,25 +0,0 @@ -The images directory contains the following: - - a Makefile for building firmware and fpga images - - a CMake file for building an images package - -The Makefile and build systems for the images are probably Unix specific. -Its best to build the images on a Unix system with standard build tools. -The CMake package target will create an images package for your system. - -To build the images (unix): - make clean - make images - -To build the package (unix): - mkdir build - cd build - cmake -DCPACK_GENERATOR= ../ - make package - -The package generator types are described here: - http://www.cmake.org/Wiki/CMake:CPackPackageGenerators - -Fedora note: - The sdcc binaries are prefixed with "sdcc-" which breaks the build. - However, /usr/libexec/sdcc contains properly named sdcc binaries. - export PATH=${PATH}:/usr/libexec/sdcc diff --git a/images/README.txt b/images/README.txt new file mode 100644 index 000000000..2f9c6a95e --- /dev/null +++ b/images/README.txt @@ -0,0 +1,25 @@ +The images directory contains the following: + - a Makefile for building firmware and fpga images + - a CMake file for building an images package + +The Makefile and build systems for the images are probably Unix specific. +Its best to build the images on a Unix system with standard build tools. +The CMake package target will create an images package for your system. + +To build the images (unix): + make clean + make images + +To build the package (unix): + mkdir build + cd build + cmake -DCPACK_GENERATOR= ../ + make package + +The package generator types are described here: + http://www.cmake.org/Wiki/CMake:CPackPackageGenerators + +Fedora note: + The sdcc binaries are prefixed with "sdcc-" which breaks the build. + However, /usr/libexec/sdcc contains properly named sdcc binaries. + export PATH=${PATH}:/usr/libexec/sdcc -- cgit v1.2.3