source: rtems-libbsd/freebsd-to-rtems.py @ a803d120

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since a803d120 was a803d120, checked in by Joel Sherrill <joel.sherrill@…>, on 03/08/12 at 16:04:36

freebsd-to-rtems.py Enhancements

+ dry-run mode
+ early-exit mode
+ more verbose output
+ usage message improved
+ FreeBSD and RTEMS Directory error checking

  • Property mode set to 100755
File size: 38.9 KB
RevLine 
[63e8969]1#! /usr/bin/python
2#
[294ae20]3#  Copyright (c) 2009-2011 embedded brains GmbH.  All rights reserved.
4#
5#   embedded brains GmbH
6#   Obere Lagerstr. 30
7#   82178 Puchheim
8#   Germany
9#   <info@embedded-brains.de>
10#
11#  Redistribution and use in source and binary forms, with or without
12#  modification, are permitted provided that the following conditions
13#  are met:
14#  1. Redistributions of source code must retain the above copyright
15#     notice, this list of conditions and the following disclaimer.
16#  2. Redistributions in binary form must reproduce the above copyright
17#     notice, this list of conditions and the following disclaimer in the
18#     documentation and/or other materials provided with the distribution.
19#
20#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32# FreeBSD: http://svn.freebsd.org/base/releng/8.2/sys (revision 222485)
33
34import shutil
35import os
36import re
[63e8969]37import sys
[b9c291c]38import getopt
39
[a803d120]40RTEMS_DIR = "not_set"
41FreeBSD_DIR = "not_set"
42isVerbose = False
[b9c291c]43isForward = True
[a803d120]44isDryRun = True
45isEarlyExit = False
[b9c291c]46
47def usage():
[a803d120]48  print "freebsd-to-rtems.py [args]"
49  print "  -?|-h|--help     print this and exit"
50  print "  -d|--dry-run     run program but no modifications"
51  print "  -e|--early-exit  evaluate arguments, print results, and exit"
52  print "  -R|--reverse     default FreeBSD -> RTEMS, reverse that"
53  print "  -r|--rtems       RTEMS directory"
54  print "  -f|--freebsd     FreeBSD directory"
55  print "  -v|--verbose     enable verbose output mode"
[b9c291c]56
57# Parse the arguments
58def parseArguments():
[a803d120]59  global RTEMS_DIR, FreeBSD_DIR, isVerbose, isForward, isEarlyExit
[b9c291c]60  try:
[a803d120]61    opts, args = getopt.getopt(sys.argv[1:], "?hdeRr:f:v",
[b9c291c]62                 ["help",
63                  "help",
[a803d120]64                  "dry-run"
65                  "early-exit"
[b9c291c]66                  "reverse"
67                  "rtems="
68                  "freebsd="
69                  "verbose"
70                 ]
71                )
72  except getopt.GetoptError, err:
73    # print help information and exit:
74    print str(err) # will print something like "option -a not recognized"
75    usage()
76    sys.exit(2)
77  for o, a in opts:
78    if o == "-v":
[a803d120]79      isVerbose = True
[b9c291c]80    elif o in ("-h", "--help", "-?"):
81      usage()
82      sys.exit()
[a803d120]83    elif o in ("-d", "--dry-run"):
84      isForward = False
85    elif o in ("-e", "--early-exit"):
86      isEarlyExit = True
[b9c291c]87    elif o in ("-R", "--reverse"):
88      isForward = False
89    elif o in ("-r", "--rtems"):
90      RTEMS_DIR = a
91    elif o in ("-r", "--rtems"):
92      RTEMS_DIR = a
93    elif o in ("-f", "--freebsd"):
94      FreeBSD_DIR = a
95    else:
96       assert False, "unhandled option"
97
98parseArguments()
[a803d120]99print "Verbose:           " + ("no", "yes")[isVerbose]
100print "Dry Run:           " + ("no", "yes")[isDryRun]
[b9c291c]101print "RTEMS Directory:   " + RTEMS_DIR
102print "FreeBSD Directory: " + FreeBSD_DIR
103print "Direction:         " + ("reverse", "forward")[isForward]
104
[a803d120]105# Check directory argument was set and exist
106def wasDirectorySet(desc, path):
107    if path == "not_set":
108        print desc + " Directory was not specified on command line"
109        sys.exit(2)
110
111    if os.path.isdir( path ) != True:
112        print desc + " Directory (" + path + ") does not exist"
113        sys.exit(2)
114
115# Were RTEMS and FreeBSD directories specified
116wasDirectorySet( "RTEMS", RTEMS_DIR )
117wasDirectorySet( "FreeBSD", FreeBSD_DIR )
[b9c291c]118 
119if os.path.isdir( FreeBSD_DIR ) != True:
120    print "FreeBSD Directory (" + FreeBSD_DIR + ") does not exist"
121    sys.exit(2)
122 
[a803d120]123if FreeBSD_DIR == RTEMS_DIR:
124    print "FreeBSD and RTEMS Directories are the same"
125    sys.exit(2)
126
127if isEarlyExit == True:
128    print "Early exit at user request"
129    sys.exit(0)
130 
[b9c291c]131# Prefix added to FreeBSD files as they are copied into the RTEMS
132# build tree.
133PREFIX = 'freebsd'
134
135print "Generating into", RTEMS_DIR
[294ae20]136
137def mapContribPath(path):
138        m = re.match('(.*)(' + PREFIX + '/)(contrib/\\w+/)(.*)', path)
139        if m:
140                path = m.group(1) + m.group(3) + m.group(2) + m.group(4)
141        return path
142
143def installEmptyFile(src):
[b9c291c]144        dst = RTEMS_DIR + '/' + PREFIX + '/' + src.replace('rtems/', '')
[a803d120]145        if isVerbose == True:
146                print "Install empty - " + dst
147        if isDryRun == True:
148                return
[294ae20]149        try:
150                os.makedirs(os.path.dirname(dst))
151        except OSError:
152                pass
153        out = open(dst, 'w')
154        out.write('/* EMPTY */\n')
155        out.close()
156
157def fixIncludes(data):
158        data = re.sub('#([ \t]*)include <', '#\\1include <' + PREFIX + '/', data)
159        data = re.sub('#include <' + PREFIX + '/rtems', '#include <rtems', data)
160        data = re.sub('#include <' + PREFIX + '/bsp', '#include <bsp', data)
161        data = re.sub('#include "([^"]*)"', '#include <' + PREFIX + '/local/\\1>', data)
162        data = re.sub('_H_', '_HH_', data)
163        return data
164
165def revertFixIncludes(data):
166        data = re.sub('_HH_', '_H_', data)
167        data = re.sub('#include <' + PREFIX + '/local/([^>]*)>', '#include "\\1"', data)
168        data = re.sub('#([ \t]*)include <' + PREFIX + '/', '#\\1include <', data)
169        return data
170
[b9c291c]171def installHeaderFile(org):
172        src = FreeBSD_DIR + '/' + org
173        dst = RTEMS_DIR + '/' + PREFIX + '/' + org # + org.replace('rtems/', '')
[294ae20]174        dst = mapContribPath(dst)
[a803d120]175        if isVerbose == True:
176                print "Install Header - " + src + " => " + dst
177        if isDryRun == True:
178                return
[294ae20]179        try:
180                os.makedirs(os.path.dirname(dst))
181        except OSError:
182                pass
183        data = open(src).read()
184        out = open(dst, 'w')
185        if src.find('rtems') == -1:
186                data = fixIncludes(data)
187        out.write(data)
188        out.close()
189
[b9c291c]190def installSourceFile(org):
191        src = FreeBSD_DIR + '/' + org
192        dst = RTEMS_DIR + '/' + PREFIX + '/' + org
[294ae20]193        dst = mapContribPath(dst)
[a803d120]194        if isVerbose == True:
195                print "Install Source - " + src + " => " + dst
196        if isDryRun == True:
197                return
[294ae20]198        try:
199                os.makedirs(os.path.dirname(dst))
200        except OSError:
201                pass
202        data = open(src).read()
203        out = open(dst, 'w')
204        if src.find('rtems') == -1:
205                data = fixIncludes(data)
206                out.write('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n')
207        out.write(data)
208        out.close()
209
210def revertHeaderFile(org):
[b9c291c]211        src = RTEMS_DIR + '/' + PREFIX + '/' + org.replace('rtems/', '')
[294ae20]212        src = mapContribPath(src)
[b9c291c]213        dst = FreeBSD_DIR + '/' + org
[a803d120]214        if isVerbose == True:
215                print "Revert Header - " + src + " => " + dst
216        if isDryRun == True:
217                return
[294ae20]218        try:
219                os.makedirs(os.path.dirname(dst))
220        except OSError:
221                pass
222        data = open(src).read()
223        out = open(dst, 'w')
224        if org.find('rtems') == -1:
225                data = revertFixIncludes(data)
226        out.write(data)
227        out.close()
228
229def revertSourceFile(org):
[b9c291c]230        src = RTEMS_DIR + '/' + PREFIX + '/' + org
[294ae20]231        src = mapContribPath(src)
[b9c291c]232        dst = FreeBSD_DIR + '/' + org
[a803d120]233        if isVerbose == True:
234                print "Revert Source - " + src + " => " + dst
235        if isDryRun == True:
236                return
[294ae20]237        try:
238                os.makedirs(os.path.dirname(dst))
239        except OSError:
240                pass
241        data = open(src).read()
242        out = open(dst, 'w')
243        if org.find('rtems') == -1:
244                data = re.sub('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n', '', data)
245                data = revertFixIncludes(data)
246        out.write(data)
247        out.close()
248
249def deleteOutputDirectory():
[a803d120]250        if isVerbose == True:
251                print "Delete Directory - " + RTEMS_DIR
252        if isDryRun == True:
253                return
[294ae20]254        try:
[b9c291c]255                shutil.rmtree(RTEMS_DIR)
[294ae20]256        except OSError:
257            pass
258
259class ModuleManager:
260        def __init__(self):
261                self.modules = []
262                self.emptyFiles = []
263
264        def addModule(self, module):
265                self.modules.append(module)
266
267        def addEmptyFiles(self, emptyFiles):
268                self.emptyFiles.extend(emptyFiles)
269
270        def copyFiles(self):
271                for f in self.emptyFiles:
272                        installEmptyFile(f)
273                for m in self.modules:
274                        for f in m.headerFiles:
275                                installHeaderFile(f)
276                        for f in m.sourceFiles:
277                                installSourceFile(f)
278
279        def revertFiles(self):
280                for m in self.modules:
281                        for f in m.headerFiles:
282                                revertHeaderFile(f)
283                        for f in m.sourceFiles:
284                                revertSourceFile(f)
285
286        def createMakefile(self):
[a803d120]287                if isVerbose == True:
288                        print "Create Makefile"
289                if isDryRun == True:
290                        return
[63e8969]291                data = 'include config.inc\n' \
[294ae20]292                        '\n' \
293                        'include $(RTEMS_MAKEFILE_PATH)/Makefile.inc\n' \
294                        'include $(RTEMS_CUSTOM)\n' \
295                        'include $(PROJECT_ROOT)/make/leaf.cfg\n' \
296                        '\n' \
[b9c291c]297                        'CFLAGS += -ffreestanding \n' \
298                        'CFLAGS += -I . \n' \
299                        'CFLAGS += -I rtemsbsd \n' \
300                        'CFLAGS += -I rtemsbsd/rtems \n' \
301                        'CFLAGS += -I contrib/altq \n' \
302                        'CFLAGS += -I contrib/pf \n' \
303                        'CFLAGS += -B $(INSTALL_BASE) \n' \
304                        'CFLAGS += -w \n' \
305                        'CFLAGS += -std=gnu99\n' \
[294ae20]306                        '\n'
307                data += 'C_FILES ='
308                for m in self.modules:
309                        for f in m.sourceFiles:
310                                f = PREFIX + '/' + f
311                                f = mapContribPath(f)
312                                data += ' \\\n\t' + f
[63e8969]313                for f in rtems_sourceFiles:
314                        f = 'rtemsbsd/src/' + f
315                        data += ' \\\n\t' + f
[294ae20]316
317                data += '\nC_O_FILES = $(C_FILES:%.c=%.o)\n' \
318                        'C_DEP_FILES = $(C_FILES:%.c=%.dep)\n' \
319                        '\n' \
320                        'LIB = libbsd.a\n' \
321                        '\n' \
322                        'all: lib_usb\n' \
323                        '\n' \
324                        '$(LIB): $(C_O_FILES)\n' \
325                        '\t$(AR) rcu $@ $^\n' \
326                        '\n' \
327                        'lib_usb:\n' \
328                        '\tmake $(LIB)\n' \
329                        '\n' \
330                        'install: $(LIB)\n' \
331            '\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \
[63e8969]332            '\tfor i in `find . -name \'*.h\'` ; do \\\n' \
333            '\t  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
[294ae20]334                        '\n' \
335                        'clean:\n' \
336                        '\trm -f -r $(PROJECT_INCLUDE)/rtems/freebsd\n' \
337                        '\trm -f $(LIB) $(C_O_FILES) $(C_DEP_FILES)\n' \
338                        '\n' \
339                        '-include $(C_DEP_FILES)\n'
[b9c291c]340                out = open(RTEMS_DIR + '/Makefile', 'w')
[294ae20]341                out.write(data)
342                out.close()
343
344class Module:
345        def __init__(self, name):
346                self.name = name
347                self.headerFiles = []
348                self.sourceFiles = []
349                self.dependencies = []
350
351        def addHeaderFiles(self, files):
352                self.headerFiles.extend(files)
353
354        def addSourceFiles(self, files):
355                self.sourceFiles.extend(files)
356
357        def addDependency(self, dep):
358                self.dependencies.append(dep)
359
360mm = ModuleManager()
361
[63e8969]362rtems_headerFiles = [
[b9c291c]363        'rtems/machine/in_cksum.h',  # logically a net file
[63e8969]364        'rtems/machine/atomic.h',
[294ae20]365        'rtems/machine/_bus.h',
[63e8969]366        'rtems/machine/bus.h',
367        'rtems/machine/bus_dma.h',
[294ae20]368        'rtems/machine/rtems-bsd-config.h',
369        'rtems/machine/clock.h',
[63e8969]370        'rtems/machine/cpufunc.h',
371        'rtems/machine/endian.h',
372        'rtems/machine/_limits.h',
373        'rtems/machine/_align.h',
374        'rtems/machine/mutex.h',
375        'rtems/machine/param.h',
376        'rtems/machine/pcpu.h',
[294ae20]377        #'rtems/machine/pmap.h',
[63e8969]378        'rtems/machine/proc.h',
379        'rtems/machine/resource.h',
380        'rtems/machine/runq.h',
381        'rtems/machine/signal.h',
382        'rtems/machine/stdarg.h',
383        'rtems/machine/_stdint.h',
384        'rtems/machine/_types.h',
385        'rtems/machine/ucontext.h',
386        'rtems/machine/rtems-bsd-symbols.h',
387        'rtems/machine/rtems-bsd-cache.h',
388        'rtems/machine/rtems-bsd-sysinit.h',
[294ae20]389        'rtems/machine/rtems-bsd-select.h',
390        #'rtems/machine/vm.h',
[63e8969]391        'bsd.h',
[294ae20]392        ]
[63e8969]393rtems_sourceFiles = [
394        'rtems-bsd-cam.c',
395        'rtems-bsd-nexus.c',
396        'rtems-bsd-autoconf.c',
397        'rtems-bsd-delay.c',
398        'rtems-bsd-mutex.c',
399        'rtems-bsd-thread.c',
400        'rtems-bsd-condvar.c',
401        'rtems-bsd-lock.c',
402        'rtems-bsd-sx.c',
403        'rtems-bsd-rmlock.c',
404        'rtems-bsd-rwlock.c',
405        'rtems-bsd-generic.c',
406        'rtems-bsd-panic.c',
407        'rtems-bsd-synch.c',
408        'rtems-bsd-signal.c',
409        'rtems-bsd-callout.c',
410        'rtems-bsd-init.c',
411        'rtems-bsd-init-with-irq.c',
412        'rtems-bsd-assert.c',
413        'rtems-bsd-prot.c',
414        'rtems-bsd-resource.c',
415        'rtems-bsd-jail.c',
416        'rtems-bsd-shell.c',
417        'rtems-bsd-syscalls.c',
418        #rtems-bsd-socket.c',
419        #rtems-bsd-mbuf.c',
420        'rtems-bsd-malloc.c',
421        'rtems-bsd-support.c',
422        'rtems-bsd-bus-dma.c',
423        'rtems-bsd-sysctl.c',
424        'rtems-bsd-sysctlbyname.c',
425        'rtems-bsd-sysctlnametomib.c',
426        'rtems-bsd-uma.c',
[294ae20]427        ]
[63e8969]428# RTEMS files handled separately from modules
429# rtems = Module('rtems')
430# rtems.addHeaderFiles( rtems_headerFiles )
431# rtems.addSourceFiles( rtems_sourceFiles )
[294ae20]432
433local = Module('local')
434local.addHeaderFiles(
435        [
436                'local/bus_if.h',
437                'local/device_if.h',
438                #'local/linker_if.h',
439                'local/opt_bus.h',
440                'local/opt_cam.h',
441                'local/opt_compat.h',
442                'local/opt_ddb.h',
443                'local/opt_hwpmc_hooks.h',
444                'local/opt_init_path.h',
445                'local/opt_ktrace.h',
446                'local/opt_printf.h',
447                'local/opt_scsi.h',
448                'local/opt_usb.h',
449                'local/opt_inet.h',
450                'local/opt_inet6.h',
451                'local/opt_altq.h',
452                'local/opt_atalk.h',
453                'local/opt_bootp.h',
454                'local/opt_bpf.h',
455                'local/opt_bus.h',
456                'local/opt_cam.h',
457                'local/opt_carp.h',
458                'local/opt_compat.h',
459        'local/opt_config.h',
460                'local/opt_cpu.h',
461                'local/opt_ddb.h',
462                'local/opt_device_polling.h',
463                'local/opt_ef.h',
464                'local/opt_enc.h',
465                'local/opt_hwpmc_hooks.h',
466                'local/opt_inet6.h',
467                'local/opt_inet.h',
468                'local/opt_init_path.h',
469                'local/opt_ipdivert.h',
470                'local/opt_ipdn.h',
471                'local/opt_ipfw.h',
472                'local/opt_ipsec.h',
473                'local/opt_ipstealth.h',
474                'local/opt_ipx.h',
475                'local/opt_kdb.h',
476                'local/opt_kdtrace.h',
477                'local/opt_ktrace.h',
478                'local/opt_mbuf_profiling.h',
479                'local/opt_mbuf_stress_test.h',
480                'local/opt_mpath.h',
481                'local/opt_mrouting.h',
482                'local/opt_natm.h',
483                'local/opt_netgraph.h',
484                'local/opt_param.h',
485        'local/opt_posix.h',
486        'local/opt_pf.h',
487                'local/opt_printf.h',
488                'local/opt_route.h',
489                'local/opt_scsi.h',
490                'local/opt_sctp.h',
491                'local/opt_tcpdebug.h',
492                'local/opt_tdma.h',
493                'local/opt_usb.h',
494                'local/opt_vlan.h',
495                'local/opt_wlan.h',
496        'local/opt_zero.h',
497        'local/pmap.h',
498                'local/usbdevs_data.h',
499                'local/usbdevs.h',
500                'local/usb_if.h',
501                'local/vnode_if.h',
502                'local/vnode_if_newproto.h',
503                'local/vnode_if_typedef.h',
504                'local/cryptodev_if.h',
505                'local/miibus_if.h',
506        'local/miidevs.h',
507        ]
508)
509local.addSourceFiles(
510        [
511                'local/usb_if.c',
512                'local/bus_if.c',
513                #'local/linker_if.c',
514                'local/device_if.c',
515                'local/cryptodev_if.c',
516                'local/miibus_if.c',
517        ]
518)
519
520devUsb = Module('dev_usb')
521devUsb.addHeaderFiles(
522        [
523                'dev/usb/ufm_ioctl.h',
524                'dev/usb/usb_busdma.h',
525                'dev/usb/usb_bus.h',
526                'dev/usb/usb_cdc.h',
527                'dev/usb/usb_controller.h',
528                'dev/usb/usb_core.h',
529                'dev/usb/usb_debug.h',
530                'dev/usb/usb_dev.h',
531                'dev/usb/usb_device.h',
532                'dev/usb/usbdi.h',
533                'dev/usb/usbdi_util.h',
534                'dev/usb/usb_dynamic.h',
535                'dev/usb/usb_endian.h',
536                'dev/usb/usb_freebsd.h',
537                'dev/usb/usb_generic.h',
538                'dev/usb/usb.h',
539                'dev/usb/usbhid.h',
540                'dev/usb/usb_hub.h',
541                'dev/usb/usb_ioctl.h',
542                'dev/usb/usb_mbuf.h',
543                'dev/usb/usb_msctest.h',
544                'dev/usb/usb_process.h',
545                'dev/usb/usb_request.h',
546                'dev/usb/usb_transfer.h',
547                'dev/usb/usb_util.h',
548        ]
549)
550devUsb.addSourceFiles(
551        [
552                'dev/usb/usb_busdma.c',
553                'dev/usb/usb_core.c',
554                'dev/usb/usb_debug.c',
555                'dev/usb/usb_dev.c',
556                'dev/usb/usb_device.c',
557                'dev/usb/usb_dynamic.c',
558                'dev/usb/usb_error.c',
559                'dev/usb/usb_generic.c',
560                'dev/usb/usb_handle_request.c',
561                'dev/usb/usb_hid.c',
562                'dev/usb/usb_hub.c',
563                'dev/usb/usb_lookup.c',
564                'dev/usb/usb_mbuf.c',
565                'dev/usb/usb_msctest.c',
566                'dev/usb/usb_parse.c',
567                'dev/usb/usb_process.c',
568                'dev/usb/usb_request.c',
569                'dev/usb/usb_transfer.c',
570                'dev/usb/usb_util.c',
571        ]
572)
573
574devUsbAddOn = Module('dev_usb_add_on')
575devUsbAddOn.addHeaderFiles(
576        [
577                'dev/usb/usb_pci.h',
578                'dev/usb/usb_compat_linux.h',
579        ]
580)
581devUsbAddOn.addSourceFiles(
582        [
583                'dev/usb/usb_compat_linux.c',
584        ]
585)
586
587devUsbBluetooth = Module('dev_usb_bluetooth')
588devUsbBluetooth.addDependency(devUsb)
589devUsbBluetooth.addHeaderFiles(
590        [
591                'dev/usb/bluetooth/ng_ubt_var.h',
592        ]
593)
594devUsbBluetooth.addSourceFiles(
595        [
596                'dev/usb/bluetooth/ng_ubt.c',
597                'dev/usb/bluetooth/ubtbcmfw.c',
598        ]
599)
600
601devUsbController = Module('dev_usb_controller')
602devUsbController.addDependency(devUsb)
603devUsbController.addHeaderFiles(
604        [
605                'dev/usb/controller/ohci.h',
606                'dev/usb/controller/ohcireg.h',
607                'dev/usb/controller/ehci.h',
608                'dev/usb/controller/ehcireg.h',
609        ]
610)
611devUsbController.addSourceFiles(
612        [
613                'dev/usb/controller/ohci.c',
614                'dev/usb/controller/ehci.c',
615                'dev/usb/controller/usb_controller.c',
616                'dev/usb/controller/ohci_lpc3250.c',
617        ]
618)
619
620devUsbControllerAddOn = Module('dev_usb_controller_add_on')
621devUsbControllerAddOn.addDependency(devUsb)
622devUsbControllerAddOn.addHeaderFiles(
623        [
624                'dev/usb/controller/at91dci.h',
625                'dev/usb/controller/atmegadci.h',
626                'dev/usb/controller/musb_otg.h',
627                'dev/usb/controller/uss820dci.h',
628        ]
629)
630devUsbControllerAddOn.addSourceFiles(
631        [
632                'dev/usb/controller/at91dci_atmelarm.c',
633                'dev/usb/controller/at91dci.c',
634                'dev/usb/controller/atmegadci_atmelarm.c',
635                'dev/usb/controller/atmegadci.c',
636                'dev/usb/controller/ehci_ixp4xx.c',
637                'dev/usb/controller/ehci_pci.c',
638                'dev/usb/controller/musb_otg.c',
639                'dev/usb/controller/ehci_mbus.c',
640                'dev/usb/controller/musb_otg_atmelarm.c',
641                'dev/usb/controller/ohci_atmelarm.c',
642                'dev/usb/controller/ohci_pci.c',
643                'dev/usb/controller/uhci_pci.c',
644                'dev/usb/controller/uss820dci_atmelarm.c',
645                'dev/usb/controller/uss820dci.c',
646        ]
647)
648
649devUsbInput = Module('dev_usb_input')
650devUsbInput.addDependency(devUsb)
651devUsbInput.addHeaderFiles(
652        [
653                'dev/usb/input/usb_rdesc.h',
654        ]
655)
656devUsbInput.addSourceFiles(
657        [
658                'dev/usb/input/uhid.c',
659                'dev/usb/input/ukbd.c',
660        ]
661)
662
663devUsbInputMouse = Module('dev_usb_mouse')
664devUsbInputMouse.addDependency(devUsb)
665devUsbInputMouse.addHeaderFiles(
666        [
667                'sys/tty.h',
668                'sys/mouse.h',
669                'sys/ttyqueue.h',
670                'sys/ttydefaults.h',
671                'sys/ttydisc.h',
672                'sys/ttydevsw.h',
673                'sys/ttyhook.h',
674        ]
675)
676devUsbInputMouse.addSourceFiles(
677        [
678                'dev/usb/input/ums.c',
679        ]
680)
681
682devUsbMisc = Module('dev_usb_misc')
683devUsbMisc.addDependency(devUsb)
684devUsbMisc.addHeaderFiles(
685        [
686                'dev/usb/misc/udbp.h',
687        ]
688)
689devUsbMisc.addSourceFiles(
690        [
691                'dev/usb/misc/udbp.c',
692                'dev/usb/misc/ufm.c',
693        ]
694)
695
696devUsbNet = Module('dev_usb_net')
697devUsbNet.addDependency(devUsb)
698devUsbNet.addHeaderFiles(
699        [
700                'dev/mii/mii.h',
701                'dev/mii/miivar.h',
702                'net/bpf.h',
703                'net/ethernet.h',
704                'net/if_arp.h',
705                'net/if_dl.h',
706                'net/if.h',
707                'net/if_media.h',
708                'net/if_types.h',
709                'net/if_var.h',
710                'net/vnet.h',
711                'dev/usb/net/if_cdcereg.h',
712                'dev/usb/net/usb_ethernet.h',
713        ]
714)
715devUsbNet.addSourceFiles(
716        [
717                'dev/usb/net/if_cdce.c',
718                'dev/usb/net/usb_ethernet.c',
719        ]
720)
721
722devUsbQuirk = Module('dev_usb_quirk')
723devUsbQuirk.addDependency(devUsb)
724devUsbQuirk.addHeaderFiles(
725        [
726                'dev/usb/quirk/usb_quirk.h',
727        ]
728)
729devUsbQuirk.addSourceFiles(
730        [
731                'dev/usb/quirk/usb_quirk.c',
732        ]
733)
734
735devUsbSerial = Module('dev_usb_serial')
736devUsbSerial.addDependency(devUsb)
737devUsbSerial.addHeaderFiles(
738        [
739                'dev/usb/serial/uftdi_reg.h',
740                'dev/usb/serial/usb_serial.h',
741        ]
742)
743devUsbSerial.addSourceFiles(
744        [
745                'dev/usb/serial/u3g.c',
746                'dev/usb/serial/uark.c',
747                'dev/usb/serial/ubsa.c',
748                'dev/usb/serial/ubser.c',
749                'dev/usb/serial/uchcom.c',
750                'dev/usb/serial/ucycom.c',
751                'dev/usb/serial/ufoma.c',
752                'dev/usb/serial/uftdi.c',
753                'dev/usb/serial/ugensa.c',
754                'dev/usb/serial/uipaq.c',
755                'dev/usb/serial/ulpt.c',
756                'dev/usb/serial/umct.c',
757                'dev/usb/serial/umodem.c',
758                'dev/usb/serial/umoscom.c',
759                'dev/usb/serial/uplcom.c',
760                'dev/usb/serial/usb_serial.c',
761                'dev/usb/serial/uslcom.c',
762                'dev/usb/serial/uvisor.c',
763                'dev/usb/serial/uvscom.c',
764        ]
765)
766
767devUsbStorage = Module('dev_usb_storage')
768devUsbStorage.addDependency(devUsb)
769devUsbStorage.addSourceFiles(
770        [
771                'dev/usb/storage/umass.c',
772        ]
773)
774
775devUsbStorageAddOn = Module('dev_usb_storage_add_on')
776devUsbStorageAddOn.addDependency(devUsb)
777devUsbStorageAddOn.addHeaderFiles(
778        [
779                'dev/usb/storage/rio500_usb.h',
780        ]
781)
782devUsbStorageAddOn.addSourceFiles(
783        [
784                'dev/usb/storage/urio.c',
785                'dev/usb/storage/ustorage_fs.c',
786        ]
787)
788
789devUsbTemplate = Module('dev_usb_template')
790devUsbTemplate.addDependency(devUsb)
791devUsbTemplate.addHeaderFiles(
792        [
793                'dev/usb/template/usb_template.h',
794        ]
795)
796devUsbTemplate.addSourceFiles(
797        [
798                'dev/usb/template/usb_template.c',
799                'dev/usb/template/usb_template_cdce.c',
800                'dev/usb/template/usb_template_msc.c',
801                'dev/usb/template/usb_template_mtp.c',
802        ]
803)
804
805devUsbWlan = Module('dev_usb_wlan')
806devUsbWlan.addDependency(devUsb)
807devUsbWlan.addHeaderFiles(
808        [
809                'dev/usb/wlan/if_rumfw.h',
810                'dev/usb/wlan/if_rumreg.h',
811                'dev/usb/wlan/if_rumvar.h',
812                'dev/usb/wlan/if_uathreg.h',
813                'dev/usb/wlan/if_uathvar.h',
814                'dev/usb/wlan/if_upgtvar.h',
815                'dev/usb/wlan/if_uralreg.h',
816                'dev/usb/wlan/if_uralvar.h',
817                'dev/usb/wlan/if_zydfw.h',
818                'dev/usb/wlan/if_zydreg.h',
819        ]
820)
821devUsbWlan.addSourceFiles(
822        [
823                'dev/usb/wlan/if_rum.c',
824                'dev/usb/wlan/if_uath.c',
825                'dev/usb/wlan/if_upgt.c',
826                'dev/usb/wlan/if_ural.c',
827                'dev/usb/wlan/if_zyd.c',
828        ]
829)
830
831devPci = Module('dev_pci')
832devPci.addHeaderFiles(
833        [
834                'dev/pci/pcireg.h',
835                'dev/pci/pcivar.h',
836        ]
837)
838
839devUsbBase = Module('dev_usb_base')
840devUsbBase.addHeaderFiles(
841        [
842                'bsm/audit.h',
843                'bsm/audit_kevents.h',
844                'sys/acl.h',
845                'sys/bufobj.h',
846                'sys/_bus_dma.h',
847                'sys/bus_dma.h',
848                'sys/bus.h',
849                'sys/callout.h',
850                'sys/cdefs.h',
851                'sys/condvar.h',
852                'sys/conf.h',
853                #'sys/cpuset.h',
854                'sys/ctype.h',
855                'sys/endian.h',
856        'sys/errno.h',
857                'sys/event.h',
858                'sys/eventhandler.h',
859                'sys/fcntl.h',
860                'sys/filedesc.h',
861                'sys/file.h',
862                'sys/filio.h',
863                'sys/ioccom.h',
864                'sys/_iovec.h',
865                'sys/kernel.h',
866                'sys/kobj.h',
867                'sys/kthread.h',
868                'sys/ktr.h',
869                'sys/libkern.h',
870                'sys/linker_set.h',
871                'sys/_lock.h',
872                'sys/lock.h',
873                'sys/_lockmgr.h',
874                'sys/lockmgr.h',
875                'sys/lock_profile.h',
876                'sys/lockstat.h',
877                'sys/mac.h',
878                'sys/malloc.h',
879                'sys/mbuf.h',
880                'sys/module.h',
881                'sys/mount.h',
882                'sys/_mutex.h',
883                'sys/mutex.h',
884                'sys/_null.h',
885                'sys/osd.h',
886                'sys/param.h',
887                'sys/pcpu.h',
888                'sys/poll.h',
889                'sys/priority.h',
890                'sys/priv.h',
891                'sys/proc.h',
892                'sys/queue.h',
893                'sys/refcount.h',
894                'sys/resource.h',
895        'sys/resourcevar.h',
896                'sys/rtprio.h',
897                'sys/runq.h',
898                'sys/_rwlock.h',
899        'sys/rwlock.h',
900                'sys/_semaphore.h',
901                'sys/selinfo.h',
902                'sys/sigio.h',
903                'sys/signal.h',
904                'sys/signalvar.h',
905                'sys/_sigset.h',
906        #'sys/sleepqueue.h',
907                'sys/socket.h',
908                'sys/stddef.h',
909                'sys/stdint.h',
910                'sys/_sx.h',
911                'sys/sx.h',
912                'sys/sysctl.h',
913                'sys/systm.h',
914                'sys/ttycom.h',
915                'sys/_types.h',
916                'sys/types.h',
917                'sys/ucontext.h',
918                'sys/ucred.h',
919                'sys/uio.h',
920                'sys/unistd.h',
921        #'sys/vmmeter.h',
922        #'sys/vnode.h',
923                'sys/rman.h',
924                'sys/reboot.h',
925                'sys/bitstring.h',
926                'sys/linker.h',
927        'vm/uma.h',
928        'vm/uma_int.h',
929        'vm/uma_dbg.h',
930        #'vm/vm.h',
931        #'vm/vm_page.h',
932                'fs/devfs/devfs_int.h',
933        ]
934)
935devUsbBase.addSourceFiles(
936        [
937                'kern/init_main.c',
938        #'kern/kern_linker.c',
939        #'kern/kern_mib.c',
940        'kern/kern_mbuf.c',
941                'kern/kern_module.c',
942                'kern/kern_sysctl.c',
943                'kern/subr_bus.c',
944        'kern/subr_kobj.c',
945        #'kern/subr_sleepqueue.c',
946        'kern/uipc_mbuf.c',
947        'kern/uipc_mbuf2.c',
948        'kern/uipc_socket.c',
949        #'kern/uipc_domain.c',
950                #'kern/uipc_syscalls.c',
951        #'vm/uma_core.c',
952        ]
953)
954
955cam = Module('cam')
956cam.addHeaderFiles(
957        [
958                'sys/ata.h',
959                'cam/cam.h',
960                'cam/cam_ccb.h',
961                'cam/cam_sim.h',
962                'cam/cam_xpt_sim.h',
963                'cam/scsi/scsi_all.h',
964                'cam/scsi/scsi_da.h',
965                'cam/ata/ata_all.h',
966                'cam/cam_periph.h',
967                'cam/cam_debug.h',
968                'cam/cam_xpt.h',
969        ]
970)
971cam.addSourceFiles(
972        [
973                'cam/cam.c',
974                'cam/scsi/scsi_all.c',
975        ]
976)
977
978devNet = Module('dev_net')
979devNet.addHeaderFiles(
980    [
981        'dev/mii/mii.h',
982        'dev/mii/miivar.h',
983        'dev/mii/icsphyreg.h',
984        'net/bpf.h',
985        'net/ethernet.h',
986        'net/if_arp.h',
987        'net/if_dl.h',
988        'net/if.h',
989        'net/if_media.h',
990        'net/if_types.h',
991        'net/if_var.h',
992        'net/vnet.h',
993    ]
994)
995devNet.addSourceFiles(
996    [
997        'dev/mii/mii.c',
998        'dev/mii/mii_physubr.c',
999        'dev/mii/icsphy.c',
1000    ]
1001)
1002
1003netDeps = Module('netDeps')
[b9c291c]1004# logically machine/in_cksum.h is part of this group but RTEMS provides its own
[294ae20]1005netDeps.addHeaderFiles(
1006        [
1007        'security/mac/mac_framework.h',
1008        'sys/cpu.h',
1009                'sys/interrupt.h',
1010        'sys/fnv_hash.h',
1011                'sys/tree.h',
1012                'sys/taskqueue.h',
1013                'sys/buf_ring.h',
1014                'sys/rwlock.h',
1015                'sys/_rmlock.h',
1016                'sys/sockio.h',
1017                'sys/sdt.h',
1018                'sys/_task.h',
1019                'sys/sbuf.h',
1020                'sys/smp.h',
1021                'sys/syslog.h',
1022                'sys/jail.h',
1023        'sys/protosw.h',
1024                'sys/random.h',
1025                'sys/rmlock.h',
1026                'sys/hash.h',
1027        #'sys/select.h',
1028                'sys/sf_buf.h',
1029                'sys/socketvar.h',
1030                'sys/sockbuf.h',
1031                #'sys/sysproto.h',
1032                'sys/sockstate.h',
1033        'sys/sockopt.h',
1034        'sys/domain.h',
1035        'sys/time.h',
1036        ]
1037)
1038
1039net = Module('net')
1040net.addHeaderFiles(
1041        [
1042                'net/bpf_buffer.h',
1043                'net/bpfdesc.h',
1044                'net/bpf.h',
1045                'net/bpf_jitter.h',
1046                'net/bpf_zerocopy.h',
1047                'net/bridgestp.h',
1048                'net/ethernet.h',
1049                'net/fddi.h',
1050                'net/firewire.h',
1051                'net/flowtable.h',
1052                'net/ieee8023ad_lacp.h',
1053                'net/if_arc.h',
1054                'net/if_arp.h',
1055                'net/if_atm.h',
1056                'net/if_bridgevar.h',
1057                'net/if_clone.h',
1058                'net/if_dl.h',
1059                'net/if_enc.h',
1060                'net/if_gif.h',
1061                'net/if_gre.h',
1062                'net/if.h',
1063                'net/if_lagg.h',
1064                'net/if_llatbl.h',
1065                'net/if_llc.h',
1066                'net/if_media.h',
1067                'net/if_mib.h',
1068                'net/if_sppp.h',
1069                'net/if_stf.h',
1070                'net/if_tap.h',
1071                'net/if_tapvar.h',
1072                'net/if_tun.h',
1073                'net/if_types.h',
1074                'net/if_var.h',
1075                'net/if_vlan_var.h',
1076                'net/iso88025.h',
1077                'net/netisr.h',
1078                'net/pfil.h',
1079                'net/pfkeyv2.h',
1080                'net/ppp_defs.h',
1081                'net/radix.h',
1082                'net/radix_mpath.h',
1083                'net/raw_cb.h',
1084                'net/route.h',
1085                'net/slcompress.h',
1086                'net/vnet.h',
1087                'net/zlib.h',
1088        ]
1089)
1090net.addSourceFiles(
1091        [
1092                'net/bridgestp.c',
1093                'net/ieee8023ad_lacp.c',
1094                'net/if_atmsubr.c',
1095                'net/if.c',
1096                'net/if_clone.c',
1097                'net/if_dead.c',
1098                'net/if_disc.c',
1099                'net/if_edsc.c',
1100                'net/if_ef.c',
1101                'net/if_enc.c',
1102                'net/if_epair.c',
1103                'net/if_faith.c',
1104                'net/if_fddisubr.c',
1105                'net/if_fwsubr.c',
1106                'net/if_gif.c',
1107                'net/if_gre.c',
1108                'net/if_iso88025subr.c',
1109                'net/if_lagg.c',
1110                'net/if_llatbl.c',
1111                'net/if_loop.c',
1112                'net/if_media.c',
1113                'net/if_mib.c',
1114                'net/if_spppfr.c',
1115                'net/if_spppsubr.c',
1116                'net/if_stf.c',
1117                'net/if_tap.c',
1118                'net/if_tun.c',
1119                'net/if_vlan.c',
1120                'net/pfil.c',
1121                'net/radix.c',
1122                'net/radix_mpath.c',
1123                'net/raw_cb.c',
1124                'net/raw_usrreq.c',
1125                'net/route.c',
1126                'net/rtsock.c',
1127                'net/slcompress.c',
1128                'net/zlib.c',
1129                'net/bpf_buffer.c',
1130                'net/bpf.c',
1131                'net/bpf_filter.c',
1132                'net/bpf_jitter.c',
1133                'net/if_arcsubr.c',
1134                'net/if_bridge.c',
1135                'net/if_ethersubr.c',
1136                'net/netisr.c',
1137        ]
1138)
1139
1140netinet = Module('netinet')
1141netinet.addHeaderFiles(
1142        [
1143                'netinet/icmp6.h',
1144                'netinet/icmp_var.h',
1145                'netinet/if_atm.h',
1146                'netinet/if_ether.h',
1147                'netinet/igmp.h',
1148                'netinet/igmp_var.h',
1149                'netinet/in_gif.h',
1150                'netinet/in.h',
1151                'netinet/in_pcb.h',
1152                'netinet/in_systm.h',
1153                'netinet/in_var.h',
1154                'netinet/ip6.h',
1155                'netinet/ip_carp.h',
1156                'netinet/ip_divert.h',
1157                'netinet/ip_dummynet.h',
1158                'netinet/ip_ecn.h',
1159                'netinet/ip_encap.h',
1160                'netinet/ip_fw.h',
1161                'netinet/ip_gre.h',
1162                'netinet/ip.h',
1163                'netinet/ip_icmp.h',
1164                'netinet/ip_ipsec.h',
1165                'netinet/ip_mroute.h',
1166                'netinet/ip_options.h',
1167                'netinet/ip_var.h',
1168                'netinet/ipfw/ip_dn_private.h',
1169                'netinet/ipfw/ip_fw_private.h',
1170                'netinet/ipfw/dn_sched.h',
1171                'netinet/ipfw/dn_heap.h',
1172                'netinet/pim.h',
1173                'netinet/pim_var.h',
1174                'netinet/sctp_asconf.h',
1175                'netinet/sctp_auth.h',
1176                'netinet/sctp_bsd_addr.h',
1177                'netinet/sctp_cc_functions.h',
1178                'netinet/sctp_constants.h',
1179                'netinet/sctp_crc32.h',
1180                'netinet/sctp.h',
1181                'netinet/sctp_header.h',
1182                'netinet/sctp_indata.h',
1183                'netinet/sctp_input.h',
1184                'netinet/sctp_lock_bsd.h',
1185                'netinet/sctp_os_bsd.h',
1186                'netinet/sctp_os.h',
1187                'netinet/sctp_output.h',
1188                'netinet/sctp_pcb.h',
1189                'netinet/sctp_peeloff.h',
1190                'netinet/sctp_structs.h',
1191                'netinet/sctp_sysctl.h',
1192                'netinet/sctp_timer.h',
1193                'netinet/sctp_uio.h',
1194                'netinet/sctputil.h',
1195                'netinet/sctp_var.h',
1196                'netinet/tcp_debug.h',
1197                'netinet/tcp_fsm.h',
1198                'netinet/tcp.h',
1199        'netinet/tcp_hostcache.h',
1200                'netinet/tcpip.h',
1201                'netinet/tcp_lro.h',
1202                'netinet/tcp_offload.h',
1203                'netinet/tcp_seq.h',
1204                'netinet/tcp_syncache.h',
1205                'netinet/tcp_timer.h',
1206                'netinet/tcp_var.h',
1207                'netinet/toedev.h',
1208                'netinet/udp.h',
1209                'netinet/udp_var.h',
1210                'netinet/libalias/alias_local.h',
1211                'netinet/libalias/alias.h',
1212                'netinet/libalias/alias_mod.h',
1213                'netinet/libalias/alias_sctp.h',
1214        ]
1215)
1216netinet.addSourceFiles(
1217        [
1218                'netinet/accf_data.c',
1219                'netinet/accf_dns.c',
1220                'netinet/accf_http.c',
1221                'netinet/if_atm.c',
1222                'netinet/if_ether.c',
1223                'netinet/igmp.c',
1224                'netinet/in.c',
1225                'netinet/in_cksum.c',
1226                'netinet/in_gif.c',
1227                'netinet/in_mcast.c',
1228                'netinet/in_pcb.c',
1229                'netinet/in_proto.c',
1230                'netinet/in_rmx.c',
1231                'netinet/ip_carp.c',
1232                'netinet/ip_divert.c',
1233                'netinet/ip_ecn.c',
1234                'netinet/ip_encap.c',
1235                'netinet/ip_fastfwd.c',
1236                'netinet/ip_gre.c',
1237                'netinet/ip_icmp.c',
1238                'netinet/ip_id.c',
1239                'netinet/ip_input.c',
1240                'netinet/ip_ipsec.c',
1241                'netinet/ip_mroute.c',
1242                'netinet/ip_options.c',
1243                'netinet/ip_output.c',
1244                'netinet/raw_ip.c',
1245                'netinet/sctp_asconf.c',
1246                'netinet/sctp_auth.c',
1247                'netinet/sctp_bsd_addr.c',
1248                'netinet/sctp_cc_functions.c',
1249                'netinet/sctp_crc32.c',
1250                'netinet/sctp_indata.c',
1251                'netinet/sctp_input.c',
1252                'netinet/sctp_output.c',
1253                'netinet/sctp_pcb.c',
1254                'netinet/sctp_peeloff.c',
1255                'netinet/sctp_sysctl.c',
1256                'netinet/sctp_timer.c',
1257                'netinet/sctp_usrreq.c',
1258                'netinet/sctputil.c',
1259                'netinet/tcp_debug.c',
1260        #'netinet/tcp_hostcache.c',
1261                'netinet/tcp_input.c',
1262                'netinet/tcp_lro.c',
1263                'netinet/tcp_offload.c',
1264                'netinet/tcp_output.c',
1265                'netinet/tcp_reass.c',
1266                'netinet/tcp_sack.c',
1267                'netinet/tcp_subr.c',
1268                'netinet/tcp_syncache.c',
1269                'netinet/tcp_timer.c',
1270                'netinet/tcp_timewait.c',
1271                'netinet/tcp_usrreq.c',
1272                'netinet/udp_usrreq.c',
1273                'netinet/ipfw/dn_sched_fifo.c',
1274                'netinet/ipfw/dn_sched_rr.c',
1275                'netinet/ipfw/ip_fw_log.c',
1276                'netinet/ipfw/dn_sched_qfq.c',
1277                'netinet/ipfw/dn_sched_prio.c',
1278        #'netinet/ipfw/ip_fw_dynamic.c',
1279                'netinet/ipfw/ip_dn_glue.c',
1280                'netinet/ipfw/ip_fw2.c',
1281                'netinet/ipfw/dn_heap.c',
1282                'netinet/ipfw/ip_dummynet.c',
1283                'netinet/ipfw/ip_fw_sockopt.c',
1284                'netinet/ipfw/dn_sched_wf2q.c',
1285                'netinet/ipfw/ip_fw_nat.c',
1286                'netinet/ipfw/ip_fw_pfil.c',
1287                'netinet/ipfw/ip_dn_io.c',
1288                'netinet/ipfw/ip_fw_table.c',
1289                'netinet/libalias/alias_dummy.c',
1290                'netinet/libalias/alias_pptp.c',
1291                'netinet/libalias/alias_smedia.c',
1292                'netinet/libalias/alias_mod.c',
1293                'netinet/libalias/alias_cuseeme.c',
1294                'netinet/libalias/alias_nbt.c',
1295                'netinet/libalias/alias_irc.c',
1296                'netinet/libalias/alias_util.c',
1297                'netinet/libalias/alias_db.c',
1298                'netinet/libalias/alias_ftp.c',
1299                'netinet/libalias/alias_proxy.c',
1300                'netinet/libalias/alias.c',
1301                'netinet/libalias/alias_skinny.c',
1302                'netinet/libalias/alias_sctp.c',
1303        ]
1304)
1305
1306netinet6 = Module('netinet6')
1307netinet6.addHeaderFiles(
1308        [
1309                'netinet6/icmp6.h',
1310                'netinet6/in6_gif.h',
1311                'netinet6/in6.h',
1312                'netinet6/in6_ifattach.h',
1313                'netinet6/in6_pcb.h',
1314                'netinet6/in6_var.h',
1315                'netinet6/ip6_ecn.h',
1316                'netinet6/ip6.h',
1317                'netinet6/ip6_ipsec.h',
1318                'netinet6/ip6_mroute.h',
1319                'netinet6/ip6protosw.h',
1320                'netinet6/ip6_var.h',
1321                'netinet6/mld6.h',
1322                'netinet6/mld6_var.h',
1323                'netinet6/nd6.h',
1324                'netinet6/pim6.h',
1325                'netinet6/pim6_var.h',
1326                'netinet6/raw_ip6.h',
1327                'netinet6/scope6_var.h',
1328                'netinet6/sctp6_var.h',
1329                'netinet6/tcp6_var.h',
1330                'netinet6/udp6_var.h',
1331        ]
1332)
1333netinet6.addSourceFiles(
1334        [
1335                'netinet6/dest6.c',
1336                'netinet6/frag6.c',
1337                'netinet6/icmp6.c',
1338                'netinet6/in6.c',
1339                'netinet6/in6_cksum.c',
1340                'netinet6/in6_gif.c',
1341                'netinet6/in6_ifattach.c',
1342                'netinet6/in6_mcast.c',
1343                'netinet6/in6_pcb.c',
1344                'netinet6/in6_proto.c',
1345                'netinet6/in6_rmx.c',
1346                'netinet6/in6_src.c',
1347                'netinet6/ip6_forward.c',
1348                'netinet6/ip6_id.c',
1349                'netinet6/ip6_input.c',
1350                'netinet6/ip6_ipsec.c',
1351                'netinet6/ip6_mroute.c',
1352                'netinet6/ip6_output.c',
1353                'netinet6/mld6.c',
1354                'netinet6/nd6.c',
1355                'netinet6/nd6_nbr.c',
1356                'netinet6/nd6_rtr.c',
1357                'netinet6/raw_ip6.c',
1358                'netinet6/route6.c',
1359                'netinet6/scope6.c',
1360                'netinet6/sctp6_usrreq.c',
1361                'netinet6/udp6_usrreq.c',
1362        ]
1363)
1364
1365netipsec = Module('netipsec')
1366netipsec.addHeaderFiles(
1367        [
1368                'netipsec/ah.h',
1369                'netipsec/ah_var.h',
1370                'netipsec/esp.h',
1371                'netipsec/esp_var.h',
1372                'netipsec/ipcomp.h',
1373                'netipsec/ipcomp_var.h',
1374                'netipsec/ipip_var.h',
1375                'netipsec/ipsec6.h',
1376                'netipsec/ipsec.c',
1377                'netipsec/ipsec.h',
1378                'netipsec/keydb.h',
1379                'netipsec/key_debug.h',
1380                'netipsec/key.h',
1381                'netipsec/keysock.h',
1382                'netipsec/key_var.h',
1383                'netipsec/xform.h',
1384        ]
1385)
1386netipsec.addSourceFiles(
1387        [
1388                'netipsec/ipsec_input.c',
1389                'netipsec/ipsec_mbuf.c',
1390                'netipsec/ipsec_output.c',
1391                'netipsec/key.c',
1392                'netipsec/key_debug.c',
1393                'netipsec/keysock.c',
1394                'netipsec/xform_ah.c',
1395                'netipsec/xform_esp.c',
1396                'netipsec/xform_ipcomp.c',
1397                'netipsec/xform_ipip.c',
1398                'netipsec/xform_tcp.c',
1399        ]
1400)
1401
1402net80211 = Module('net80211')
1403net80211.addHeaderFiles(
1404        [
1405                'net80211/ieee80211_action.h',
1406                'net80211/ieee80211_adhoc.h',
1407                'net80211/ieee80211_ageq.h',
1408                'net80211/ieee80211_amrr.h',
1409                'net80211/ieee80211_crypto.h',
1410                'net80211/ieee80211_dfs.h',
1411                'net80211/ieee80211_freebsd.h',
1412                'net80211/_ieee80211.h',
1413                'net80211/ieee80211.h',
1414                'net80211/ieee80211_hostap.h',
1415                'net80211/ieee80211_ht.h',
1416                'net80211/ieee80211_input.h',
1417                'net80211/ieee80211_ioctl.h',
1418                'net80211/ieee80211_mesh.h',
1419                'net80211/ieee80211_monitor.h',
1420                'net80211/ieee80211_node.h',
1421                'net80211/ieee80211_phy.h',
1422                'net80211/ieee80211_power.h',
1423                'net80211/ieee80211_proto.h',
1424                'net80211/ieee80211_radiotap.h',
1425                'net80211/ieee80211_ratectl.h',
1426                'net80211/ieee80211_regdomain.h',
1427                'net80211/ieee80211_rssadapt.h',
1428                'net80211/ieee80211_scan.h',
1429                'net80211/ieee80211_sta.h',
1430                'net80211/ieee80211_superg.h',
1431                'net80211/ieee80211_tdma.h',
1432                'net80211/ieee80211_var.h',
1433                'net80211/ieee80211_wds.h',
1434        ]
1435)
1436netipsec.addSourceFiles(
1437        [
1438                'net80211/ieee80211_acl.c',
1439                'net80211/ieee80211_action.c',
1440                'net80211/ieee80211_adhoc.c',
1441                'net80211/ieee80211_ageq.c',
1442                'net80211/ieee80211_amrr.c',
1443                'net80211/ieee80211.c',
1444                'net80211/ieee80211_crypto.c',
1445                'net80211/ieee80211_crypto_ccmp.c',
1446                'net80211/ieee80211_crypto_none.c',
1447                'net80211/ieee80211_crypto_tkip.c',
1448                'net80211/ieee80211_crypto_wep.c',
1449                'net80211/ieee80211_ddb.c',
1450                'net80211/ieee80211_dfs.c',
1451                'net80211/ieee80211_freebsd.c',
1452                'net80211/ieee80211_hostap.c',
1453                'net80211/ieee80211_ht.c',
1454                'net80211/ieee80211_hwmp.c',
1455                'net80211/ieee80211_input.c',
1456                'net80211/ieee80211_ioctl.c',
1457                'net80211/ieee80211_mesh.c',
1458                'net80211/ieee80211_monitor.c',
1459                'net80211/ieee80211_node.c',
1460                'net80211/ieee80211_output.c',
1461                'net80211/ieee80211_phy.c',
1462                'net80211/ieee80211_power.c',
1463                'net80211/ieee80211_proto.c',
1464                'net80211/ieee80211_radiotap.c',
1465                'net80211/ieee80211_ratectl.c',
1466                'net80211/ieee80211_ratectl_none.c',
1467                'net80211/ieee80211_regdomain.c',
1468                'net80211/ieee80211_rssadapt.c',
1469                'net80211/ieee80211_scan.c',
1470                'net80211/ieee80211_scan_sta.c',
1471                'net80211/ieee80211_sta.c',
1472                'net80211/ieee80211_superg.c',
1473                'net80211/ieee80211_tdma.c',
1474                'net80211/ieee80211_wds.c',
1475                'net80211/ieee80211_xauth.c',
1476        ]
1477)
1478
1479opencrypto = Module('opencrypto')
1480opencrypto.addHeaderFiles(
1481        [
1482                'sys/md5.h',
1483                'opencrypto/deflate.h',
1484                'opencrypto/xform.h',
1485                'opencrypto/cryptosoft.h',
1486                'opencrypto/rmd160.h',
1487                'opencrypto/cryptodev.h',
1488                'opencrypto/castsb.h',
1489                'opencrypto/skipjack.h',
1490                'opencrypto/cast.h',
1491        ]
1492)
1493opencrypto.addSourceFiles(
1494        [
1495                'opencrypto/crypto.c',
1496                'opencrypto/deflate.c',
1497                'opencrypto/cryptosoft.c',
1498                'opencrypto/criov.c',
1499                'opencrypto/rmd160.c',
1500                'opencrypto/xform.c',
1501                'opencrypto/skipjack.c',
1502                'opencrypto/cast.c',
1503                'opencrypto/cryptodev.c',
1504        ]
1505)
1506
1507crypto = Module('crypto')
1508crypto.addHeaderFiles(
1509        [
1510        #'crypto/aesni/aesni.h',
1511                'crypto/sha1.h',
1512                'crypto/sha2/sha2.h',
1513                'crypto/rijndael/rijndael.h',
1514                'crypto/rijndael/rijndael_local.h',
1515                'crypto/rijndael/rijndael-api-fst.h',
1516                'crypto/des/des.h',
1517                'crypto/des/spr.h',
1518                'crypto/des/podd.h',
1519                'crypto/des/sk.h',
1520                'crypto/des/des_locl.h',
1521                'crypto/blowfish/bf_pi.h',
1522                'crypto/blowfish/bf_locl.h',
1523                'crypto/blowfish/blowfish.h',
1524                'crypto/rc4/rc4.h',
1525        #'crypto/via/padlock.h',
1526                'crypto/camellia/camellia.h',
1527        ]
1528)
1529crypto.addSourceFiles(
1530        [
1531        #'crypto/aesni/aesni.c',
1532        #'crypto/aesni/aesni_wrap.c',
1533                'crypto/sha1.c',
1534                'crypto/sha2/sha2.c',
1535                'crypto/rijndael/rijndael-alg-fst.c',
1536                'crypto/rijndael/rijndael-api.c',
1537                'crypto/rijndael/rijndael-api-fst.c',
1538                'crypto/des/des_setkey.c',
1539                'crypto/des/des_enc.c',
1540                'crypto/des/des_ecb.c',
1541                'crypto/blowfish/bf_enc.c',
1542                'crypto/blowfish/bf_skey.c',
1543                'crypto/blowfish/bf_ecb.c',
1544                'crypto/rc4/rc4.c',
1545        #'crypto/via/padlock.c',
1546        #'crypto/via/padlock_cipher.c',
1547        #'crypto/via/padlock_hash.c',
1548                'crypto/camellia/camellia-api.c',
1549                'crypto/camellia/camellia.c',
1550        ]
1551)
1552
1553altq = Module('altq')
1554altq.addHeaderFiles(
1555        [
1556                'contrib/altq/altq/altq_rmclass.h',
1557                'contrib/altq/altq/altq_cbq.h',
1558                'contrib/altq/altq/altq_var.h',
1559                'contrib/altq/altq/altqconf.h',
1560                'contrib/altq/altq/altq.h',
1561                'contrib/altq/altq/altq_hfsc.h',
1562                'contrib/altq/altq/altq_red.h',
1563                'contrib/altq/altq/altq_classq.h',
1564                'contrib/altq/altq/altq_priq.h',
1565                'contrib/altq/altq/altq_rmclass_debug.h',
1566                'contrib/altq/altq/altq_cdnr.h',
1567                'contrib/altq/altq/altq_rio.h',
1568                'contrib/altq/altq/if_altq.h',
1569        ]
1570)
1571altq.addSourceFiles(
1572        [
1573                'contrib/altq/altq/altq_rmclass.c',
1574                'contrib/altq/altq/altq_rio.c',
1575                'contrib/altq/altq/altq_subr.c',
1576                'contrib/altq/altq/altq_cdnr.c',
1577                'contrib/altq/altq/altq_priq.c',
1578                'contrib/altq/altq/altq_cbq.c',
1579                'contrib/altq/altq/altq_hfsc.c',
1580                'contrib/altq/altq/altq_red.c',
1581        ]
1582)
1583
1584pf = Module('pf')
1585pf.addHeaderFiles(
1586        [
1587                'contrib/pf/net/pf_mtag.h',
1588                'contrib/pf/net/if_pfsync.h',
1589                'contrib/pf/net/pfvar.h',
1590                'contrib/pf/net/if_pflog.h',
1591        ]
1592)
1593pf.addSourceFiles(
1594        [
1595                'contrib/pf/netinet/in4_cksum.c',
1596                'contrib/pf/net/pf.c',
1597                'contrib/pf/net/if_pflog.c',
1598                'contrib/pf/net/pf_subr.c',
1599                'contrib/pf/net/pf_ioctl.c',
1600                'contrib/pf/net/pf_table.c',
1601                'contrib/pf/net/pf_if.c',
1602                'contrib/pf/net/pf_osfp.c',
1603                'contrib/pf/net/pf_norm.c',
1604                'contrib/pf/net/pf_ruleset.c',
1605                'contrib/pf/net/if_pfsync.c',
1606        ]
1607)
1608
1609mm.addEmptyFiles(
1610        [
1611                'cam/cam_queue.h',
1612                'ddb/db_sym.h',
1613                'ddb/ddb.h',
1614                'machine/cpu.h',
1615                'machine/elf.h',
1616                'machine/sf_buf.h',
1617        #'machine/vmparam.h',
1618                'net/vnet.h',
1619                'security/audit/audit.h',
1620                'security/mac/mac_framework.h',
1621                'sys/bio.h',
1622                'sys/copyright.h',
1623                'sys/cpuset.h',
1624                'sys/errno.h',
1625                'sys/exec.h',
1626                'sys/fail.h',
1627                'sys/limits.h',
1628                'sys/namei.h',
1629                'sys/_pthreadtypes.h',
1630        #'sys/resourcevar.h',
1631                'sys/sbuf.h',
1632                'sys/sched.h',
1633        'sys/select.h',
1634                'sys/syscallsubr.h',
1635                'sys/sysent.h',
1636                'sys/syslimits.h',
1637                'sys/sysproto.h',
1638        'sys/stat.h',
1639                'sys/taskqueue.h',
1640        #'sys/time.h',
1641                'time.h',
1642                'sys/timespec.h',
1643                'sys/_timeval.h',
1644        #'sys/vmmeter.h',
1645        #'sys/vnode.h',
1646        #'vm/pmap.h',
1647        #'vm/uma_int.h',
1648        #'vm/uma_dbg.h',
1649        #'vm/vm_extern.h',
1650        #'vm/vm_map.h',
1651        #'vm/vm_object.h',
1652        #'vm/vm_page.h',
1653        #'vm/vm_pageout.h',
1654        #'vm/vm_param.h',
1655        #'vm/vm_kern.h',
1656                'dev/pci/pcireg.h',
1657                'dev/pci/pcivar.h',
1658                'geom/geom_disk.h',
1659                #'sys/kdb.h',
1660                #'libkern/jenkins.h',
1661                #'machine/pcb.h',
1662                #'net80211/ieee80211_freebsd.h',
1663                'netgraph/ng_ipfw.h',
1664                #'sys/sf_buf.h',
1665        ]
1666)
1667
1668mm.addModule(netDeps)
1669mm.addModule(net)
1670mm.addModule(netinet)
1671mm.addModule(netinet6)
1672mm.addModule(netipsec)
1673mm.addModule(net80211)
1674mm.addModule(opencrypto)
1675mm.addModule(crypto)
1676mm.addModule(altq)
1677mm.addModule(pf)
1678mm.addModule(devNet)
1679
[63e8969]1680# mm.addModule(rtems)
[294ae20]1681mm.addModule(local)
1682mm.addModule(devUsbBase)
1683mm.addModule(devUsb)
1684mm.addModule(devUsbQuirk)
1685mm.addModule(devUsbController)
1686
1687mm.addModule(cam)
1688mm.addModule(devUsbStorage)
1689
1690#mm.addModule(devUsbNet)
1691
1692#mm.revertFiles()
1693mm.copyFiles()
1694mm.createMakefile()
[63e8969]1695
Note: See TracBrowser for help on using the repository browser.