Feature #2378
openRemove copy-pasted libosmocore ("git subtree") from osmocom-bb.git
0%
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.
Files
Updated by laforge about 6 years ago
- Subject changed from Remove copy-pasted libosmocore to Remove copy-pasted libosmocore ("git subtree") from osmocom-bb.git
Updated by pespin over 5 years ago
- File 0001-Fix-build-against-new-libosmocore.patch 0001-Fix-build-against-new-libosmocore.patch added
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.
Updated by msuraev over 5 years ago
- Related to Feature #3666: trxcon: Introduce VTY interface added
Updated by msuraev over 5 years 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.
Updated by fixeria over 5 years 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.
Updated by fixeria over 5 years ago
- Related to deleted (Feature #3666: trxcon: Introduce VTY interface)
Updated by pespin over 5 years ago
Python fix already merged in osmocom-bb f6e1429f804d4001dd71491f966f82763e30360f