1845 Commits

Author SHA1 Message Date
Christian Mauderer
879eaa7c1a userspace-header-gen: Special case for Yacc / Lex.
Some variables generated by Yacc / Lex need a special treatment. That
had been done by manual editing of the generated headers in the past.
This patch integrate these changes into the generator.
2018-08-01 09:55:27 +02:00
Christian Mauderer
9ea8664ba2 random: Implement read_random via getentropy. 2018-08-01 09:55:27 +02:00
Christian Mauderer
9efc6500fb crypto/sha2: Remove left over file.
This file seems to be imported from a long gone version.
2018-08-01 09:55:27 +02:00
Sebastian Huber
137250239e Make sure CALLOUT_DFRMIGRATION is not used
This flag supports the callout migration in FreeBSD.  This feature is
not supported by libbsd.
2018-07-26 14:49:35 +02:00
Sebastian Huber
e37f03e47a Make sure CALLOUT_PROCESSED is not used
This flag is only used in combination with the callout expire list,
which we do not use in libbsd.
2018-07-26 14:35:56 +02:00
Sebastian Huber
6d9d7b1956 Critical bug fix for callouts
FreeBSD has two callout executors, one in software and one in hardware
interrupt context.  In libbsd, all callouts are executed by the timer
server.  Entirely remove the different execution contexts for libbsd.
Previously, this was not properly done which could result an invalid
callout_drain() sequence leading to system memory corruption.
2018-07-26 14:12:46 +02:00
Sebastian Huber
3df89c0ef9 selectpollkqueue01: Invalidate file descriptor
This is not a functional change or a fix.
2018-07-26 13:53:17 +02:00
Sebastian Huber
6fb003f588 Fix sporadic test failures via uma_timeout() 2018-07-26 12:03:45 +02:00
Sebastian Huber
94b5368388 Avoid malloc() in getsockaddr()
The getsockaddr() function is used to allocate a struct sockaddr of the
right length and initialize it with userspace provided data.  It is used
for the connect(), bind() and sendit() family functions.  In particular,
the sendit() function is used by the UDP send functions.  This means
each UDP send needs a malloc() and free() invocation.  This is a
performance problem in RTEMS (first-fit heap) and may lead to heap
fragmentation.  Replace the malloc() allocation with a stack allocation.
This requires SOCK_MAXADDRLEN (= 255) of additional stack space for
libbsd.

A further optimization would be to get rid of the stack copy of the
socket address.  However, this would require to check each consumer of
the address to ensure that it is not modified.
2018-07-04 07:20:37 +02:00
Nicolas Tsiogkas
e6f6b5e619 BPF(9): Pass flags to bpfopen() 2018-07-04 07:20:37 +02:00
Sebastian Huber
a1e4757a30 syscalls01: Fix sporadic test failures 2018-07-02 09:16:40 +02:00
Christian Mauderer
a07eb67c49 rtems_waf: Fix show-commands option. 2018-06-18 13:22:49 +02:00
Christian Mauderer
aad7461410 rtems_waf: Move to the public repositories.
For an update from an earlier version it is necessary to do a

    git submodule sync rtems_waf
    git submodule update rtems_waf

after this commit is applied to update the submodules URL.
2018-06-18 13:15:51 +02:00
Christian Mauderer
f8cf0746b3 beagle: Disable WiFi if libbsd is build without it.
Update #3351.
2018-06-05 09:59:16 +02:00
Christian Mauderer
e1d62e8ace waf: Fix python3 compatibility. 2018-05-24 11:20:34 +02:00
Sebastian Huber
b2eb48c23b dhcpcd: Add hooks 2018-05-08 07:37:17 +02:00
Sebastian Huber
8bd38d645c dhcpcd: Add rtems_dhcpcd_start()
Use it throughout to start the DHCP client (dhcpcd).
2018-05-08 06:50:17 +02:00
Sebastian Huber
bd09f9f132 rc_conf: Do not create directories used by dhcpcd
The dhcpcd will create the directories on its own.
2018-05-08 06:50:17 +02:00
Sebastian Huber
9c570da872 rc_conf: Include missing header files 2018-05-08 06:50:17 +02:00
Christian Mauderer
dd35ec5cd7 waf: Allow to add libs per test.
Update #3419.
2018-05-04 07:15:36 +02:00
Christian Mauderer
a779a3b870 pfctl: Undef INET6 to avoid warning. 2018-05-03 07:09:46 +02:00
Christian Mauderer
338f3005fc buildset: Add minimal and everything config.
This adds two new buildset configurations: One that leaves out as much
features as possible and one that enables all features. For the default
configuration WiFi support is now disabled.

To disable IPv6 for the minimal configuration, all -DINET6 are
eliminated in libbsd.py. They are now replaced by a #ifdef that checks
for RTEMS_BSD_MODULE_NETINET6 instead.

