diff options
author | Philip Balister <philip@opensdr.com> | 2010-09-09 14:08:20 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-09-09 14:08:20 -0400 |
commit | 262109bc461139448c816f92644a9f748798c4fc (patch) | |
tree | b51367352945b08566ff8501d7ef4b91eb86e4d4 /images | |
parent | d2d5be27b09faee1481a763ce25e7b95460a46c9 (diff) | |
parent | 5058145dcc5cb681887773b8245cf89df58399f9 (diff) | |
download | uhd-262109bc461139448c816f92644a9f748798c4fc.tar.gz uhd-262109bc461139448c816f92644a9f748798c4fc.tar.bz2 uhd-262109bc461139448c816f92644a9f748798c4fc.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile | 55 | ||||
-rw-r--r-- | images/README | 5 |
2 files changed, 60 insertions, 0 deletions
diff --git a/images/Makefile b/images/Makefile index 6ab54e6ac..57277e787 100644 --- a/images/Makefile +++ b/images/Makefile @@ -31,8 +31,57 @@ CMAKE_BUILD_DIR = $(TOP_DIR)/build IMAGES_LIST = ######################################################################## +# Utility Checks +######################################################################## +ifeq ($(shell sdcc --help > /dev/null 2>&1 && echo $$?),0) + HAS_SDCC=1 +endif + +ifeq ($(shell mb-gcc --help > /dev/null 2>&1 && echo $$?),0) + HAS_MB_GCC=1 +endif + +ifeq ($(shell xtclsh -h > /dev/null 2>&1 && echo $$?),0) + HAS_XTCLSH=1 +endif + +######################################################################## +# USRP1 firmware +######################################################################## +ifdef HAS_SDCC + +_usrp1_fw_dir = $(TOP_FW_DIR)/fx2 +_usrp1_fw_ihx = $(BUILT_IMAGES_DIR)/usrp1_fw.ihx +IMAGES_LIST += $(_usrp1_fw_ihx) + +$(_usrp1_fw_ihx): + cd $(_usrp1_fw_dir) && ./bootstrap + cd $(_usrp1_fw_dir) && ./configure + make -C $(_usrp1_fw_dir) clean + make -C $(_usrp1_fw_dir) all + cp $(_usrp1_fw_dir)/src/usrp1/std.ihx $@ + +endif + +######################################################################## +# USRP1 fpga +######################################################################## +_usrp1_fpga_dir = $(TOP_FPGA_DIR)/usrp1/rbf/rev4 +_usrp1_fpga_rbf = $(BUILT_IMAGES_DIR)/usrp1_fpga.rbf +_usrp1_fpga_4rx_rbf = $(BUILT_IMAGES_DIR)/usrp1_fpga_4rx.rbf +IMAGES_LIST += $(_usrp1_fpga_rbf) $(_usrp1_fpga_4rx_rbf) + +$(_usrp1_fpga_rbf): + cp $(_usrp1_fpga_dir)/std_2rxhb_2tx.rbf $@ + +$(_usrp1_fpga_4rx_rbf): + cp $(_usrp1_fpga_dir)/std_4rx_0tx.rbf $@ + +######################################################################## # USRP2 firmware ######################################################################## +ifdef HAS_MB_GCC + _usrp2_fw_dir = $(TOP_FW_DIR)/microblaze _usrp2_fw_bin = $(BUILT_IMAGES_DIR)/usrp2_fw.bin IMAGES_LIST += $(_usrp2_fw_bin) @@ -44,9 +93,13 @@ $(_usrp2_fw_bin): make -C $(_usrp2_fw_dir) all cp $(_usrp2_fw_dir)/usrp2/usrp2_txrx_uhd.bin $@ +endif + ######################################################################## # USRP2 fpga ######################################################################## +ifdef HAS_XTCLSH + _usrp2_fpga_dir = $(TOP_FPGA_DIR)/usrp2/top/u2_rev3 _usrp2_fpga_bin = $(BUILT_IMAGES_DIR)/usrp2_fpga.bin IMAGES_LIST += $(_usrp2_fpga_bin) @@ -56,6 +109,8 @@ $(_usrp2_fpga_bin): cd $(_usrp2_fpga_dir) && make -f Makefile.udp bin cp $(_usrp2_fpga_dir)/build-udp/u2_rev3.bin $@ +endif + ######################################################################## # Build rules ######################################################################## diff --git a/images/README b/images/README index ec8391826..2f9c6a95e 100644 --- a/images/README +++ b/images/README @@ -18,3 +18,8 @@ To build the package (unix): 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 |