aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/convert/convert_unpack_sc12.cpp16
-rw-r--r--host/lib/usrp/multi_usrp.cpp12
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp14
-rwxr-xr-ximages/create_imgs_package.py8
-rwxr-xr-ximages/make_zip.sh22
5 files changed, 47 insertions, 25 deletions
diff --git a/host/lib/convert/convert_unpack_sc12.cpp b/host/lib/convert/convert_unpack_sc12.cpp
index a2aec2ae5..94b415355 100644
--- a/host/lib/convert/convert_unpack_sc12.cpp
+++ b/host/lib/convert/convert_unpack_sc12.cpp
@@ -62,17 +62,17 @@ void convert_sc12_item32_3_to_star_4
const boost::uint64_t line12 = (boost::uint64_t(line1) << 32) | line2;
//step 1: shift out and mask off the individual numbers
- const type i0 = type(boost::int16_t(line0 >> 16)*scalar);
- const type q0 = type(boost::int16_t(line0 >> 4)*scalar);
+ const type i0 = type(boost::int16_t((line0 >> 16) & 0xfff0)*scalar);
+ const type q0 = type(boost::int16_t((line0 >> 4) & 0xfff0)*scalar);
- const type i1 = type(boost::int16_t(line01 >> 24)*scalar);
- const type q1 = type(boost::int16_t(line1 >> 12)*scalar);
+ const type i1 = type(boost::int16_t((line01 >> 24) & 0xfff0)*scalar);
+ const type q1 = type(boost::int16_t((line1 >> 12) & 0xfff0)*scalar);
- const type i2 = type(boost::int16_t(line1 >> 0)*scalar);
- const type q2 = type(boost::int16_t(line12 >> 20)*scalar);
+ const type i2 = type(boost::int16_t((line1 >> 0) & 0xfff0)*scalar);
+ const type q2 = type(boost::int16_t((line12 >> 20) & 0xfff0)*scalar);
- const type i3 = type(boost::int16_t(line2 >> 8)*scalar);
- const type q3 = type(boost::int16_t(line2 << 4)*scalar);
+ const type i3 = type(boost::int16_t((line2 >> 8) & 0xfff0)*scalar);
+ const type q3 = type(boost::int16_t((line2 << 4) & 0xfff0)*scalar);
//step 2: load the outputs
out0 = std::complex<type>(i0, q0);
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 7f27bdc64..e97787785 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -393,16 +393,16 @@ public:
dict<std::string, std::string> usrp_info;
mboard_eeprom_t mb_eeprom = _tree->access<mboard_eeprom_t>(mb_root(mcp.mboard) / "eeprom").get();
- dboard_eeprom_t db_eeprom = _tree->access<dboard_eeprom_t>(rx_rf_fe_root(mcp.chan).branch_path().branch_path() / "rx_eeprom").get();
+ dboard_eeprom_t db_eeprom = _tree->access<dboard_eeprom_t>(rx_rf_fe_root(chan).branch_path().branch_path() / "rx_eeprom").get();
usrp_info["mboard_id"] = _tree->access<std::string>(mb_root(mcp.mboard) / "name").get();
usrp_info["mboard_name"] = mb_eeprom["name"];
usrp_info["mboard_serial"] = mb_eeprom["serial"];
usrp_info["rx_id"] = db_eeprom.id.to_pp_string();
- usrp_info["rx_subdev_name"] = _tree->access<std::string>(rx_rf_fe_root(mcp.chan) / "name").get();
+ usrp_info["rx_subdev_name"] = _tree->access<std::string>(rx_rf_fe_root(chan) / "name").get();
usrp_info["rx_subdev_spec"] = _tree->access<subdev_spec_t>(mb_root(mcp.mboard) / "rx_subdev_spec").get().to_string();
usrp_info["rx_serial"] = db_eeprom.serial;
- usrp_info["rx_antenna"] = _tree->access<std::string>(rx_rf_fe_root(mcp.chan) / "antenna" / "value").get();
+ usrp_info["rx_antenna"] = _tree->access<std::string>(rx_rf_fe_root(chan) / "antenna" / "value").get();
return usrp_info;
}
@@ -412,16 +412,16 @@ public:
dict<std::string, std::string> usrp_info;
mboard_eeprom_t mb_eeprom = _tree->access<mboard_eeprom_t>(mb_root(mcp.mboard) / "eeprom").get();
- dboard_eeprom_t db_eeprom = _tree->access<dboard_eeprom_t>(tx_rf_fe_root(mcp.chan).branch_path().branch_path() / "tx_eeprom").get();
+ dboard_eeprom_t db_eeprom = _tree->access<dboard_eeprom_t>(tx_rf_fe_root(chan).branch_path().branch_path() / "tx_eeprom").get();
usrp_info["mboard_id"] = _tree->access<std::string>(mb_root(mcp.mboard) / "name").get();
usrp_info["mboard_name"] = mb_eeprom["name"];
usrp_info["mboard_serial"] = mb_eeprom["serial"];
usrp_info["tx_id"] = db_eeprom.id.to_pp_string();
- usrp_info["tx_subdev_name"] = _tree->access<std::string>(tx_rf_fe_root(mcp.chan) / "name").get();
+ usrp_info["tx_subdev_name"] = _tree->access<std::string>(tx_rf_fe_root(chan) / "name").get();
usrp_info["tx_subdev_spec"] = _tree->access<subdev_spec_t>(mb_root(mcp.mboard) / "tx_subdev_spec").get().to_string();
usrp_info["tx_serial"] = db_eeprom.serial;
- usrp_info["tx_antenna"] = _tree->access<std::string>(tx_rf_fe_root(mcp.chan) / "antenna" / "value").get();
+ usrp_info["tx_antenna"] = _tree->access<std::string>(tx_rf_fe_root(chan) / "antenna" / "value").get();
return usrp_info;
}
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 95ac3af38..bf676b661 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -755,6 +755,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
_tree->create<bool>(mb_path / "clock_source" / "output")
.subscribe(boost::bind(&x300_clock_ctrl::set_ref_out, mb.clock, _1));
+ //initialize tick rate (must be done before setting time)
+ _tree->access<double>(mb_path / "tick_rate")
+ .subscribe(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
+ .subscribe(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
+ .set(mb.clock->get_master_clock_rate());
+
////////////////////////////////////////////////////////////////////
// initialize clock and time sources
////////////////////////////////////////////////////////////////////
@@ -790,14 +796,6 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
.publish(boost::bind(&x300_impl::get_ref_locked, this, mb.zpu_ctrl));
////////////////////////////////////////////////////////////////////
- // create clock properties
- ////////////////////////////////////////////////////////////////////
- _tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
- .subscribe(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
- .set(mb.clock->get_master_clock_rate());
-
- ////////////////////////////////////////////////////////////////////
// do some post-init tasks
////////////////////////////////////////////////////////////////////
subdev_spec_t rx_fe_spec, tx_fe_spec;
diff --git a/images/create_imgs_package.py b/images/create_imgs_package.py
index 6b1d5580e..bdd4e7644 100755
--- a/images/create_imgs_package.py
+++ b/images/create_imgs_package.py
@@ -49,6 +49,10 @@ def parse_args():
help='Supply a commit message to the changes to host/CMakeLists.txt.')
parser.add_argument('-r', '--release-mode', default=None,
help='Specify UHD_RELEASE_MODE. Typically "release" or "rc1" or similar.')
+ parser.add_argument('--skip-edit', default=False, action='store_true',
+ help='Do not edit the CMakeLists.txt file.')
+ parser.add_argument('--skip-move', default=False, action='store_true',
+ help='Do not move the archives after creating them.')
return parser.parse_args()
def move_zip_to_repo(base_url, zipfilename):
@@ -69,7 +73,7 @@ def main():
os.chdir(uhdimgs.get_images_dir())
print "== Clearing out the images directory..."
clear_img_dir(img_root_dir)
- print "== Creating ZIP file..."
+ print "== Creating archives..."
cpack_cmd = ["./make_zip.sh",]
if args.release_mode is not None:
cpack_cmd.append(args.release_mode)
@@ -84,7 +88,7 @@ def main():
md5 = uhdimgs.md5_checksum(zipfilename)
print 'MD5: ', md5
base_url = uhdimgs.get_base_url()
- if uhdimgs.base_url_is_local(base_url) and os.access(base_url, os.W_OK):
+ if not args.skip_move and uhdimgs.base_url_is_local(base_url) and os.access(base_url, os.W_OK):
print "== Moving ZIP file to {0}...".format(base_url)
move_zip_to_repo(base_url, zipfilename)
print "== Updating CMakeLists.txt..."
diff --git a/images/make_zip.sh b/images/make_zip.sh
index f07507a94..19695ef3f 100755
--- a/images/make_zip.sh
+++ b/images/make_zip.sh
@@ -23,14 +23,34 @@ if [ -n "$TAGFILES" ]; then
rm $TAGFILES
fi
-# Run the CPack process:
+# Enter build dir
mkdir build
cd build
+
+# Run the CPack process (ZIP file)
cmake .. -DCPACK_GENERATOR=ZIP -DUHD_RELEASE_MODE="$1" ..
make package
mv uhd-images*.zip ..
+# Run the CPack process (tarball)
+cmake .. -DCPACK_GENERATOR=TGZ -DUHD_RELEASE_MODE="$1" ..
+make package
+mv uhd-images*.tar.gz ..
+
# Move images to here and clean up after us:
cd ..
rm -r build
rm images/*.tag
+
+TGZ_ARCHIVE_NAME=`ls *.tar.gz | tail -n1`
+
+# CMake can't do xz, so do it by hand if possible
+XZ_EXECUTABLE=`which xz`
+if [ $? -eq 0 ]; then
+ XZ_ARCHIVE_NAME=`echo $TGZ_ARCHIVE_NAME | sed "s/gz\>/xz/"`
+ echo "Writing .xz tarball to $XZ_ARCHIVE_NAME ..."
+ gunzip --to-stdout $TGZ_ARCHIVE_NAME | xz - > $XZ_ARCHIVE_NAME
+fi
+
+MD5_FILE_NAME=`echo $TGZ_ARCHIVE_NAME | sed "s/tar.gz\>/md5/"`
+md5sum uhd-images* > $MD5_FILE_NAME