53 Commits

Author SHA1 Message Date
Chris Johns
7f7363f5f4 waf: Implement module dependency checking in the build system
- Do not build a test if a dependency is not enabled.

- Perform a dependency check and generate an error if an enabled module
  depends on a disabled module.

Closes #4077
2020-09-16 15:49:37 +10:00
Chris Johns
c38f93b0c6 build: Separate the kernel and user land include paths
- Provide support for separate user and kernel include paths in
  libbsd.py.

- Update all added files with a suitable context to build them
  with. Supported contexts are `kernel` and `user`.

- Kernel source use the kernel, CPU, and build header paths in
  this order.

- User source use the user, kernel, CPU and build header paths
  in this order. The FreeBSD /usr/include tree has some kernel
  header files installed as well as user land header files. This
  complicates the separation as some kernel header files are not
  visible to user land code while other are. This is handled by
  appending the kernel header paths to the user header paths so
  user land code will include a user header with the same name as
  a kernel header over the kernel header but will find a kernel
  header if there is no matching user header file.

Closes #4067
2020-09-16 15:49:37 +10:00
Chris Johns
43742834c2 waf: Add a config report 2020-09-16 15:49:37 +10:00
Chris Johns
7afbccd8d7 waf: Reformat to PEP8 using yapf 2020-09-16 15:49:37 +10:00
Chris Johns
cbdeec00de waf: Change the test configure check for libdebugger to it's lib
- Add support for a 'test-if-library'

- Use rtems_waf's 'test_application()' fragment in the check_cc
  call

Closes #3948
2020-03-05 21:18:05 +11:00
Christian Mauderer
e2fc908281 builder.py: Add case for plain text files. 2019-04-04 09:07:09 +02:00
Sebastian Huber
504c1ab2c3 builder.py: Accept C++ source files 2019-02-18 10:01:09 +01:00
Sebastian Huber
dd60daaaa3 Allow *.c as kernel space header files
This is a workaround for the FreeBSD kernel space source file

  sys/opencrypto/xform.c

which includes a bunch of *.c files.

Update #3472.
2018-08-27 07:44:23 +02:00
Christian Mauderer
01855a5acd waf: Allow to only generate lex and yacc.
In some applications, it's usefull if the files generated by lex or yacc
are not build automatically. With that it is for example possible to
create a wrapper source file that sets some defines before the generated
code is parsed.
2018-08-01 09:55:27 +02:00
Christian Mauderer
dd35ec5cd7 waf: Allow to add libs per test.
Update #3419.
2018-05-04 07:15:36 +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
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
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
Sichen Zhao
8f2267bbb9 Port wpa supplicant to RTEMS.
Add wpa_supplicant lib support and shell command support in RTEMS.
2017-11-10 13:33:03 +01:00
Sebastian Huber
445d59e39c Remove ability to synchronize with Linux 2017-10-24 08:15:06 +02:00
Sebastian Huber
9cc419f32b Install Linux header files 2017-10-23 09:24:07 +02:00
Sebastian Huber
33d82be1e6 waf: Install arch-specific header files 2017-10-23 09:24:06 +02:00
Sebastian Huber
28ee86a9b0 Import DPAA driver snapshot
Imported from Freescale Linux repository

git://git.freescale.com/ppc/upstream/linux.git

commit 2774c204cd8bfc56a200ff4dcdfc9cdf5b6fc161.

Linux compatibility layer is partly from FreeBSD.
2017-10-23 08:46:43 +02:00
Sebastian Huber
238e27575c scripts: Support CPU-dependent RTEMS source files 2017-10-20 14:59:55 +02:00
Sebastian Huber
23d6e507d6 scripts: Support Linux import 2017-10-20 14:59:55 +02:00
Sebastian Huber
fa4ec51293 scripts: Generalize names 2017-10-20 14:59:55 +02:00
Sebastian Huber
79ec6b9e1c Install libpcap header files 2017-10-16 09:49:09 +02:00
Christian Mauderer
d18c6435c4 Allow to set optimization level during configure.
This allows to set the optimization level for libbsd via a configure
switch. Useful for building with for example no optimization during
debug or with size optimization for space restricted targets.
2017-10-02 14:18:52 +02:00
Sichen Zhao
1f7037d2e7 Port openssl to RTEMS. 2017-08-20 08:35:29 +10:00
Christian Mauderer
8d2dbd37b6 waf: Move glob operator ** to builder.py
This allows a finer decision which headers should be installed.
2017-08-20 08:35:10 +10:00
Christian Mauderer
307b324a42 waf_generator: Copy headers if necessary.
There are some cases, where a header is installed into a directory with
a different name then it's source directory. In that case, the build
might fail because the header is not found. One example would be the
<openssl/opensslv.h>. The source for this file is in
freebsd/crypto/openssl/crypto/opensslv.h.

