Remove copy-pasted libosmocore ("git subtree") from osmocom-bb.git
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.
- 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):
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