Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
d36f69ad
Commit
d36f69ad
authored
Feb 05, 2024
by
Karim HAROUAT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add patch uhd for lib 4.6.0.0, propose a new way to patch uhd file to factorize code lines
parent
513f060f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
22 deletions
+60
-22
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+26
-22
cmake_targets/tools/uhd-4.6-tdd-patch.diff
cmake_targets/tools/uhd-4.6-tdd-patch.diff
+34
-0
No files found.
cmake_targets/tools/build_helper
View file @
d36f69ad
...
...
@@ -261,15 +261,20 @@ install_usrp_uhd_driver_from_source(){
# For our legacy TDD eNB running with a B2xx RF board
# the following patch has to be applied
if [[ -v UHD_VERSION ]]; then
git checkout tags/v${UHD_VERSION}
UHD_TAG=${UHD_VERSION}
else
UHD_TAG="4.0.0.0"
fi
git checkout tags/v${UHD_TAG}
# We recommend to use not older than 3.15.0.0
if [[ "$UHD_VERSION" == "3.15.0.0" ]]; then
UHD_VERSION_MAJOR_MINOR=$(echo ${UHD_TAG} | awk -F'.' '{print $1"."$2}')
UHD_VERSION_MAJOR=$(echo ${UHD_TAG} | awk -F'.' '{print $1"."}')
file_to_apply=$(find $OPENAIR_DIR/cmake_targets/tools/ -name uhd-${UHD_VERSION_MAJOR_MINOR}* | head -n 1)
[ -z "${file_to_apply}" ] && file_to_apply=$(find $OPENAIR_DIR/cmake_targets/tools/ -name uhd-${UHD_VERSION_MAJOR}* | head -n 1)
if [ ! -z "${file_to_apply}" ]
then
# Tested that patch for the following versions:
# - 3.15.0.0
git apply $OPENAIR_DIR/cmake_targets/tools/uhd-3.15-tdd-patch.diff
ret=$?;[[ $ret -ne 0 ]] && echo_fatal "Could not apply the TDD patch"
else
# Tested that patch for the following versions:
# - 4.0.0.0
# - 4.1.0.0
# - 4.1.0.5
...
...
@@ -277,13 +282,12 @@ install_usrp_uhd_driver_from_source(){
# - 4.2.0.1
# - 4.3.0.0-rc1
# - 4.4.0.0
git apply $OPENAIR_DIR/cmake_targets/tools/uhd-4.x-tdd-patch.diff
ret=$?;[[ $ret -ne 0 ]] && echo_fatal "Could not apply the TDD patch"
fi
else
git checkout tags/v4.0.0.0
git apply $OPENAIR_DIR/cmake_targets/tools/uhd-4.x-tdd-patch.diff
ret=$?;[[ $ret -ne 0 ]] && echo_fatal "Could not apply the TDD patch"
set +e
git apply --check ${file_to_apply}
ret=$?;
set -e
[[ $ret -ne 0 ]] && echo_fatal "Could not apply the TDD patch ${file_to_apply}"
[ $ret -eq 0 ] && git apply ${file_to_apply}
fi
# Printing out the results of the patch to make sure it was properly applied
git diff
...
...
cmake_targets/tools/uhd-4.6-tdd-patch.diff
0 → 100644
View file @
d36f69ad
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 656aaeae1..2d0a7b87d 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -1410,10 +1410,10 @@
void b200_impl::update_atrs(void)
if (not enb_rx and enb_tx)
fd = txonly;
gpio_atr_3000::sptr atr = perif.atr;
- atr->set_atr_reg(ATR_REG_IDLE, STATE_RX1_OFF);
- atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly);
- atr->set_atr_reg(ATR_REG_TX_ONLY, txonly);
- atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd);
+ atr->set_atr_reg(ATR_REG_IDLE, STATE_RX1_OFF | (1<<7));
+ atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_TX_ONLY, txonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd | (1<<7));
}
if (_radio_perifs.size() > _fe2 and _radio_perifs[_fe2].atr) {
radio_perifs_t& perif = _radio_perifs[_fe2];
@@ -1431,10 +1431,10 @@
void b200_impl::update_atrs(void)
if (not enb_rx and enb_tx)
fd = txonly;
gpio_atr_3000::sptr atr = perif.atr;
- atr->set_atr_reg(ATR_REG_IDLE, STATE_RX2_OFF);
- atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly);
- atr->set_atr_reg(ATR_REG_TX_ONLY, txonly);
- atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd);
+ atr->set_atr_reg(ATR_REG_IDLE, STATE_RX2_OFF | (1<<7));
+ atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_TX_ONLY, txonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd | (1<<7));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment