From 5315d35d5e44d83b029c31f9bb660b9e3e3b2c1a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 20 Dec 2013 10:14:26 +0100 Subject: Always enable IPv6 --- .gitignore | 1 - Makefile | 13 +--- config.inc | 1 - freebsd-to-rtems.py | 14 +--- rtemsbsd/include/machine/rtems-bsd-kernel-space.h | 83 ++++++++++++++++++++++ .../include/machine/rtems-bsd-kernel-space.h.in | 83 ---------------------- 6 files changed, 85 insertions(+), 110 deletions(-) create mode 100644 rtemsbsd/include/machine/rtems-bsd-kernel-space.h delete mode 100644 rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in diff --git a/.gitignore b/.gitignore index 44ec0c7c..aa701aec 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ freebsd/lib/libc/net/nsparser.h freebsd/lib/libc/net/nslexer.c freebsd/lib/libc/net/nsparser.c rtemsbsd/rtems/rtems-kvm-symbols.c -rtemsbsd/include/machine/rtems-bsd-kernel-space.h testsuite/include/rtems/bsd/test/network-config.h /*.i /*.s diff --git a/Makefile b/Makefile index da154b54..c0497ec4 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,6 @@ CFLAGS += -std=gnu99 CFLAGS += -MT $@ -MD -MP -MF $(basename $@).d NEED_DUMMY_PIC_IRQ=yes -# do nothing default so sed on rtems-bsd-kernel-space.h always works. -SED_PATTERN += -e 's/^//' - TEST_NETWORK_CONFIG = testsuite/include/rtems/bsd/test/network-config.h TESTS = @@ -43,7 +40,7 @@ O_FILES = D_FILES = LIB = libbsd.a -LIB_GEN_FILES = rtemsbsd/include/machine/rtems-bsd-kernel-space.h +LIB_GEN_FILES = LIB_C_FILES = LIB_C_FILES += rtemsbsd/local/bus_if.c LIB_C_FILES += rtemsbsd/local/cryptodev_if.c @@ -294,7 +291,6 @@ LIB_C_FILES += freebsd/sys/netinet/libalias/alias_proxy.c LIB_C_FILES += freebsd/sys/netinet/libalias/alias.c LIB_C_FILES += freebsd/sys/netinet/libalias/alias_skinny.c LIB_C_FILES += freebsd/sys/netinet/libalias/alias_sctp.c -ifneq ($(DISABLE_IPV6),yes) LIB_C_FILES += freebsd/sys/net/if_stf.c LIB_C_FILES += freebsd/sys/netinet6/dest6.c LIB_C_FILES += freebsd/sys/netinet6/frag6.c @@ -323,9 +319,6 @@ LIB_C_FILES += freebsd/sys/netinet6/route6.c LIB_C_FILES += freebsd/sys/netinet6/scope6.c LIB_C_FILES += freebsd/sys/netinet6/sctp6_usrreq.c LIB_C_FILES += freebsd/sys/netinet6/udp6_usrreq.c -else -SED_PATTERN += -e 's/^\#define INET6 1/\/\/ \#define INET6 1/' -endif # DISABLE_IPV6 LIB_C_FILES += freebsd/sys/netipsec/ipsec.c LIB_C_FILES += freebsd/sys/netipsec/ipsec_input.c LIB_C_FILES += freebsd/sys/netipsec/ipsec_mbuf.c @@ -1310,10 +1303,6 @@ $(TEST_NETWORK_CONFIG): $(TEST_NETWORK_CONFIG).in config.inc -e 's/@NET_CFG_GATEWAY_IP@/$(NET_CFG_GATEWAY_IP)/' \ < $< > $@ -# The following targets use the MIPS Generic in_cksum routine -rtemsbsd/include/machine/rtems-bsd-kernel-space.h: rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in - sed $(SED_PATTERN) <$< >$@ - CPU_SED = sed CPU_SED += -e '/arm/d' CPU_SED += -e '/i386/d' diff --git a/config.inc b/config.inc index 5f4f2a57..472a9062 100644 --- a/config.inc +++ b/config.inc @@ -1,7 +1,6 @@ BSP = jmr3904 RTEMS_MAKEFILE_PATH = ${HOME}/newbsd/bsp-install/mips-rtems4.11/$(BSP) INSTALL_BASE = ${HOME}/newbsd/install -DISABLE_IPV6=no TEST_RUNNER = $(BSP) NET_CFG_SELF_IP = 10.0.2.1 NET_CFG_NETMASK = 255.255.0.0 diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py index f1220e16..92e8531f 100755 --- a/freebsd-to-rtems.py +++ b/freebsd-to-rtems.py @@ -434,9 +434,6 @@ class ModuleManager: 'CFLAGS += -MT $@ -MD -MP -MF $(basename $@).d\n' \ 'NEED_DUMMY_PIC_IRQ=yes\n' \ '\n' \ - '# do nothing default so sed on rtems-bsd-kernel-space.h always works.\n' \ - 'SED_PATTERN += -e \'s/^//\'\n' \ - '\n' \ 'TEST_NETWORK_CONFIG = testsuite/include/rtems/bsd/test/network-config.h\n' \ '\n' \ 'TESTS =\n' \ @@ -449,7 +446,7 @@ class ModuleManager: 'D_FILES =\n' \ '\n' \ 'LIB = libbsd.a\n' \ - 'LIB_GEN_FILES = rtemsbsd/include/machine/rtems-bsd-kernel-space.h\n' \ + 'LIB_GEN_FILES =\n' \ 'LIB_C_FILES =\n' for m in self.modules: if m.conditionalOn != "none": @@ -465,8 +462,6 @@ class ModuleManager: data += 'NEED_DUMMY_PIC_IRQ=no\n' data += 'endif\n' if m.conditionalOn != "none": - data += 'else\n' - data += 'SED_PATTERN += -e \'' + m.cppPattern +'\'\n' data += 'endif # ' + m.conditionalOn +'\n' data += '\n' \ 'ifeq ($(NEED_DUMMY_PIC_IRQ),yes)\n' \ @@ -496,10 +491,6 @@ class ModuleManager: '\t-e \'s/@NET_CFG_GATEWAY_IP@/$(NET_CFG_GATEWAY_IP)/\' \\\n' \ '\t< $< > $@\n' \ '\n' \ - '# The following targets use the MIPS Generic in_cksum routine\n' \ - 'rtemsbsd/include/machine/rtems-bsd-kernel-space.h: rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in\n' \ - '\tsed $(SED_PATTERN) <$< >$@\n' \ - '\n' \ 'CPU_SED = sed\n' \ 'CPU_SED += -e \'/arm/d\'\n' \ 'CPU_SED += -e \'/i386/d\'\n' \ @@ -560,7 +551,6 @@ class Module: def __init__(self, name): self.name = name self.conditionalOn = "none" - self.cppPattern = "s///" self.files = [] self.cpuDependentSourceFiles = {} self.dependencies = [] @@ -1711,8 +1701,6 @@ netinet.addKernelSpaceSourceFiles( ) netinet6 = Module('netinet6') -netinet6.conditionalOn = "DISABLE_IPV6" -netinet6.cppPattern = 's/^\#define INET6 1/\/\/ \#define INET6 1/' netinet6.addKernelSpaceHeaderFiles( [ 'sys/netinet6/icmp6.h', diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h new file mode 100644 index 00000000..2191f36e --- /dev/null +++ b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h @@ -0,0 +1,83 @@ +/** + * @file + * + * @ingroup rtems_bsd_machine + * + * @brief TODO. + */ + +/* + * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ +#define _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ + +/* FIXME: Update Newlib */ +#define MSIZE 256 + +/* FIXME: Update Newlib */ +#define __GLOBL1(sym) __asm__(".globl " #sym) +#define __GLOBL(sym) __GLOBL1(sym) + +#define __FreeBSD__ 1 + +/* General define to activate BSD kernel parts */ +#define _KERNEL 1 + +/* Symbol rename */ + +#include + +/* Assert */ + +void rtems_bsd_assert_func(const char *file, int line, const char *func, const char *expr); + +#ifdef RTEMS_BSD_NO_ASSERT +# define BSD_ASSERT(expr) ((void) 0) +#else +# define BSD_ASSERT(expr) ((expr) ? (void) 0 : rtems_bsd_assert_func(__FILE__, __LINE__, __func__, #expr)) +#endif + +/* General definitions */ + +#define M_RTEMS_HEAP 0 + +#define BSD_DEFAULT_FIB 0 + +#define BSD_DEFAULT_PID 0 + +#define BSD_DEFAULT_UID 0 + +#define BSD_DEFAULT_GID 0 + +#define BSD_DEFAULT_PRISON (&prison0) + +#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ */ diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in deleted file mode 100644 index 2191f36e..00000000 --- a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * - * @ingroup rtems_bsd_machine - * - * @brief TODO. - */ - -/* - * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ -#define _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ - -/* FIXME: Update Newlib */ -#define MSIZE 256 - -/* FIXME: Update Newlib */ -#define __GLOBL1(sym) __asm__(".globl " #sym) -#define __GLOBL(sym) __GLOBL1(sym) - -#define __FreeBSD__ 1 - -/* General define to activate BSD kernel parts */ -#define _KERNEL 1 - -/* Symbol rename */ - -#include - -/* Assert */ - -void rtems_bsd_assert_func(const char *file, int line, const char *func, const char *expr); - -#ifdef RTEMS_BSD_NO_ASSERT -# define BSD_ASSERT(expr) ((void) 0) -#else -# define BSD_ASSERT(expr) ((expr) ? (void) 0 : rtems_bsd_assert_func(__FILE__, __LINE__, __func__, #expr)) -#endif - -/* General definitions */ - -#define M_RTEMS_HEAP 0 - -#define BSD_DEFAULT_FIB 0 - -#define BSD_DEFAULT_PID 0 - -#define BSD_DEFAULT_UID 0 - -#define BSD_DEFAULT_GID 0 - -#define BSD_DEFAULT_PRISON (&prison0) - -#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_ */ -- cgit v1.2.3