diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-09-15 14:58:44 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-09-15 14:58:44 -0700 |
commit | ed245848df8cc011ae8fe30833ecc28049139db5 (patch) | |
tree | da03d37de541826df734e8ab87e0b6114595afc8 /images | |
parent | 44ac4461407aae3e26b218a1ab1bd27f893c5e96 (diff) | |
parent | 72646d1960b0c979afec225e741d7d89a827c7d0 (diff) | |
download | uhd-ed245848df8cc011ae8fe30833ecc28049139db5.tar.gz uhd-ed245848df8cc011ae8fe30833ecc28049139db5.tar.bz2 uhd-ed245848df8cc011ae8fe30833ecc28049139db5.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts:
host/lib/usrp/usrp2/CMakeLists.txt
host/lib/usrp/usrp2/mboard_impl.cpp
host/lib/usrp/usrp2/usrp2_regs.hpp
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 |