Hi Herald
I needed some information from you, I want to implement a GSM Mobile stack with USRP as RF Frontend. Is it possible to build the DSP part of osmocommbb in a different TI DSP board other than calypso. As it is very difficult to find calypso phones now a days.
BR
Snehasish
I was thinking about how to setup an automated real device test for the repo and/or PRs especially. I have devices and cables, just was thinking about how to automate the re-loading of firmware (via an interface to the power button I suppose).
Any work ongoing on this front? I'd be happy to contribute as I have a server I'm going to use for nano3g, calypsobts, development.
-Craig
--------------------------------------------
On Thu, 5/18/17, Harald Welte <laforge(a)gnumonks.org> wrote:
Subject: OsmocomBB compile testing / Re: libosmocore embedded build
To: "André Boddenberg" <dr.blobb(a)gmail.com>
Cc: baseband-devel(a)lists.osmocom.org, "OpenBSC" <openbsc(a)lists.osmocom.org>, "Vadim Yanitskiy" <axilirator(a)gmail.com>
Date: Thursday, May 18, 2017, 1:24 PM
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
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a
desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Hi Vadim,
see attachment.
This was my 'test ballon': We now have automatic jenkins build
verification at least for the host part of OsmocomBB. Please re-push
your patch series again into jenkins, so they will get build-verified.
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
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.
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Hi,
> 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.
As I can see from the console output, build fails because we are
trying to test disabled features, which we haven't compiled.
Fixed by fixeria ;)
https://gerrit.osmocom.org/#/c/2682/1
With best regards,
Vadim Yanitskiy.
> 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.
> [2] https://jenkins.osmocom.org/jenkins/job/TEST_libosmocore_arm_none_eabi/arch…
Looks like the tests are failing. My build seems to work but when I run "make check-am" in tests I get a different error related to talloc. This is on a Debian 8 stable box using arm-none-eabi and newlib from debian packages. Maybe the
make of timer_test fails and doesn't log somehow? I"m not sure.
craig@z500:~/libosmocore/tests$ vi timer/timer_test.
timer_test.c timer_test.ok
craig@z500:~/libosmocore/tests$ vi timer/timer_test.c
craig@z500:~/libosmocore/tests$ make check-am
make timer/timer_test sms/sms_test ussd/ussd_test smscb/smscb_test bits/bitrev_test a5/a5_test conv/conv_test auth/milenage_test lapd/lapd_test gsm0808/gsm0808_test gsm0408/gsm0408_test gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test gprs/gprs_test kasumi/kasumi_test gea/gea_test logging/logging_test fr/fr_test codec/codec_test loggingrb/loggingrb_test strrb/strrb_test vty/vty_test comp128/comp128_test utils/utils_test smscb/gsm0341_test stats/stats_test ctrl/ctrl_test bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test write_queue/wqueue_test socket/socket_test coding/coding_test conv/conv_gsm0503_test abis/abis_test endian/endian_test sercomm/sercomm_test
make[1]: Entering directory '/home/craig/libosmocore/tests'
CC timer/timer_test.o
In file included from timer/timer_test.c:31:0:
../include/osmocom/core/talloc.h:4:20: fatal error: talloc.h: No such file or directory
#include <talloc.h>
^
compilation terminated.
Makefile:1336: recipe for target 'timer/timer_test.o' failed
make[1]: *** [timer/timer_test.o] Error 1
make[1]: Leaving directory '/home/craig/libosmocore/tests'
Makefile:1529: recipe for target 'check-am' failed
make: *** [check-am] Error 2
Hi Harald and Craig,
> select.c:27:24: fatal error: sys/select.h: No such file or directory
> #include <sys/select.h>
I have the same issue with:
gcc-arm-none-eabi 4.8.2-14ubuntu1+6
binutils-arm-none-eabi 2.24-2ubuntu2+4
libnewlib-arm-none-eabi 2.1.0-3
> * remove 'talloc emulation' from osmocom-bb and use pseudotalloc from
> libosmocore.git (plus an embedded 'malloc' like umm_malloc)
Why do we need this hack (pseudotalloc)?
What if we could cross-compile libtalloc too, and link it against core?
> * have an (optional?) osmocom-bb makefile step to git clone + configure
> + make install libosmocore
Great idea! What about to have libosmocore as a git submodule inside
OsmocomBB (like OpenCL headers in hashcat)?
Also, I think it would be good to make libosmocore more modular,
because it could allow us to create more flexible builds (e.g. to compile
only what we need, not a whole library). This makes sense in case of
low RAM / ROM embedded systems. What do you think?
With best regards,
Vadim Yanitskiy.
I got around this error by adding a #if (!EMBEDDED) around all of select.c and moving the #include "../config.h" to the top.
diff --git a/src/select.c b/src/select.c
index 8ed7f1b..e51e50a 100644
--- a/src/select.c
+++ b/src/select.c
@@ -20,6 +20,8 @@
* MA 02110-1301, USA.
*/
+#include "../config.h"
+#if (!EMBEDDED)
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
@@ -30,7 +32,6 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/timer.h>
-#include "../config.h"
#ifdef HAVE_SYS_SELECT_H
@@ -235,3 +236,4 @@ struct osmo_fd *osmo_fd_get_by_fd(int fd)
/*! @} */
#endif /* _HAVE_SYS_SELECT_H */
+#endif /* !EMBEDDED */
After that the next error in building is related to talloc.
make[3]: Entering directory '/home/craig/libosmocore/src'
CC select.lo
CC utils.lo
In file included from ../include/osmocom/core/utils.h:4:0,
from utils.c:30:
../include/osmocom/core/talloc.h:4:20: fatal error: talloc.h: No such file or directory
#include <talloc.h>
I didn't see the laforge/pseudotalloc branch. Did you forget to push it? How is this dealt with currently in osmocom-bb for embedded?
Thanks,
Craig
Looks like in package libnewlib-dev for stretch (unstable) we have sys/select.h but in jessie (stable) it is not included.
https://packages.debian.org/stretch/libnewlib-devhttps://packages.debian.org/jessie/libnewlib-dev
craig@box:~/libosmocore$ ./configure --prefix=/usr/local/arm-none-eabi --host=arm-none-eabi --enable-embedded --disable-shared CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
craig@box:~/libosmocore$ make
make all-recursive
make[1]: Entering directory '/home/craig/libosmocore'
Making all in include
make[2]: Entering directory '/home/craig/libosmocore/include'
make all-am
make[3]: Entering directory '/home/craig/libosmocore/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/craig/libosmocore/include'
make[2]: Leaving directory '/home/craig/libosmocore/include'
Making all in src
make[2]: Entering directory '/home/craig/libosmocore/src'
make all-am
make[3]: Entering directory '/home/craig/libosmocore/src'
CC select.lo
select.c:27:24: fatal error: sys/select.h: No such file or directory
#include <sys/select.h>
^
compilation terminated.
Makefile:510: recipe for target 'select.lo' failed
make[3]: *** [select.lo] Error 1
make[3]: Leaving directory '/home/craig/libosmocore/src'
Makefile:373: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/craig/libosmocore/src'
Makefile:519: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/craig/libosmocore'
Makefile:382: recipe for target 'all' failed
make: *** [all] Error 2
--------------------------------------------
On Tue, 5/16/17, Harald Welte <laforge(a)gnumonks.org> wrote:
Subject: removing ancient libosmocore fork from osmocom-bb.git
To: baseband-devel(a)lists.osmocom.org
Date: Tuesday, May 16, 2017, 11:18 AM
Dear all,
when we initially crated OsmocomBB, we moved the code that
it shared
with the pre-existing OpenBSC project into libosmocore.git,
where
libosmocore and libosmogsm are built. As libosmocore
was quite a bit in
flux (and we didn't have jenkins+gerrit yet), we decided to
have a local
clone of libosmocore.git as a git-subtree module inside
osmocom-bb.git
Meanwhile, upstream libosmocore received more and more code,
and none
of that was ever built with an 'arm-non-eabi' toolchain and
--enable-embedded.
I've been working quite a bit during the last week on making
that
embedded build work again.
The idea is to be able to configure + build libosmocore.git
master using
something like
./configure
--prefix=/usr/local/arm-none-eabi \
--host=arm-none-eabi
\
--enable-embedded \
--disable-shared \
CFLAGS="-Os
-ffunction-sections -fdata-sections -nostartfiles
-nodefaultlibs"
and then install it onto the host pc. I've used
/usr/local/arm-none-eabi as the prefix, but it could of
course be
anywhere.
The above already works for me on Debian unstable using
libosmocore.git
master. I have some patches pending in laforge/sercomm and
laforge/pseudotalloc, but those are not mandatory to make
the build work
The local clone of libosmocore in OsmocomBB
src/shared/libosmocore will
be removed, and the Makefiles of osmocom-bb instructed to
use the
system-installed libosmocore from /usr/local/arm-none-eabi
(see my
'laforge/remove-libosmocore' branch in). This also
already "works" on
my Debian unstable system, in as far as there are no
unresolved symbols
or other compilation/linking issues, and the firmware images
are
generated. I have not tested any of the resulting
binaries yet, and as
I'm travelling without compatible hardware (and overloaded),
it's
unlikely that I'll be able to test it soon.
Nevertheless, this is what I would like to move to. If
anyone wants to
try if he can build the embedded libosmocore and resulting
osmocom-bb
from laforge/remove-libosmocore branch, please do so and
report your
progress/success/issues here.
Next steps (after validating the above) are:
* remove old sercomm.c code from osmocom-bb and use the new
code from
libosmocore
* remove 'talloc emulation' from osmocom-bb and use
pseudotalloc from
libosmocore.git (plus an embedded 'malloc' like
umm_malloc)
Further ideas:
* create Debian/Ubuntu package of cross-compiled libosmocore
for
embedded-arm, which we can add to the Osmocom nightly
builds apt
repository.
* have an (optional?) osmocom-bb makefile step to git clone
+ configure
+ make install libosmocore
Anyone interested in helping out with this, please feel free
to join in.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable
marketing option."
(ETSI EN 300 175-7 Ch. A6)
Dear all,
when we initially crated OsmocomBB, we moved the code that it shared
with the pre-existing OpenBSC project into libosmocore.git, where
libosmocore and libosmogsm are built. As libosmocore was quite a bit in
flux (and we didn't have jenkins+gerrit yet), we decided to have a local
clone of libosmocore.git as a git-subtree module inside osmocom-bb.git
Meanwhile, upstream libosmocore received more and more code, and none
of that was ever built with an 'arm-non-eabi' toolchain and
--enable-embedded.
I've been working quite a bit during the last week on making that
embedded build work again.
The idea is to be able to configure + build libosmocore.git master using
something like
./configure --prefix=/usr/local/arm-none-eabi \
--host=arm-none-eabi \
--enable-embedded \
--disable-shared \
CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
and then install it onto the host pc. I've used
/usr/local/arm-none-eabi as the prefix, but it could of course be
anywhere.
The above already works for me on Debian unstable using libosmocore.git
master. I have some patches pending in laforge/sercomm and
laforge/pseudotalloc, but those are not mandatory to make the build work
The local clone of libosmocore in OsmocomBB src/shared/libosmocore will
be removed, and the Makefiles of osmocom-bb instructed to use the
system-installed libosmocore from /usr/local/arm-none-eabi (see my
'laforge/remove-libosmocore' branch in). This also already "works" on
my Debian unstable system, in as far as there are no unresolved symbols
or other compilation/linking issues, and the firmware images are
generated. I have not tested any of the resulting binaries yet, and as
I'm travelling without compatible hardware (and overloaded), it's
unlikely that I'll be able to test it soon.
Nevertheless, this is what I would like to move to. If anyone wants to
try if he can build the embedded libosmocore and resulting osmocom-bb
from laforge/remove-libosmocore branch, please do so and report your
progress/success/issues here.
Next steps (after validating the above) are:
* remove old sercomm.c code from osmocom-bb and use the new code from
libosmocore
* remove 'talloc emulation' from osmocom-bb and use pseudotalloc from
libosmocore.git (plus an embedded 'malloc' like umm_malloc)
Further ideas:
* create Debian/Ubuntu package of cross-compiled libosmocore for
embedded-arm, which we can add to the Osmocom nightly builds apt
repository.
* have an (optional?) osmocom-bb makefile step to git clone + configure
+ make install libosmocore
Anyone interested in helping out with this, please feel free to join in.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)