Changeset f333955 in rtems-libbsd


Ignore:
Timestamp:
Aug 31, 2012, 11:50:17 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
b4cf93e
Parents:
0109975
Message:

Build System: Add option to disable IPV6 in orderly fashion

If you define DISABLE_IPV6=yes to the config.inc, then the
rtems-bsd-config.h file will be modified accordingly and
the IPV6 kernel sources will not be built. This is easier
to manage and more correct than having a patch to do the same.

Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r0109975 rf333955  
    33copied
    44libbsd.html
     5rtemsbsd/freebsd/machine/rtems-bsd-config.h
    56rtemsbsd/avr/avr/in_cksum.c
    67rtemsbsd/avr/include/freebsd/machine/in_cksum.h
  • Makefile

    r0109975 rf333955  
    1818NEED_DUMMY_PIC_IRQ=yes
    1919
    20 GENERATED_FILES =
     20GENERATED_FILES = rtemsbsd/freebsd/machine/rtems-bsd-config.h
    2121
    2222C_FILES =
     
    196196C_FILES += freebsd/netinet/libalias/alias_skinny.c
    197197C_FILES += freebsd/netinet/libalias/alias_sctp.c
     198ifneq ($(DISABLE_IPV6),yes)
    198199C_FILES += freebsd/netinet6/dest6.c
    199200C_FILES += freebsd/netinet6/frag6.c
     
    223224C_FILES += freebsd/netinet6/sctp6_usrreq.c
    224225C_FILES += freebsd/netinet6/udp6_usrreq.c
     226else
     227SED_PATTERN += -e 's/^\#define INET6 1/\/\/ \#define INET6 1/'
     228endif # DISABLE_IPV6
    225229C_FILES += freebsd/netipsec/ipsec.c
    226230C_FILES += freebsd/netipsec/ipsec_input.c
     
    652656
    653657# The following targets use the MIPS Generic in_cksum routine
     658rtemsbsd/freebsd/machine/rtems-bsd-config.h: rtemsbsd/freebsd/machine/rtems-bsd-config.h.in
     659        sed $(SED_PATTERN) <$< >$@
     660
    654661copied/rtemsbsd/avr/avr/in_cksum.c: freebsd/mips/mips/in_cksum.c
    655662        test -d copied/rtemsbsd/avr/avr/ || mkdir -p copied/rtemsbsd/avr/avr/
  • config.inc

    r0109975 rf333955  
    1 RTEMS_MAKEFILE_PATH = ${HOME}/newbsd/bsp-install/powerpc-rtems4.11/psim/
     1RTEMS_MAKEFILE_PATH = ${HOME}/newbsd/bsp-install/mips-rtems4.11/jmr3904/
    22INSTALL_BASE = ${HOME}/newbsd/install
     3DISABLE_IPV6=yes
    34
  • freebsd-to-rtems.py

    r0109975 rf333955  
    383383                        'NEED_DUMMY_PIC_IRQ=yes\n' \
    384384                        '\n' \
    385                         'GENERATED_FILES =\n' \
     385                        'GENERATED_FILES = rtemsbsd/freebsd/machine/rtems-bsd-config.h\n' \
    386386                        '\n'
    387387                data += 'C_FILES =\n'
    388388                for m in self.modules:
     389                        if m.conditionalOn != "none":
     390                                data += 'ifneq ($(' + m.conditionalOn + '),yes)\n'
     391
    389392                        for file in m.sourceFiles:
    390393                                data += 'C_FILES += ' + file.getMakefileFragment() + '\n'
     
    396399                                        data += 'NEED_DUMMY_PIC_IRQ=no\n'
    397400                                data += 'endif\n'
     401                        if m.conditionalOn != "none":
     402                                data += 'else\n'
     403                                data += 'SED_PATTERN += -e \'' + m.cppPattern +'\'\n'
     404                                data += 'endif # ' + m.conditionalOn +'\n'
    398405                for cpu in CPUsNeedingGenericIncksum:
    399406                        data += 'ifeq ($(RTEMS_CPU), ' + cpu + ')\n' \
     
    430437                        '\n' \
    431438                        '# The following targets use the MIPS Generic in_cksum routine\n'
     439                data += 'rtemsbsd/freebsd/machine/rtems-bsd-config.h: rtemsbsd/freebsd/machine/rtems-bsd-config.h.in\n'
     440                data += '\tsed $(SED_PATTERN) <$< >$@\n'
     441                data += '\n'
    432442                for cpu in CPUsNeedingGenericIncksum:
    433443                        dDir = 'copied/rtemsbsd/' + cpu + '/' + cpu + '/'
     
    531541        def __init__(self, name):
    532542                self.name = name
     543                self.conditionalOn = "none"
     544                self.cppPattern = "s///"
    533545                self.headerFiles = []
    534546                self.sourceFiles = []
     
    18281840
    18291841netinet6 = Module('netinet6')
     1842netinet6.conditionalOn = "DISABLE_IPV6"
     1843netinet6.cppPattern = 's/^\#define INET6 1/\/\/ \#define INET6 1/'
    18301844netinet6.addHeaderFiles(
    18311845        [
Note: See TracChangeset for help on using the changeset viewer.