From 3fdcf5b676124652c36f1b343370d6f94b246f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= <frederic.leroy@b-com.com> Date: Fri, 26 Aug 2016 15:24:11 +0200 Subject: [PATCH] feat(conf2uedata): uses nvram and usim binary This commit reverts behaviour of data generation as before commit 7207c65b05fd812a18371827f2bfb1431fc58696: fix .ue* filenames in scripts and documentation TODO add option to conf2uedata and adapt script --- cmake_targets/build_oai | 16 ++++++++++++++++ cmake_targets/tools/build_helper | 18 ++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index ea28a7131a..7c438aabd8 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -519,6 +519,12 @@ function main() { cd $DIR/nas_sim_tools/build cmake .. + compilations \ + nas_sim_tools usim \ + usim $dbin/usim + compilations \ + nas_sim_tools nvram \ + nvram $dbin/nvram compilations \ nas_sim_tools conf2uedata \ conf2uedata $dbin/conf2uedata @@ -526,6 +532,10 @@ function main() { # generate USIM data if [ -f $dbin/conf2uedata ]; then install_nas_tools $conf_nvram_path $gen_nvram_path + echo_info "Copying UE specific part to $DIR/$lte_build_dir/build" + cp -Rvf $dbin/.ue_emm.nvram0 $DIR/$lte_build_dir/build + cp -Rvf $dbin/.ue.nvram0 $DIR/$lte_build_dir/build + cp -Rvf $dbin/.usim.nvram0 $DIR/$lte_build_dir/build else echo_warning "not generated UE NAS files: binaries not found" fi @@ -641,6 +651,12 @@ function main() { mkdir -p $DIR/nas_sim_tools/build cd $DIR/nas_sim_tools/build cmake .. + compilations \ + nas_sim_tools usim \ + usim $dbin/usim + compilations \ + nas_sim_tools nvram \ + nvram $dbin/nvram compilations \ nas_sim_tools conf2uedata \ conf2uedata $dbin/conf2uedata diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 5d4a1dbeae..da3ef1c355 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -450,13 +450,23 @@ install_asn1c_from_source(){ ################################################ install_nas_tools() { - if [ ! -f $2/.ue.nvram0 -o ! -f $2/.usim.nvram0 ]; then - cd $OPENAIR_DIR/targets/bin - ./conf2uedata -c $1 -o $2 - echo_success "$1 $2" + if [ ! -f .ue.nvram0 ]; then + echo_success "generate .ue_emm.nvram .ue.nvram" + ./nvram --gen -c $1 -o $2 + else + [ ./nvram -nt .ue.nvram0 -o ./nvram -nt .ue_emm.nvram0 ] && ./nvram --gen -c $1 -o $2 + fi + + if [ ! -f .usim.nvram0 ]; then + echo_success "generate .usim.nvram" + ./usim --gen -c $1 -o $2 + else + [ ./usim -nt .usim.nvram0 ] && ./usim --gen -c $1 -o $2 fi + } + ################################ # set_openair_env ############################### -- GitLab