Marian Buschsieweke
f34cd3f7c1
cpu/native: fix build with musl
...
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.
2024-05-31 12:18:33 +02:00
Frederik Haxel
16eff9b6ed
native: Linux/x86_64 support
...
Initial version to test 64 bit compatibility.
Instead of a separate board, the inital version for Linux/x86_64 is enabled
by setting the environment variable `NATIVE_64BIT=y` and compiling as usual.
Not currently implemented:
* Architectures other than x86_64 or operating systems other than Linux
* No FreeBSD support
* No Aarch support
* Rust support for x86_64
2024-01-30 16:33:19 +01:00
Benjamin Valentin
006ad81c0c
cpu/native: wire up more fs related syscalls
2023-04-25 13:28:20 +02:00
Teufelchen1
10cada1b8d
native/syscalls: rename real_clock_gettime to clock_gettime
2023-04-17 15:21:52 +02:00
bors[bot]
d4d91492cd
Merge #18100 #19121 #19164 #19169
...
18100: core/assert: print backtrace on failed assertion r=kaspar030 a=benpicco
19121: socket_zep: only report size of single datagram r=kaspar030 a=benpicco
19164: cpu/sam0_common: move adc_res_t to common code r=dylad a=benpicco
19169: tests/driver_ws281x: don't overwrite board definition r=benpicco a=benpicco
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-18 23:59:58 +00:00
Benjamin Valentin
81625fd5f2
doc: sort all stdio implementations into sys_stdio group
2023-01-13 11:08:22 +01:00
Benjamin Valentin
8a80e70e5e
cpu/native: syscalls: provide real_recv()
2023-01-10 14:24:16 +01:00
Teufelchen1
c9e9a8d2f1
native: Remove code used for __MACH__ target
2022-12-22 17:57:25 +01:00
Benjamin Valentin
0aa931ad7d
cpu/native: povide real_ftell() function
2022-09-29 14:55:27 +02:00
Benjamin Valentin
1a2984b786
cpu/native: fix build with gcc 11
...
This fixes the following warning with GCC 11.2:
cpu/native/include/native_internal.h:153:13: error: variably modified ‘__isr_stack’ at file scope
153 | extern char __isr_stack[SIGSTKSZ];
| ^~~~~~~~~~~
cpu/native/include/native_internal.h:154:13: error: variably modified ‘__end_stack’ at file scope
154 | extern char __end_stack[SIGSTKSZ];
2021-10-12 14:56:11 +02:00
Benjamin Valentin
99341a3dc4
cpu/native: export send() as real_send()
2021-02-20 20:35:33 +01:00
Benjamin Valentin
17199dbb1c
socket_zep: allow to specify MAC address of ZEP device
...
Add a command-line parameter for setting the EUI-64 of a ZEP device.
This allows a native node to use a persistent ZEP address across reboots.
2021-02-16 18:57:27 +01:00
1d5e2e9cd9
all: remove traces of kernel_types.h
...
Automatically removed using:
$ git grep -l kernel_types | xargs sed -i '/^#include .kernel_types/d'
2020-11-25 17:52:34 +01:00
a274ea45fc
cpu/native: async_read: rewrite select() call to poll()
...
select() can not listen to POLLPRI events which are used by the
Kernel's GPIO API.
In preparation for that, rewrite async_read() to use poll() instead
of select().
2020-07-21 11:50:18 +02:00
4133908fe0
cpu/native: fix doxygen grouping
2018-06-11 19:12:02 +02:00
7847a91e12
cpu: instead of cpp-style, use C-style comments
2018-02-06 16:59:58 +01:00
Martine Lenders
81ef15287a
native: provide socket-based ZEP device
2018-01-18 09:15:37 +01:00
0fcc7d3834
cleanup: apply headerguard script output
2017-05-24 17:54:02 +02:00
Martine Lenders
25b2e65b77
cpu: native: make syscalls vfs ready (introduce real_fcntl)
2017-03-22 20:18:57 +01:00
Vincent Dupont
9e8cb3d135
native: add mtd-compliant flash emulation
2017-03-16 11:24:22 +01:00
Oleg Hahm
bfc439aa04
doc: native: do not parse internal functions
2017-01-15 13:06:43 +01:00
Ludwig Ortmann
0b72be7c87
native: add syscall-leave trampoline
2016-10-15 07:50:44 +02:00
9082273746
core: header cleanup
2016-02-28 22:46:28 +01:00
Ludwig Knüpfer
eda6328e21
documentation: update my name (Ortmann -> Knüpfer)
2015-09-27 18:58:30 +02:00
4e8bf2cb69
cpu: native: remove hwtimer traces
2015-09-16 10:58:53 +02:00
Hauke Petersen
7701aed546
Merge pull request #3164 from kaspar030/remove_uart0
...
sys: remove uart0
2015-09-04 18:54:30 +02:00
0e4386a46f
native: remove uart0
2015-09-04 17:46:23 +02:00
ef972735dc
sys: net: replace dev_eth with netdev2, adapt native tap driver
2015-09-04 15:39:04 +02:00
Ludwig Ortmann
9a130e2e84
cpu/native: add some syscall wrappers
...
Add wrappers for chdir, setsid, and umask.
2015-02-17 22:00:14 +01:00
Cenk Gündoğan
432f0014c0
cpu: restrict => __restrict
2015-02-08 19:15:14 +01:00
Ludwig Ortmann
88fa49ab38
cpu/native: add high-quality random implementation
...
Per default random data is read from `/dev/random` now.
If specified (e.g. `-s 4711`), data is generated by calls to POSIX
random function like before. The POSIX random API is initialize with
the given seed (`srandom(4711);` in this example).
2015-01-14 11:51:23 +01:00
Oleg Hahm
f8ecbf2a0a
doc: add to group instead of redefining
2014-11-30 21:45:24 +01:00
Ludwig Ortmann
00092e8308
native: add time syscalls
2014-11-25 22:47:27 +01:00
Ludwig Ortmann
7901d24053
native: add missing syscall declarations
2014-11-25 22:47:26 +01:00
BytesGalore
a4d2ee307c
cpu: added extern "C"
to headers
2014-11-24 19:10:15 +01:00
Ludwig Ortmann
d8641ff525
native: add random syscalls
2014-11-19 14:26:58 +01:00
Ludwig Ortmann
42e43d5e12
FIXUP: remove erroneous comment
2014-11-17 09:56:03 +01:00
Ludwig Ortmann
acaa6481cb
native: add more syscall declarations
2014-11-14 20:52:17 +01:00
Ludwig Ortmann
641cb4c488
native: add accept syscall declaration
2014-11-14 17:49:56 +01:00
Ludwig Ortmann
7bcf896ec6
native: add and use callback type
2014-10-30 12:11:22 +01:00
Ludwig Ortmann
b849b848a0
native: add two more syscall declarations
2014-10-01 21:56:43 +02:00
Ludwig Ortmann
289c4c0ee4
doc: add license headers to some .h files
2014-09-18 17:45:11 +02:00
Oleg Hahm
983d056c75
core: harmonizes the data type for the process ID
...
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
2014-08-01 12:02:54 +02:00
Ludwig Ortmann
3cda0369cb
native: cleanup
...
fix style
fix some syscall declarations
reorder syscall declarations
init syscalls in dedicated function
substitute 1 with EXIT_FAILURE
2014-07-27 15:16:38 +02:00
Ludwig Ortmann
c6bcc344ca
native: uart reconnect buffer replay
...
When using socket stdio, add option to replay what has been written to
stdout while not connected (`-r`).
The implementation is to simply use the existing log file (which is
implicitly created when the option is used), and read from it until
EOF upon reconnect.
closes #476
2014-07-27 15:16:38 +02:00
René Kijewski
3063e3c2b1
Fix all warnings for native and qemu-i386
...
Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
2014-06-24 16:50:32 +02:00
René Kijewski
2f871ca885
native: remove some warnings about undef functions
...
This PR implements `real_X` for `X in (fork, dup2, unlink, execve)`.
These function caused warnings while making the default example.
2014-06-18 20:34:12 +02:00
René Kijewski
2e9a1773e9
native: use real_pipe()
and read_close()
2014-06-14 00:39:02 +02:00
Ludwig Ortmann
dbc36fc2c5
native: add id option
2014-06-06 16:30:54 +02:00
Ludwig Ortmann
1e5e19bc23
native: set optional path with unix socket option
...
fixes #1045
2014-06-03 16:46:40 +02:00