Commit 05ad02d5 authored by Frédéric Leroy's avatar Frédéric Leroy

build_helper: add flag to allow compiling software without hardware

Add --disable-hardware-dependency flag to avoid hardware need when compiling OAI.
For the momment it avoids to flash bladeRF hardware
parent 81d96a31
...@@ -278,6 +278,10 @@ function main() { ...@@ -278,6 +278,10 @@ function main() {
T_TRACER="True" T_TRACER="True"
echo_info "Enabling the T tracer" echo_info "Enabling the T tracer"
shift 1;; shift 1;;
--disable-hardware-dependency)
echo_info "Disabling hardware dependency for compiling software"
DISABLE_HARDWARE_DEPENDENCY="True"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -387,10 +391,16 @@ function main() { ...@@ -387,10 +391,16 @@ function main() {
if [ "$HW" == "OAI_USRP" ] ; then if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support" echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver check_install_usrp_uhd_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
install_usrp_uhd_driver
fi
fi fi
if [ "$HW" == "OAI_BLADERF" ] ; then if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support" echo_info "installing packages for BLADERF support"
check_install_bladerf_driver check_install_bladerf_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
flash_firmware_bladerf
fi
fi fi
fi fi
......
...@@ -229,6 +229,9 @@ check_install_bladerf_driver(){ ...@@ -229,6 +229,9 @@ check_install_bladerf_driver(){
$SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40 $SUDO apt-get install -y bladerf-fpga-hostedx40
}
flash_firmware_bladerf() {
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img $SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment