Project

General

Profile

Feature #2378

Remove copy-pasted libosmocore ("git subtree") from osmocom-bb.git

Added by msuraev over 1 year ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/19/2017
Due date:
% Done:

0%

Resolution:
Spec Reference:

Description

We now have "--enable-embedded" option for ./configure checked by jenkins for every commit in libosmocore. Hence it make sense to port osmocom-bb to it and remove copy-pasted old version from src/shared/libosmocore.

History

#1 Updated by laforge 7 months ago

  • Subject changed from Remove copy-pasted libosmocore to Remove copy-pasted libosmocore ("git subtree") from osmocom-bb.git

#2 Updated by pespin about 2 months ago

I did some initial work regarding this topic

I made sure one can compile libosmocore with following toolchain (I had to apply similar toolchain patches that appear in the wiki page too):
https://osmocom.org/projects/baseband/wiki/GnuArmToolchain

I then used following flags to build libosmocore (as seen in osmocombb Makefile):

opt_enable="--disable-doxygen --host=arm-none-eabi --enable-embedded --disable-shared --disable-tests ac_cv_header_sys_select_h=no --disable-tests ac_cv_header_sys_socket_h=no" 
export CFLAGS="-Os -ffunction-sections -I$(TOPDIR)/target/firmware/include -nostartfiles -nodefaultlibs" 

I then modified osmocomBB Makefile to use libosmocore.a from a different directory, defining a new LIBOSMOCORE_PREFIX automake variable which can be used to point to it.
I could compile the firmware (make -C target/firmware CROSS_COMPILE=arm-none-eabi-) but it still fails at linking stage iwth some minor lining issues which still needs to be resolved.

I attach a patch with changes I did in osmocomBB so far.

lib/libosmocore.a(msgb.o): In function `msgb_alloc':
git/libosmocore/src/msgb.c:82: undefined reference to `talloc_named_const'
lib/libosmocore.a(logging.o): In function `const_basename':
git/libosmocore/src/logging.c:317: undefined reference to `strrchr'
lib/libosmocore.a(logging.o): In function `assert_loginfo':
git/libosmocore/src/logging.c:177: undefined reference to `fprintf'
git/libosmocore/src/logging.c:181: undefined reference to `_impure_ptr'
lib/libosmocore.a(logging.o): In function `_output':
git/libosmocore/src/logging.c:359: undefined reference to `time'
git/libosmocore/src/logging.c:360: undefined reference to `ctime'
make: *** [Makefile.inc:135: board/compal_e88/hello_world.highram.elf] Error 1

talloc_named_const is proobably still missing in libosmocore
pseudotalloc.

#3 Updated by msuraev about 2 months ago

#4 Updated by msuraev about 2 months ago

It would make sense to split this into several patches (python2 fix, LIBOSMOCORE_PREFIX etc) and send them to gerrit: except for the actual switch to upstream libosmocore, the rest can be merged already.

#5 Updated by fixeria about 2 months ago

Related to Feature #3666: Introduce VTY interface added

I am sorry, but how is this related?!? The copy-pasted libosmocore is only
used by the firmware, while trxcon is linked against the recent version.

#6 Updated by fixeria about 2 months ago

#7 Updated by pespin about 2 months ago

Python fix already merged in osmocom-bb f6e1429f804d4001dd71491f966f82763e30360f

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)