diff --git a/init_hdl.sh b/init_hdl.sh index 9a5ec73efd852f21c910e6d5fcd0719591e8c5e2..fd1a853c1e81daa421d7f33776dd7f634b9e142c 100644 --- a/init_hdl.sh +++ b/init_hdl.sh @@ -42,32 +42,13 @@ export HDL_BUILD_DIR=${HDL_BUILD_DIR:-${RADIOHDL_WORK}/build} echo "HDL environment will be setup for" $RADIOHDL_WORK -# if exist user_components.ipx file/link remove it and make a symlink to the minimal_user_components.ipx file -# Altera/[quartus_version]/ip/altera/user_componets.ipx should be a symbolic link to Altera/user_components.ipx -user_components_file="${ALTERA_DIR}/user_components.ipx" -if [ -e $user_components_file ]; then - echo "removing existing user_components.ipx symbolic link" - rm -f $user_components_file -fi -# make a new symbolic link to the git version -echo "making a new symbolic link" -ln -s ${RADIOHDL_WORK}/hdl_user_components.ipx $user_components_file - -# # Finally check if user_component.ipx file of the altera package at least contains -# # the paths we need for HDL. -# package_ipx=${QUARTUS_DIR}/ip/altera/user_components.ipx -# minimal_ipx=${RADIOHDL_GEAR}/quartus/minimal_user_components.ipx -# # for each path found in minimal set, try to find it in package file -# grep "<path path=" $minimal_ipx | while read -r this_path -# do -# this_path=`echo $this_path | cut --delimiter='"' -f2` -# if grep -q "$this_path" $package_ipx ; then -# : -# # echo "Found $this_path in $package_ipx" -# else -# hdl_error $0 "can't find $this_path in ${package_ipx} Check your ipx setting." -# fi -# done +# copy git user_componets.ipx into Altera dir's +for altera_dir in ${ALTERA_DIR}/*; do + if [[ -d ${altera_dir} ]] && [[ ! -h ${altera_dir} ]]; then + echo "copy git hdl_user_components.ipx to ${altera_dir}/ip/altera/user_components.ipx" + cp ${RADIOHDL_WORK}/hdl_user_components.ipx $altera_dir/ip/altera/user_components.ipx + fi +done if [ -z "${RADIOHDL_GEAR}" ]; then