Close #3351.
2018-05-03 07:09:46 +02:00
Christian Mauderer
4eb250246d tcpdump: Remove unused file. 2018-05-03 07:09:46 +02:00
Christian Mauderer
93f19042f9 waf: Generate a rtems/bsd/modules.h
The generated file defines a RTEMS_BSD_MODULE_xxx for each enabled
module. That is usefull for conditional compilation depending on whether
a module is build not.

Update #3351.
2018-05-03 07:09:46 +02:00
Christian Mauderer
1588cf1e03 waf: Fix source code generators.
There have been some bugs with the strings left from the transition to
directly building from libbsd.py.
2018-05-03 07:09:46 +02:00
Christian Mauderer
821976e825 waf: Fix usage of build-include from config. 2018-05-03 07:09:46 +02:00
Sebastian Huber
634b3bfece rtems-debugger: Remove files
They are now in the main RTEMS sources.

Update #3419.
2018-05-02 10:36:41 +02:00
Sebastian Huber
443a058db4 Use network services from RTEMS
Close #3419.
2018-04-30 13:42:18 +02:00
Sebastian Huber
b1404f2392 Add DHCP clientid to test default network init 2018-04-30 13:42:18 +02:00
Sebastian Huber
ef5d536f84 at91_mci: Simplify XDMA usage 2018-04-27 10:14:44 +02:00
Sebastian Huber
d45899bce8 at91_mci: Get rid of bounce buffer 2018-04-27 09:05:37 +02:00
Sebastian Huber
3fac9e9cd4 at91_mci: Use real interrupt
Execute at91_mci_intr() in interrupt context.  Synchronize MMC requests
via RTEMS interrupt lock.
2018-04-26 15:23:08 +02:00
Sebastian Huber
c7e162abd8 mmc: Optimize mmc_wait_for_req()
Use a self-contained RTEMS binary semaphore instead of msleep() and
wakeup().  This is itself more efficient and in addition allows the use
of mmc_wakeup() in interrupt context.
2018-04-26 15:19:42 +02:00
Sebastian Huber
4b1426368b at91_mci: Fix use of BOARD_MCK 2018-04-26 11:14:39 +02:00
Sebastian Huber
f092186c84 at91_mci: Fix use of pre-processor defines 2018-04-26 11:14:10 +02:00
Christian Mauderer
854427bec4 waf: Add configurations with different modules.
Update #3351
2018-04-10 08:55:47 +02:00
Christian Mauderer
fedd993da8 freebsd-to-rtems.py: Use all modules.
Update #3351
2018-04-10 08:55:47 +02:00
Christian Mauderer
494b156fd2 waf: Remove module without sources.
There are no imported sources for a number of modules. Some of them
doesn't even have the right paths for freebsd-org anymore. Therefore
this patch removes the following modules:

- dev_usb_add_on
- dev_usb_bluetooth
- dev_usb_controller_add_on
- dev_usb_misc
- dev_usb_storage_add_on
- dev_usb_template
- dev_nic_cs

Update #3351
2018-04-10 08:55:47 +02:00
Christian Mauderer
a6a6d54909 waf: Fix freebsd-to-rtems.py.
Update #3351
2018-04-10 08:55:28 +02:00
Chris Johns
d797c5dcd2 waf: Refactor libbsd.py to support per module generation.
This change allows us to control the modules we want to build.

Update #3351
2018-04-10 08:54:58 +02:00
Chris Johns
f7a09b5985 waf: Support building from libbsd.py directly from waf.
Remove the need to generate a waf script.

Move various pieces of data from the builder code to libbsd.py and make
it configuration data.

Update #3351
2018-04-10 08:54:52 +02:00
Sebastian Huber
8189ea825a CRYPTO(4): Port to RTEMS 2018-03-28 07:59:12 +02:00
Sebastian Huber
6600368589 CRYPTO(4): Import from FreeBSD 2018-03-27 14:42:46 +02:00
Sebastian Huber
b8f7836e44 DEVFS(5): Fix warning 2018-03-27 14:42:46 +02:00
Sebastian Huber
8993827a73 DEVFS(5): Properly initialize fp->f_cdevpriv 2018-03-27 14:42:46 +02:00
Christian Mauderer
7ec935e03f vprintf: Add handler that mutes all output.
This adds a vprintf handler that can be used to suppress all outputs of
the libbsd.
2018-03-23 09:36:35 +01:00
Sebastian Huber
d300a34424 Silence rtems_bsd_ifconfig() 2018-03-23 09:14:34 +01:00
Christian Mauderer
b3d1e6a9c3 config.inc: Remove unused values. 2018-03-22 07:09:08 +01:00
Christian Mauderer
b2a210ca3e if_atsam: Add checksum offload. 2018-03-21 09:14:25 +01:00
Christian Mauderer
67c35b9ed1 openssl: Provide deprecated functions.
Some applications (like the civetweb web server) still use functions
that are deprecated by openssl. If OPENSSL_NO_DEPRECATED is defined,
openssl will not provide these functions. This patch removes the define
so that the functions are available.
2018-03-21 09:14:25 +01:00