From 0422a10253720947bb522904cccf33e931e867f3 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 16 May 2023 11:28:50 +0200 Subject: [PATCH] README.md: Document generation of SBcAP code from ASN.1 files Change-Id: Id6edb2dcbd39ca101110f1ca57fcd67bf08c0ef0 --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 6cb375e..8f98dad 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,30 @@ more details The current patch queue for osmo-cbc can be seen at https://gerrit.osmocom.org/#/q/project:osmo-cbc+status:open + + +Generating asn1c code +--------------------- + +Upstream master as1nc from [vlm](https://github.com/vlm/asn1c) [doesn't support +APER encoding](https://github.com/vlm/asn1c/issues/452). Nevertheless, the +upstream fork maintained by a big contributor +[mouse07410](https://github.com/mouse07410/asn1c) does support it, and it is +used in osmo-cbc to generate the SBc-AP code from ASN.1 files present in +src/sbcap/asn1/. + +In order to regenerate the code, one shall adjust the ASN1C_SKELETON_PATH and +ASN1C_BIN_PATH in configure.ac to point to the built & installed asn1c from +mouse07410 (usually `vlm_master` branch). Last generated code was built using +commit hash 08b293e8aa342d465d26805d1d66f3595b2ce261. + +Then, do the usual `autoreconf -fi && ./configure`, using a buildir != srcdir +(important, in order to avoid ending up with tempotary files in srcdir and +making it difficult to stash the relevant changes). + +Finally, run `make -C src/ regen`, which will regenerate the files and copy over +the skeletons, with git possibily showing changes in the following paths: +- include/osmocom/sbcap/ +- src/sbcap/gen/ +- src/sbcap/skel/ +