To allow the build to work in such cases too, copy such files into a
temporary location in the build tree.
2017-08-20 08:35:04 +10:00
Sebastian Huber
3c967ca238 Use <sys/lock.h> provided by Newlib 2017-06-08 13:20:09 +02:00
Sebastian Huber
02373194fe Update due to Newlib 2017-06-07 changes
The following files are now provided by Newlib:

  * arpa/inet.h
  * net/if.h
  * netinet/in.h
  * netinet/tcp.h
  * sys/socket.h
  * sys/uio.h
  * sys/un.h

The <sys/param.h> and <sys/cpuset.h> are now compatible enough to be
used directly.

Update #2833.
2017-06-08 13:19:54 +02:00
Sebastian Huber
2a5d001ddb C11/C++11 are the default for the RTEMS 4.12 GCC 2017-02-21 08:34:58 +01:00
Christian Mauderer
ecda18104e freebsd/wlanstats: Port to FreeBSD. 2017-01-17 12:51:30 +01:00
Christian Mauderer
5c3223f138 ifconfig/wlan, expat, lib80211: Port to RTEMS. 2017-01-17 12:50:58 +01:00
Sebastian Huber
c40e45b75e Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
2017-01-10 09:53:31 +01:00
Sebastian Huber
34545adafd Use -Wno-pointer-sign
Pointer sign warnings are quite common in FreeBSD code.
2016-11-14 11:00:33 +01:00
Sebastian Huber
95a12a2ed8 Fix FreeBSD source file reverse conversion 2016-10-13 07:23:03 +02:00
Sebastian Huber
a9d38f5306 Remove AppleTalk support
Prepare update to FreeBSD 11.
2016-10-13 07:23:03 +02:00
Chris Johns
f9798adc4d Add a stats report command.
The report shows the level of changes we have made to the FreeBSD code.
2016-05-31 09:49:31 +10:00
Sebastian Huber
b6f6deb883 Directly use <sys/_types.h> provided by Newlib 2016-05-30 16:06:41 +02:00
Sebastian Huber
3d1e767c8f Directly use <sys/types.h> provided by Newlib 2016-05-30 16:06:41 +02:00
Sebastian Huber
2017a6df2b Directly use <sys/time.h> provided by Newlib 2016-05-30 16:06:41 +02:00
Chris Johns
533808975e Fix coding to be CamelCase. 2016-05-04 16:24:11 +10:00
Chris Johns
f478e3c6e5 Add sys/rpc so it is installed. 2016-05-04 15:58:25 +10:00
Chris Johns
f1fcdba863 waf: Refector the builder to work with Python3 and UTF-8 source files.
Python 3 requires better UTF-8 handling of files and FreeBSD has UTF-8
characters in some files.

Refactor builder.py to clean up the code and remove the need to have
a temporary file. Update other scripts to use the new code.
2016-04-27 12:08:23 +10:00
Chris Johns
97c5024a79 Add RTEMS version support, update all python to 2 and 3.
Add support to force the RTEMS version. This remove the need for using
the --rtems-version command line option if the automatic detection fails.

Update all python code to support python 2 and 3.

Update rtems_waf to the latest version to support the RTEMS version,
check environment variables and to display the CC version.

Sort all tests. I think the unsorted list is dependent on the version
of python and so would result in repo noise as if it regenerted.
2016-04-18 10:53:20 +10:00
Sebastian Huber
c6899159e4 Use optimization level -O2 2015-11-12 13:12:22 +01:00
Sebastian Huber
40f7d5cf7d builder.py: addTargetSourceCPUDependentSourceFiles
Avoid and delete this function.
2015-09-25 14:14:04 +02:00
Chris Johns
8440506ee8 Add tcpdump and libpcap.
- Update the file builder generator to handle generator specific cflags and
  includes. The tcpdump and libpcap have localised headers and need specific
  headers paths to see them. There are also module specific flags and these
  need to be passed to the lex and yacc generators.

- Add the tcpdump support.
2015-06-15 17:42:23 +10:00
Chris Johns
0768880d75 waf: Add install support.
Install to the --prefix path passed to configure.
2015-05-21 17:01:34 +10:00