Dear all,
when we originally moved a lot of generic code from OpenBSC to libosmo{core,gsm} to re-use it from OsmocomBB, we created an 'embedded' build of libosmocore, which can use [most of] the library code also in deeply embedded, OS-less 'bare metal' microcontroller environments.
The ability to build libosmocore this way has been broken for many years, but I've fixed that in recent libosmocore master. Below command works for me [tm]: ./configure --prefix=/usr/local/arm-none-eabi \ --host=arm-none-eabi \ --enable-embedded \ --disable-shared \ CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
What we'd need now is:
1) make sure embedded builds continue to work by building libosmocore for embedded as part of the jenkins setup (using gcc-arm-none-eabi debian package). Any volunteers?
2) start to use this embedded build from simtrace2 firmware, osmocom-bb and the upcoming fimrware for the RFDN[1]. So far, * osmocom-bb uses an old clone of libosmocore, * simtrace2 is using some copy+pasted fork of some libosmocore files * rfdn is using some copy+pasted fork of some libosmocore files The above is no longer required.
3) consider if we can shrink the resource requirements of some libosmocore parts. One issue coming up are the static buffers in osmo_hexdump[] or the like. If your total processor RAM is 8k or 16k, then spending 4k on the buffer for hex-dumping is indeed a bit excessive.
Any help is appreciated, particularly on the jenkins side.
Regards, Harald
[1] (1:8 splitter-combiner with adjustible step attenuators, part of the osmo-gsm-tester setup we're building at sysmocom). Code will be released as soon as the hardware is validated.
Hi all,
- make sure embedded builds continue to work by building libosmocore
for embedded as part of the jenkins setup (using gcc-arm-none-eabi debian package). Any volunteers?
Here, I'd like to do this. Afaics we need some modifications in libosmocore/contrib/jenkins.sh or an additional libosmocore/contrib/jenkins-arm-none-eabi.sh script to build the arm-none-eabi flavor. Any preferences?
I have sufficient permission to create a test job on Jenkins. to verify that the build slave (gcc-arm-none-eabi) can build libosmocore with changed ./configure invokation. In case of missing dependencies on the build slave I'd reach out do you.
But before starting, I need some clarification about the changed arguments of ./configure invokation, because:
Below command works for me [tm]: ./configure --prefix=/usr/local/arm-none-eabi \ --host=arm-none-eabi \ --enable-embedded \ --disable-shared \ CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
does only succeed when adding "--enable-static" to the arguments.
Can I simply add "--enable-static" or is my build environment not sane? If not how can I fix it?
Regards, André
Hi Andre,
On Wed, May 17, 2017 at 11:51:02AM +0200, André Boddenberg wrote:
- make sure embedded builds continue to work by building libosmocore
for embedded as part of the jenkins setup (using gcc-arm-none-eabi debian package). Any volunteers?
Here, I'd like to do this.
great!
Afaics we need some modifications in libosmocore/contrib/jenkins.sh or an additional libosmocore/contrib/jenkins-arm-none-eabi.sh script to build the arm-none-eabi flavor. Any preferences?
I don't know anything about the jenkins setup, so I defer here to the people more familiar with it.
I have sufficient permission to create a test job on Jenkins. to verify that the build slave (gcc-arm-none-eabi) can build libosmocore with changed ./configure invokation. In case of missing dependencies on the build slave I'd reach out do you.
sure, thanks.
But before starting, I need some clarification about the changed arguments of ./configure invokation, because:
Below command works for me [tm]: ./configure --prefix=/usr/local/arm-none-eabi \ --host=arm-none-eabi \ --enable-embedded \ --disable-shared \ CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
does only succeed when adding "--enable-static" to the arguments.
'--enable-static' will just enable the linking/generation of a static library. It will not disable the dynamic library and do any of the other things.
Can I simply add "--enable-static" or is my build environment not sane? If not how can I fix it?
Ah, I think now I understand. You're saying that the above command quoted from my mail only works if you _also_ add --enable-static? This is interesting, but yes you can simply add it. We could also change the configure.ac to add the --disable-shared and --enable-static automatically when using '--enable-embedded'. We coul dalso do the same for the CFLAGS, as they should be the same for whatever embedded microcontroller one would want to build for. The --host and --prefix should not have any default values, though, and should always be specified by the caller.
On Wed, May 17, 2017 at 03:03:05PM +0100, Harald Welte wrote:
Afaics we need some modifications in libosmocore/contrib/jenkins.sh or an additional libosmocore/contrib/jenkins-arm-none-eabi.sh script to build the arm-none-eabi flavor. Any preferences?
Let's have a separate script. We can then decide per-job or per-build-slave which parts we'd like to build.
~N
Hi all,
a test job for the libosmocore arm-none-eabi build is created [1]. Another multi-configuration axis (arch) has been added and a combination filter has been applied to not run arm builds on FreeBSD.
Do we actually want to cross-compile on FreeBSD as well?
The arm build does not succeed (yet) [2].
Can someone else may have a quick look at log [2] to point me in the right direction? Afaics build dependencies are available but the compilation itself fails.
OT: the debian8_amd64 build [3] publishes XML test results. :)
Regards, André
[1] https://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/ [2] https://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/arch=... [3] https://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/arch=...
Hi Andre!
On Thu, May 18, 2017 at 12:08:08PM +0200, André Boddenberg wrote:
a test job for the libosmocore arm-none-eabi build is created [1]. Another multi-configuration axis (arch) has been added and a combination filter has been applied to not run arm builds on FreeBSD.
great.
Do we actually want to cross-compile on FreeBSD as well?
no.
The arm build does not succeed (yet) [2].
Can someone else may have a quick look at log [2] to point me in the right direction? Afaics build dependencies are available but the compilation itself fails.
The build completes, but 'make check' fails. I think 'make check' does only make sense for host builds, but not for embedded. We cannot execute the test cases anyway, even if we were able to build them.
I cannot fix it right now in the autoconf (i.e. do nothing for 'make check'), so feel free to disable 'make check' in the build script as an interim workaround.
Hi Harald,
thanks a lot for your clarification.
The "make check" and "make distcheck"[1] have been disabled as an interim workaround. Now, all multi-configuration axes (FreeBSD_amd64, debian8_amd64, arm-none-eabi) are successful. [2]
If the build job is "sane" for everyone(?), I'd push the jenkins-arm-none-eabi.sh build script to gerrit for review and apply changes to libosmocore and libosmocore_gerrit job after a successful patch submission. Does everyone agree?
Regards, André
[1] http://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/arch=a... [2] http://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/
Hi Andre and others.
We currently have a series of patches from Vadim pending in gerrit for OsmocomBB. They cannot move ahead, as we have no compile testing / jenkins job which would give this a +1.
To resolve this, we should also start to have a jenkins compile testing job for OsmocomBB. The "host" (PC) part of the code is built against regular libosmocore, just like e.g. openbsc or osmo-bts. That should be possible even so far, and it might make sense to start with that.
Basically you need to: * git clone osmocom-bb * cd src/host/layer23 * regular 'autoreconf -fi && ./configure && make'
compile-testing the 'embedded' (firmware) part is not possible easily in the current master. However, as a second step, and after the libosmocore embedded build has run (and it is installed to /usr/local/arm-none-eabi), and if you use the laforge/remove-libosmocore branch in OsmocomBB, you should also be able to compile-test the firmware using
* git clone osmocom-bb * cd src/target/firmware && make
There currently is no "make check" tests for either the host utilities or the firmware, and of course we have no clue if the resulting binaries will do anything useful on an actual pone [yet!], but I still think the two steps above would be very useful to move ahead, and to unify the patch submission/review/verification/approval/merge process in gerrit with what we have established for the network-side projects like OsmoBTS & co.
Regards, Harald
Hi Harald,
To resolve this, we should also start to have a jenkins compile testing job for OsmocomBB. The "host" (PC) part of the code is built against regular libosmocore, just like e.g. openbsc or osmo-bts. That should be possible even so far, and it might make sense to start with that.
Probably done [1][2], although I disabled following line to let OsmocomBB build succeed:
libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
Is it okay to disable this verification?
Regards, André
[1] https://gerrit.osmocom.org/#/c/2726/ [2] https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/job/osmocomBB-gerrit...
On Wed, May 17, 2017 at 11:51:02AM +0200, André Boddenberg wrote:
Hi all,
- make sure embedded builds continue to work by building libosmocore
for embedded as part of the jenkins setup (using gcc-arm-none-eabi debian package). Any volunteers?
Here, I'd like to do this. Afaics we need some modifications in
oof, I replied before reading the rest of the thread. André, please go ahead, I have enough on my todo list.
Let me know of anything that needs to be installed or configured in our jenkins!
(BTW, I kind of lost track of the status on our builds re-using previous build artifacts, feel free to bump on that... would be nice to get this into "production")
~N
On Tue, May 16, 2017 at 06:27:08PM +0200, Harald Welte wrote:
- make sure embedded builds continue to work by building libosmocore for embedded as part of the jenkins setup (using gcc-arm-none-eabi debian package). Any volunteers?
For the jenkins side, it's probably easiest for me to add it, unless Holger jumps in.
About the cross-compile, do we have a doc or readme that describes it?
~N
baseband-devel@lists.osmocom.org