This changes a bunch of things that allows building with the musl C lib,
provided that `libucontext-dev` and `pkg-config` are installed.
Note that installing libucontext makes absolutely zero sense on C libs
that do natively provide this deprecated System V API, such as glibc.
Hence, it no sane glibc setup is expected to ever have libucontext
installed.
A main pain point was that argv and argc are expected to be passed to
init_fini handlers, but that is actually a glibc extension. This just
parses `/proc/self/cmdline` by hand to populate argv and argc during
startup, unless running on glibc.
b4f29035ce adapted the can_linux module to
the periph_can interface. This is a cleanup of some things that stayed
behind. Here the makefile is removed, the references to can_linux in the
dependency resolution and configuration Makefile are changed to the
standard periph_can, and the startup code is adapted.
If no local port is specified for socket_zep to listen on, don't listen
on a local port at all instead of listening on a default port.
This does not work with multiple instances of socket_zep anyway.
Native CAN device was not properly ported to periph_can interface.
This commit fixes this by renaming all needed structures and files so
auto_init_can can initialize the native device. FEATURES_PROVIDED is
also updated for native.
The `_zep_params_setup()` function will modify the `argv` string passed to it.
This is a problem because that string is re-used on reboot.
The modified string is then later processed in `socket_zep_setup()`, so we have to keep
the memory around.
The `strdup()` fulfills all this and the memory is freed by `execve()` on reboot.
A proper solution would be to parse the strings in `_zep_params_setup()`.
Building any application with gcc 7.1.1 fails with the following error:
```
~/RIOT % make -C examples/hello-world
make: Entering directory 'RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".
"make" -C RIOT/boards/native
"make" -C RIOT/boards/native/drivers
"make" -C RIOT/core
"make" -C RIOT/cpu/native
RIOT/cpu/native/startup.c: In function ‘startup’:
RIOT/cpu/native/startup.c:292:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
usage_exit(EXIT_SUCCESS);
^~~~~~~~~~~~~~~~~~~~~~~~
RIOT/cpu/native/startup.c:293:13: note: here
case 'i':
^~~~
cc1: all warnings being treated as errors
make[2]: *** [RIOT/Makefile.base:81: RIOT/examples/hello-world/bin/native/cpu/startup.o] Error 1
make[1]: *** [RIOT/Makefile.base:20: ALL--RIOT/cpu/native] Error 2
make: *** [RIOT/examples/hello-world/../../Makefile.include:297: all] Error 2
make: Leaving directory 'RIOT/examples/hello-world'
```
```
% gcc --version
gcc (GCC) 7.1.1 20170528
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
fixed by adding a `break` statement after `usage_exit()`
uart0 functionality is removed by #3164. This patch implements periph/uart,
rather than deprecated uart0, using /dev/tty.
To use with netdev2_tap simultaneously, this patch adds asynchronus read system
and modifies netdev2_tap to use it.
A TTY device is specified on command line with -c (COM) option, since -t was
used by the old implementation.
This patch also implements empty GPIO driver needed by the xbee driver.
The hwtimer_wait test was tortured with the
following script which ran several hours.
----
make clean all-debug
while :
do
date
./bin/native/hwtimer_wait.elf > log &
pid=$!
sleep 20
success=$(cat log|grep success)
if [ "$success" != "success" ]
then
date
echo "BUG"
exit
fi
kill $pid
done
----
Closes#715.