<html><head></head><body>I will try this on Debian stable. <br><br><div class="gmail_quote">On May 16, 2017 11:18:45 AM CDT, Harald Welte <laforge@gnumonks.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Dear all,<br /><br />when we initially crated OsmocomBB, we moved the code that it shared<br />with the pre-existing OpenBSC project into libosmocore.git, where<br />libosmocore and libosmogsm are built.  As libosmocore was quite a bit in<br />flux (and we didn't have jenkins+gerrit yet), we decided to have a local<br />clone of libosmocore.git as a git-subtree module inside osmocom-bb.git<br /><br />Meanwhile, upstream libosmocore received more and more code, and none<br />of that was ever built with an 'arm-non-eabi' toolchain and<br />--enable-embedded.<br /><br />I've been working quite a bit during the last week on making that<br />embedded build work again.<br /><br />The idea is to be able to configure + build libosmocore.git master using<br />something like <br /><br />./configure --prefix=/usr/local/arm-none-eabi \<br />   --host=arm-none-eabi \<br />  --enable-embedded \<br />  --disable-shared \<br />  CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"<br /><br />and then install it onto the host pc.  I've used<br />/usr/local/arm-none-eabi as the prefix, but it could of course be<br />anywhere.<br /><br />The above already works for me on Debian unstable using libosmocore.git<br />master. I have some patches pending in laforge/sercomm and<br />laforge/pseudotalloc, but those are not mandatory to make the build work<br /><br />The local clone of libosmocore in OsmocomBB src/shared/libosmocore will<br />be removed, and the Makefiles of osmocom-bb instructed to use the<br />system-installed libosmocore from /usr/local/arm-none-eabi (see my<br />'laforge/remove-libosmocore' branch in).  This also already "works" on<br />my Debian unstable system, in as far as there are no unresolved symbols<br />or other compilation/linking issues, and the firmware images are<br />generated.  I have not tested any of the resulting binaries yet, and as<br />I'm travelling without compatible hardware (and overloaded), it's<br />unlikely that I'll be able to test it soon.<br /><br />Nevertheless, this is what I would like to move to.  If anyone wants to<br />try if he can build the embedded libosmocore and resulting osmocom-bb<br />from laforge/remove-libosmocore branch, please do so and report your<br />progress/success/issues here.<br /><br />Next steps (after validating the above) are:<br />* remove old sercomm.c code from osmocom-bb and use the new code from<br />  libosmocore<br />* remove 'talloc emulation' from osmocom-bb and use pseudotalloc from<br />  libosmocore.git (plus an embedded 'malloc' like umm_malloc)<br /><br />Further ideas:<br />* create Debian/Ubuntu package of cross-compiled libosmocore for<br />  embedded-arm, which we can add to the Osmocom nightly builds apt<br />  repository.<br />* have an (optional?) osmocom-bb makefile step to git clone + configure<br />  + make install libosmocore<br /><br />Anyone interested in helping out with this, please feel free to join in.<br /><br />Regards,<br /> Harald</pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>