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
wangjie
OpenXG-RAN
Commits
4aafd627
Commit
4aafd627
authored
Jul 22, 2015
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import asn1c patch
parent
8c7e613d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
1 deletion
+118
-1
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+1
-0
cmake_targets/tools/generate_asn1
cmake_targets/tools/generate_asn1
+104
-1
openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
+13
-0
No files found.
cmake_targets/tools/build_helper
View file @
4aafd627
...
...
@@ -371,6 +371,7 @@ install_asn1c_from_source(){
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 > /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 >> /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 >> /tmp/log_compile_asn1c
./configure
make > /tmp/log_compile_asn1c 2>&1
$SUDO make install
...
...
cmake_targets/tools/generate_asn1
View file @
4aafd627
...
...
@@ -6,7 +6,110 @@ mkdir -p $1
cd
$1
shift
asn1c
-gen-PER
-fcompound-names
$*
2>&1 |
grep
-v
--
'->'
|
grep
-v
'^Compiled'
|grep
-v
sample
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC
#(there may be a better way...)
if
[
$#
-eq
1
]
;
then
#asn1c does not work well with extension groups, we need the following fix:
# replace [[ by '<name> SEQUENCE {'
# and ]] by '} OPTIONAL'
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
#following another [[ ]]
#
#this is what the following C program does
echo
generate asnfix.c
cat
<<
EOF
> asnfix.c
/* transforms:
* '[[' to 'name SEQUENCE {'
* ']]' to '} OPTIONAL'
* name is ext1, ext2, ..., for each [[ at the same level
* levels are delimited by { and }
* -- to end of line is a comment and unprocessed
* nested [[ ]] not handled
* { and } must be balanced
* [[ and ]] can be whatever, every combination is valid
*/
#include <stdio.h>
#include <stdlib.h>
void level(int toplevel)
{
int c;
int next_name = 1;
while (1) {
c = getchar();
next:
if (c == EOF) { if (toplevel) break; abort(); }
if (c == '-') {
c = getchar();
if (c != '-') { putchar('-'); goto next; }
putchar(c); putchar(c);
while (1) {
c = getchar(); if (c == EOF) abort();
putchar(c);
if (c == '
\n
') break;
}
continue;
}
if (c == '[') {
c = getchar();
if (c != '[') { putchar('['); goto next; }
printf("ext%d SEQUENCE {", next_name);
next_name++;
continue;
}
if (c == ']') {
c = getchar();
if (c != ']') { putchar(']'); goto next; }
printf("} OPTIONAL");
continue;
}
putchar(c);
if (c == '}') { if (toplevel) abort(); break; }
if (c == '{') level(0);
}
}
int main(void)
{
level(1);
fflush(stdout);
return 0;
}
EOF
echo
compile asnfix.c
gcc
-Wall
-o
asnfix asnfix.c
echo
run asnfix on
$1
./asnfix <
$1
>
fixed_grammar.asn
rm
-f
asnfix asnfix.c
echo
done
with asnfix
echo
running asn1c
asn1c
-gen-PER
-fcompound-names
fixed_grammar.asn 2>&1 |
grep
-v
--
'->'
|
grep
-v
'^Compiled'
|grep
-v
sample
rm
-f
fixed_grammar.asn
echo
asn1c
done
else
asn1c
-gen-PER
-fcompound-names
$*
2>&1 |
grep
-v
--
'->'
|
grep
-v
'^Compiled'
|grep
-v
sample
fi
awk
'
BEGIN {
...
...
openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
0 → 100644
View file @
4aafd627
Index: skeletons/per_opentype.c
===================================================================
--- skeletons/per_opentype.c (revision 1516)
+++ skeletons/per_opentype.c (working copy)
@@ -277,7 +306,7 @@
(void)constraints;
(void)sptr;
- while(per_get_few_bits(pd, 24) >= 0);
+ while(per_get_few_bits(pd, 1 /*24*/) >= 0);
rv.code = RC_OK;
rv.consumed = pd->moved;
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