Since there are some error can't compile for 38311-f21.asn Version, NR RRC ASN go back to 38331-f10 version
This commit is contained in:
@@ -353,43 +353,24 @@ add_custom_command (
|
||||
add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface")
|
||||
|
||||
if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
|
||||
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-38331-f21.asn)
|
||||
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-38331-f10.asn)
|
||||
endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
|
||||
|
||||
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
|
||||
|
||||
if(NOT EXISTS ${asn1c_call})
|
||||
message( FATAL_ERROR "The script ${asn1c_call} must be present" )
|
||||
endif(NOT EXISTS ${asn1c_call})
|
||||
message("calling ASN1C_PREFIX=NR_ asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}")
|
||||
execute_process(COMMAND mkdir -p ${NR_RRC_FULL_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=NR_" asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}
|
||||
RESULT_VARIABLE ret)
|
||||
|
||||
message("calling ASN1C_PREFIX=NR_ asn1c -findirect-choice -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
|
||||
execute_process(COMMAND ${asn1c_call}
|
||||
${NR_RRC_FULL_DIR}
|
||||
${NR_RRC_GRAMMAR}
|
||||
NR_RRC
|
||||
RESULT_VARIABLE ret)
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${asn1c_call}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
if(NOT EXISTS ${fix_asn1c_call})
|
||||
message( FATAL_ERROR "The script ${fix_asn1c_call} must be present" )
|
||||
endif(NOT EXISTS ${fix_asn1c_call})
|
||||
|
||||
execute_process(COMMAND ${fix_asn1c_call}
|
||||
${NR_RRC_FULL_DIR}
|
||||
NR_RRC
|
||||
${NR_RRC_ASN1_VERSION}
|
||||
RESULT_VARIABLE ret)
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${fix_asn1c_call}: error")
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
|
||||
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
|
||||
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn1_constants.h)
|
||||
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/NR_asn1_constants.h)
|
||||
set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
|
||||
add_library(NR_RRC_LIB
|
||||
${nr_rrc_h}
|
||||
@@ -401,10 +382,10 @@ include_directories ("${NR_RRC_FULL_DIR}")
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT ${NR_RRC_FULL_DIR}/asn1_constants.h
|
||||
COMMAND ${asn1c_call} ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR} RRC
|
||||
COMMAND ${fix_asn1c_call} ${NR_RRC_FULL_DIR} RRC ${NR_RRC_ASN1_VERSION}
|
||||
DEPENDS ${RRC_GRAMMAR}
|
||||
OUTPUT ${NR_RRC_FULL_DIR}/NR_asn1_constants.h
|
||||
COMMAND mkdir -p ${NR_RRC_FULL_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=NR_" asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}
|
||||
DEPENDS ${NR_RRC_GRAMMAR}
|
||||
)
|
||||
|
||||
# S1AP
|
||||
|
||||
@@ -659,10 +659,14 @@ install_asn1c_from_source(){
|
||||
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
|
||||
(
|
||||
$SUDO rm -rf /tmp/asn1c
|
||||
git clone https://github.com/brchiu/asn1c /tmp/asn1c
|
||||
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
|
||||
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
|
||||
cd /tmp/asn1c
|
||||
git checkout velichkov_s1ap_plus_option_group
|
||||
test -f configure || autoreconf -iv
|
||||
# better to use a given commit than a branch in case the branch
|
||||
# is updated and requires modifications in the source of OAI
|
||||
#git checkout velichkov_s1ap_plus_option_group
|
||||
git checkout ec830d70bbb014b769810355a2f321a91ccd8a58
|
||||
autoreconf -iv
|
||||
./configure
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user