[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 | # |
---|
[287453d] | 11 | # Copyright (c) 2012 OAR Corporation. All rights reserved. |
---|
| 12 | # |
---|
[294ae20] | 13 | # Redistribution and use in source and binary forms, with or without |
---|
| 14 | # modification, are permitted provided that the following conditions |
---|
| 15 | # are met: |
---|
| 16 | # 1. Redistributions of source code must retain the above copyright |
---|
| 17 | # notice, this list of conditions and the following disclaimer. |
---|
| 18 | # 2. Redistributions in binary form must reproduce the above copyright |
---|
| 19 | # notice, this list of conditions and the following disclaimer in the |
---|
| 20 | # documentation and/or other materials provided with the distribution. |
---|
| 21 | # |
---|
| 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
---|
| 23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
---|
| 24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
---|
| 25 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
---|
| 26 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
---|
| 27 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
---|
| 28 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
---|
| 29 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
---|
| 30 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
---|
| 31 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
---|
| 32 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 33 | |
---|
| 34 | # FreeBSD: http://svn.freebsd.org/base/releng/8.2/sys (revision 222485) |
---|
| 35 | |
---|
| 36 | import shutil |
---|
| 37 | import os |
---|
| 38 | import re |
---|
[63e8969] | 39 | import sys |
---|
[b9c291c] | 40 | import getopt |
---|
[287453d] | 41 | import filecmp |
---|
[7326d96] | 42 | import difflib |
---|
[b9c291c] | 43 | |
---|
[a803d120] | 44 | RTEMS_DIR = "not_set" |
---|
| 45 | FreeBSD_DIR = "not_set" |
---|
| 46 | isVerbose = False |
---|
[b9c291c] | 47 | isForward = True |
---|
[24600f2] | 48 | isDryRun = False |
---|
[7326d96] | 49 | isDiffMode = False |
---|
[a803d120] | 50 | isEarlyExit = False |
---|
[24600f2] | 51 | isOnlyMakefile = False |
---|
[287453d] | 52 | tempFile = "/tmp/tmp_FBRT" |
---|
[e1da9dc] | 53 | filesProcessed = 0 |
---|
[b9c291c] | 54 | |
---|
| 55 | def usage(): |
---|
[a803d120] | 56 | print "freebsd-to-rtems.py [args]" |
---|
| 57 | print " -?|-h|--help print this and exit" |
---|
| 58 | print " -d|--dry-run run program but no modifications" |
---|
[7326d96] | 59 | print " -D|--diff provide diff of files between trees" |
---|
[a803d120] | 60 | print " -e|--early-exit evaluate arguments, print results, and exit" |
---|
[24600f2] | 61 | print " -m|--makefile just generate Makefile" |
---|
[a803d120] | 62 | print " -R|--reverse default FreeBSD -> RTEMS, reverse that" |
---|
[af5db72] | 63 | print " -r|--rtems RTEMS Libbsd directory" |
---|
| 64 | print " -f|--freebsd FreeBSD SVN directory" |
---|
[a803d120] | 65 | print " -v|--verbose enable verbose output mode" |
---|
[b9c291c] | 66 | |
---|
| 67 | # Parse the arguments |
---|
| 68 | def parseArguments(): |
---|
[24600f2] | 69 | global RTEMS_DIR, FreeBSD_DIR |
---|
[e1da9dc] | 70 | global isVerbose, isForward, isDryRun, isEarlyExit |
---|
| 71 | global isOnlyMakefile, isDiffMode |
---|
[b9c291c] | 72 | try: |
---|
[7326d96] | 73 | opts, args = getopt.getopt(sys.argv[1:], "?hdDemRr:f:v", |
---|
[b9c291c] | 74 | ["help", |
---|
| 75 | "help", |
---|
[a803d120] | 76 | "dry-run" |
---|
[7326d96] | 77 | "diff" |
---|
[a803d120] | 78 | "early-exit" |
---|
[24600f2] | 79 | "makefile" |
---|
[b9c291c] | 80 | "reverse" |
---|
| 81 | "rtems=" |
---|
| 82 | "freebsd=" |
---|
| 83 | "verbose" |
---|
| 84 | ] |
---|
| 85 | ) |
---|
| 86 | except getopt.GetoptError, err: |
---|
| 87 | # print help information and exit: |
---|
| 88 | print str(err) # will print something like "option -a not recognized" |
---|
| 89 | usage() |
---|
| 90 | sys.exit(2) |
---|
| 91 | for o, a in opts: |
---|
| 92 | if o == "-v": |
---|
[a803d120] | 93 | isVerbose = True |
---|
[b9c291c] | 94 | elif o in ("-h", "--help", "-?"): |
---|
| 95 | usage() |
---|
| 96 | sys.exit() |
---|
[a803d120] | 97 | elif o in ("-d", "--dry-run"): |
---|
[e1da9dc] | 98 | isDryRun = True |
---|
[7326d96] | 99 | elif o in ("-D", "--diff"): |
---|
| 100 | isDiffMode = True |
---|
[a803d120] | 101 | elif o in ("-e", "--early-exit"): |
---|
| 102 | isEarlyExit = True |
---|
[24600f2] | 103 | elif o in ("-m", "--makefile"): |
---|
| 104 | isOnlyMakefile = True |
---|
[b9c291c] | 105 | elif o in ("-R", "--reverse"): |
---|
| 106 | isForward = False |
---|
| 107 | elif o in ("-r", "--rtems"): |
---|
| 108 | RTEMS_DIR = a |
---|
| 109 | elif o in ("-r", "--rtems"): |
---|
| 110 | RTEMS_DIR = a |
---|
| 111 | elif o in ("-f", "--freebsd"): |
---|
| 112 | FreeBSD_DIR = a |
---|
| 113 | else: |
---|
| 114 | assert False, "unhandled option" |
---|
| 115 | |
---|
| 116 | parseArguments() |
---|
[24600f2] | 117 | print "Verbose: " + ("no", "yes")[isVerbose] |
---|
| 118 | print "Dry Run: " + ("no", "yes")[isDryRun] |
---|
[7326d96] | 119 | print "Diff Mode Enabled: " + ("no", "yes")[isDiffMode] |
---|
[24600f2] | 120 | print "Only Generate Makefile: " + ("no", "yes")[isOnlyMakefile] |
---|
[af5db72] | 121 | print "RTEMS Libbsd Directory: " + RTEMS_DIR |
---|
| 122 | print "FreeBSD SVN Directory: " + FreeBSD_DIR |
---|
[24600f2] | 123 | print "Direction: " + ("reverse", "forward")[isForward] |
---|
[b9c291c] | 124 | |
---|
[a803d120] | 125 | # Check directory argument was set and exist |
---|
| 126 | def wasDirectorySet(desc, path): |
---|
| 127 | if path == "not_set": |
---|
| 128 | print desc + " Directory was not specified on command line" |
---|
| 129 | sys.exit(2) |
---|
| 130 | |
---|
| 131 | if os.path.isdir( path ) != True: |
---|
| 132 | print desc + " Directory (" + path + ") does not exist" |
---|
| 133 | sys.exit(2) |
---|
| 134 | |
---|
| 135 | # Were RTEMS and FreeBSD directories specified |
---|
| 136 | wasDirectorySet( "RTEMS", RTEMS_DIR ) |
---|
| 137 | wasDirectorySet( "FreeBSD", FreeBSD_DIR ) |
---|
[b9c291c] | 138 | |
---|
[1e8830f0] | 139 | # Are we generating or reverting? |
---|
| 140 | if isForward == True: |
---|
[7326d96] | 141 | print "Forward from FreeBSD SVN into ", RTEMS_DIR |
---|
[1e8830f0] | 142 | else: |
---|
[7326d96] | 143 | print "Reverting from ", RTEMS_DIR |
---|
[24600f2] | 144 | if isOnlyMakefile == True: |
---|
| 145 | print "Only Makefile Mode and Reverse are contradictory" |
---|
| 146 | sys.exit(2) |
---|
[1e8830f0] | 147 | |
---|
[a803d120] | 148 | if isEarlyExit == True: |
---|
| 149 | print "Early exit at user request" |
---|
| 150 | sys.exit(0) |
---|
| 151 | |
---|
[b9c291c] | 152 | # Prefix added to FreeBSD files as they are copied into the RTEMS |
---|
| 153 | # build tree. |
---|
| 154 | PREFIX = 'freebsd' |
---|
| 155 | |
---|
[294ae20] | 156 | def mapContribPath(path): |
---|
| 157 | m = re.match('(.*)(' + PREFIX + '/)(contrib/\\w+/)(.*)', path) |
---|
| 158 | if m: |
---|
| 159 | path = m.group(1) + m.group(3) + m.group(2) + m.group(4) |
---|
| 160 | return path |
---|
| 161 | |
---|
[9df9609] | 162 | # Move target dependent files under a machine directory |
---|
| 163 | def mapCPUDependentPath(path): |
---|
| 164 | return path.replace("include/", "include/freebsd/machine/") |
---|
| 165 | |
---|
[7326d96] | 166 | # compare and process file only if different |
---|
| 167 | # + copy or diff depending on execution mode |
---|
| 168 | def processIfDifferent(new, old, desc, src): |
---|
[e1da9dc] | 169 | global filesProcessed |
---|
[4ac7089] | 170 | global isVerbose, isDryRun, isEarlyExit |
---|
[7326d96] | 171 | # print new + " " + old + " X" + desc + "X " + src |
---|
| 172 | if not os.path.exists(old) or \ |
---|
| 173 | filecmp.cmp(new, old, shallow=False) == False: |
---|
[e1da9dc] | 174 | filesProcessed += 1 |
---|
[7326d96] | 175 | if isDiffMode == False: |
---|
[4ac7089] | 176 | if isVerbose == True: |
---|
| 177 | print "Move " + src + " to " + old |
---|
[7326d96] | 178 | if isDryRun == False: |
---|
| 179 | shutil.move(new, old) |
---|
| 180 | else: |
---|
| 181 | #print "Diff " + src |
---|
| 182 | old_contents = open(old).readlines() |
---|
| 183 | new_contents = open(new).readlines() |
---|
| 184 | for line in difflib.unified_diff( \ |
---|
| 185 | old_contents, new_contents, fromfile=src, tofile=new, n=5): |
---|
| 186 | sys.stdout.write(line) |
---|
[9df9609] | 187 | |
---|
[1e8830f0] | 188 | # generate an empty file as a place holder |
---|
[294ae20] | 189 | def installEmptyFile(src): |
---|
[b55081a] | 190 | global tempFile |
---|
[b9c291c] | 191 | dst = RTEMS_DIR + '/' + PREFIX + '/' + src.replace('rtems/', '') |
---|
[294ae20] | 192 | try: |
---|
[654f842] | 193 | if isDryRun == False: |
---|
| 194 | os.makedirs(os.path.dirname(dst)) |
---|
[294ae20] | 195 | except OSError: |
---|
| 196 | pass |
---|
[b55081a] | 197 | out = open(tempFile, 'w') |
---|
[294ae20] | 198 | out.write('/* EMPTY */\n') |
---|
| 199 | out.close() |
---|
[e3f2b51] | 200 | processIfDifferent(tempFile, dst, "empty file ", "empty file" ) |
---|
[294ae20] | 201 | |
---|
[1e8830f0] | 202 | # fix include paths inside a C or .h file |
---|
[294ae20] | 203 | def fixIncludes(data): |
---|
| 204 | data = re.sub('#([ \t]*)include <', '#\\1include <' + PREFIX + '/', data) |
---|
| 205 | data = re.sub('#include <' + PREFIX + '/rtems', '#include <rtems', data) |
---|
| 206 | data = re.sub('#include <' + PREFIX + '/bsp', '#include <bsp', data) |
---|
| 207 | data = re.sub('#include "([^"]*)"', '#include <' + PREFIX + '/local/\\1>', data) |
---|
| 208 | data = re.sub('_H_', '_HH_', data) |
---|
| 209 | return data |
---|
| 210 | |
---|
[1e8830f0] | 211 | # revert fixing the include paths inside a C or .h file |
---|
[294ae20] | 212 | def revertFixIncludes(data): |
---|
| 213 | data = re.sub('_HH_', '_H_', data) |
---|
| 214 | data = re.sub('#include <' + PREFIX + '/local/([^>]*)>', '#include "\\1"', data) |
---|
| 215 | data = re.sub('#([ \t]*)include <' + PREFIX + '/', '#\\1include <', data) |
---|
| 216 | return data |
---|
| 217 | |
---|
[1e8830f0] | 218 | # Copy a header file from FreeBSD to the RTEMS BSD tree |
---|
[9df9609] | 219 | def installHeaderFile(org, target): |
---|
[287453d] | 220 | global tempFile |
---|
[b9c291c] | 221 | src = FreeBSD_DIR + '/' + org |
---|
[af5db72] | 222 | dst = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
[294ae20] | 223 | dst = mapContribPath(dst) |
---|
[9df9609] | 224 | if target != "generic": |
---|
| 225 | dst = mapCPUDependentPath(dst) |
---|
[294ae20] | 226 | try: |
---|
[654f842] | 227 | if isDryRun == False: |
---|
| 228 | os.makedirs(os.path.dirname(dst)) |
---|
[294ae20] | 229 | except OSError: |
---|
| 230 | pass |
---|
| 231 | data = open(src).read() |
---|
[287453d] | 232 | out = open(tempFile, 'w') |
---|
[af5db72] | 233 | if org.find('rtems') == -1: |
---|
[294ae20] | 234 | data = fixIncludes(data) |
---|
| 235 | out.write(data) |
---|
| 236 | out.close() |
---|
[7326d96] | 237 | processIfDifferent(tempFile, dst, "Header ", src) |
---|
[287453d] | 238 | |
---|
[294ae20] | 239 | |
---|
[1e8830f0] | 240 | # Copy a source file from FreeBSD to the RTEMS BSD tree |
---|
[b9c291c] | 241 | def installSourceFile(org): |
---|
[287453d] | 242 | global tempFile |
---|
[b9c291c] | 243 | src = FreeBSD_DIR + '/' + org |
---|
| 244 | dst = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
[294ae20] | 245 | dst = mapContribPath(dst) |
---|
| 246 | try: |
---|
[654f842] | 247 | if isDryRun == False: |
---|
| 248 | os.makedirs(os.path.dirname(dst)) |
---|
[294ae20] | 249 | except OSError: |
---|
| 250 | pass |
---|
| 251 | data = open(src).read() |
---|
[287453d] | 252 | out = open(tempFile, 'w') |
---|
[af5db72] | 253 | if org.find('rtems') == -1: |
---|
[294ae20] | 254 | data = fixIncludes(data) |
---|
| 255 | out.write('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n') |
---|
| 256 | out.write(data) |
---|
| 257 | out.close() |
---|
[7326d96] | 258 | processIfDifferent(tempFile, dst, "Source ", src) |
---|
[294ae20] | 259 | |
---|
[1e8830f0] | 260 | # Revert a header file from the RTEMS BSD tree to the FreeBSD tree |
---|
[9df9609] | 261 | def revertHeaderFile(org, target): |
---|
[4d771c5] | 262 | global tempFile |
---|
[b9c291c] | 263 | src = RTEMS_DIR + '/' + PREFIX + '/' + org.replace('rtems/', '') |
---|
[294ae20] | 264 | src = mapContribPath(src) |
---|
[4d771c5] | 265 | if target != "generic": |
---|
| 266 | src = mapCPUDependentPath(src) |
---|
[b9c291c] | 267 | dst = FreeBSD_DIR + '/' + org |
---|
[294ae20] | 268 | try: |
---|
[654f842] | 269 | if isDryRun == False: |
---|
| 270 | os.makedirs(os.path.dirname(dst)) |
---|
[294ae20] | 271 | except OSError: |
---|
| 272 | pass |
---|
| 273 | data = open(src).read() |
---|
[4d771c5] | 274 | out = open(tempFile, 'w') |
---|
[294ae20] | 275 | if org.find('rtems') == -1: |
---|
| 276 | data = revertFixIncludes(data) |
---|
| 277 | out.write(data) |
---|
| 278 | out.close() |
---|
[7326d96] | 279 | processIfDifferent(tempFile, dst, "Header ", src) |
---|
[294ae20] | 280 | |
---|
[1e8830f0] | 281 | # Revert a source file from the RTEMS BSD tree to the FreeBSD tree |
---|
[4d771c5] | 282 | def revertSourceFile(org, target): |
---|
[b9c291c] | 283 | src = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
[294ae20] | 284 | src = mapContribPath(src) |
---|
[b9c291c] | 285 | dst = FreeBSD_DIR + '/' + org |
---|
[4d771c5] | 286 | if target != "generic": |
---|
| 287 | src = mapCPUDependentPath(src) |
---|
[294ae20] | 288 | try: |
---|
[654f842] | 289 | if isDryRun == False: |
---|
| 290 | os.makedirs(os.path.dirname(dst)) |
---|
[294ae20] | 291 | except OSError: |
---|
| 292 | pass |
---|
| 293 | data = open(src).read() |
---|
[4d771c5] | 294 | out = open(tempFile, 'w') |
---|
[294ae20] | 295 | if org.find('rtems') == -1: |
---|
| 296 | data = re.sub('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n', '', data) |
---|
| 297 | data = revertFixIncludes(data) |
---|
| 298 | out.write(data) |
---|
| 299 | out.close() |
---|
[7326d96] | 300 | processIfDifferent(tempFile, dst, "Source ", src) |
---|
[294ae20] | 301 | |
---|
[1e8830f0] | 302 | # Remove the output directory |
---|
[294ae20] | 303 | def deleteOutputDirectory(): |
---|
| 304 | try: |
---|
[654f842] | 305 | if isVerbose == True: |
---|
| 306 | print "Delete Directory - " + RTEMS_DIR + "/freebsd" |
---|
| 307 | if isVerbose == True: |
---|
| 308 | print "Delete Directory - " + RTEMS_DIR + "/contrib" |
---|
| 309 | if isDryRun == True: |
---|
| 310 | return |
---|
| 311 | shutil.rmtree(RTEMS_DIR + "/freebsd" ) |
---|
| 312 | shutil.rmtree(RTEMS_DIR + "/contrib" ) |
---|
[294ae20] | 313 | except OSError: |
---|
| 314 | pass |
---|
| 315 | |
---|
[1e8830f0] | 316 | # Module Manager - Collection of Modules |
---|
[294ae20] | 317 | class ModuleManager: |
---|
| 318 | def __init__(self): |
---|
| 319 | self.modules = [] |
---|
| 320 | self.emptyFiles = [] |
---|
| 321 | |
---|
| 322 | def addModule(self, module): |
---|
| 323 | self.modules.append(module) |
---|
| 324 | |
---|
| 325 | def addEmptyFiles(self, emptyFiles): |
---|
| 326 | self.emptyFiles.extend(emptyFiles) |
---|
| 327 | |
---|
| 328 | def copyFiles(self): |
---|
| 329 | for f in self.emptyFiles: |
---|
| 330 | installEmptyFile(f) |
---|
| 331 | for m in self.modules: |
---|
| 332 | for f in m.headerFiles: |
---|
[9df9609] | 333 | installHeaderFile(f, m.target) |
---|
[294ae20] | 334 | for f in m.sourceFiles: |
---|
| 335 | installSourceFile(f) |
---|
| 336 | |
---|
| 337 | def revertFiles(self): |
---|
| 338 | for m in self.modules: |
---|
| 339 | for f in m.headerFiles: |
---|
[9df9609] | 340 | revertHeaderFile(f, m.target) |
---|
[294ae20] | 341 | for f in m.sourceFiles: |
---|
[4d771c5] | 342 | revertSourceFile(f, m.target) |
---|
[294ae20] | 343 | |
---|
| 344 | def createMakefile(self): |
---|
[9df9609] | 345 | global tempFile |
---|
[63e8969] | 346 | data = 'include config.inc\n' \ |
---|
[294ae20] | 347 | '\n' \ |
---|
| 348 | 'include $(RTEMS_MAKEFILE_PATH)/Makefile.inc\n' \ |
---|
| 349 | 'include $(RTEMS_CUSTOM)\n' \ |
---|
| 350 | 'include $(PROJECT_ROOT)/make/leaf.cfg\n' \ |
---|
| 351 | '\n' \ |
---|
[b9c291c] | 352 | 'CFLAGS += -ffreestanding \n' \ |
---|
| 353 | 'CFLAGS += -I . \n' \ |
---|
| 354 | 'CFLAGS += -I rtemsbsd \n' \ |
---|
[9df9609] | 355 | 'CFLAGS += -I freebsd/$(RTEMS_CPU)/include \n' \ |
---|
[b9c291c] | 356 | 'CFLAGS += -I contrib/altq \n' \ |
---|
| 357 | 'CFLAGS += -I contrib/pf \n' \ |
---|
| 358 | 'CFLAGS += -B $(INSTALL_BASE) \n' \ |
---|
| 359 | 'CFLAGS += -w \n' \ |
---|
| 360 | 'CFLAGS += -std=gnu99\n' \ |
---|
[294ae20] | 361 | '\n' |
---|
| 362 | data += 'C_FILES =' |
---|
| 363 | for m in self.modules: |
---|
[9df9609] | 364 | if m.target == "generic": |
---|
| 365 | for f in m.sourceFiles: |
---|
| 366 | f = PREFIX + '/' + f |
---|
| 367 | f = mapContribPath(f) |
---|
| 368 | data += ' \\\n\t' + f |
---|
| 369 | data += '\n' |
---|
| 370 | data += '# RTEMS Project Owned Files\n' |
---|
| 371 | data += 'C_FILES +=' |
---|
[63e8969] | 372 | for f in rtems_sourceFiles: |
---|
[9df9609] | 373 | data += ' \\\n\trtemsbsd/' + f |
---|
| 374 | data += '\n' |
---|
| 375 | data += '\n' |
---|
| 376 | for m in self.modules: |
---|
| 377 | if m.target != "generic": |
---|
| 378 | data += "ifeq ($(RTEMS_CPU)," + m.target + ")\n" |
---|
| 379 | data += "C_FILES +=" |
---|
| 380 | for f in m.sourceFiles: |
---|
| 381 | f = PREFIX + '/' + f |
---|
| 382 | f = mapContribPath(f) |
---|
| 383 | data += ' \\\n\t' + f |
---|
| 384 | data += '\n' |
---|
| 385 | data += 'endif\n' |
---|
| 386 | |
---|
| 387 | |
---|
| 388 | data += '\n' \ |
---|
| 389 | 'C_O_FILES = $(C_FILES:%.c=%.o)\n' \ |
---|
[294ae20] | 390 | 'C_DEP_FILES = $(C_FILES:%.c=%.dep)\n' \ |
---|
| 391 | '\n' \ |
---|
| 392 | 'LIB = libbsd.a\n' \ |
---|
| 393 | '\n' \ |
---|
| 394 | 'all: lib_usb\n' \ |
---|
| 395 | '\n' \ |
---|
| 396 | '$(LIB): $(C_O_FILES)\n' \ |
---|
| 397 | '\t$(AR) rcu $@ $^\n' \ |
---|
| 398 | '\n' \ |
---|
| 399 | 'lib_usb:\n' \ |
---|
[25b3317] | 400 | '\t$(MAKE) $(LIB)\n' \ |
---|
[294ae20] | 401 | '\n' \ |
---|
| 402 | 'install: $(LIB)\n' \ |
---|
[3616a06] | 403 | '\tinstall -d $(INSTALL_BASE)/include\n' \ |
---|
[294ae20] | 404 | '\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \ |
---|
[3616a06] | 405 | '\tcd rtemsbsd; for i in `find . -name \'*.h\'` ; do \\\n' \ |
---|
| 406 | '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ |
---|
| 407 | '\tfor i in `find contrib freebsd -name \'*.h\'` ; do \\\n' \ |
---|
[63e8969] | 408 | '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ |
---|
[294ae20] | 409 | '\n' \ |
---|
| 410 | 'clean:\n' \ |
---|
| 411 | '\trm -f -r $(PROJECT_INCLUDE)/rtems/freebsd\n' \ |
---|
| 412 | '\trm -f $(LIB) $(C_O_FILES) $(C_DEP_FILES)\n' \ |
---|
[8f5adbc] | 413 | '\trm -f libbsd.html\n' \ |
---|
[294ae20] | 414 | '\n' \ |
---|
[8f5adbc] | 415 | '-include $(C_DEP_FILES)\n' \ |
---|
| 416 | '\n' \ |
---|
| 417 | 'doc: libbsd.html\n' \ |
---|
| 418 | '\n' \ |
---|
| 419 | 'libbsd.html: libbsd.txt\n' \ |
---|
| 420 | '\tasciidoc -o libbsd.html libbsd.txt\n' |
---|
| 421 | |
---|
[9df9609] | 422 | out = open(tempFile, 'w') |
---|
[294ae20] | 423 | out.write(data) |
---|
| 424 | out.close() |
---|
[9df9609] | 425 | makefile = RTEMS_DIR + '/Makefile' |
---|
[e3f2b51] | 426 | processIfDifferent(tempFile, makefile, "Makefile ", "Makefile") |
---|
[294ae20] | 427 | |
---|
[1e8830f0] | 428 | # Module - logical group of related files we can perform actions on |
---|
[294ae20] | 429 | class Module: |
---|
| 430 | def __init__(self, name): |
---|
| 431 | self.name = name |
---|
[9df9609] | 432 | self.target = "generic" |
---|
[294ae20] | 433 | self.headerFiles = [] |
---|
| 434 | self.sourceFiles = [] |
---|
| 435 | self.dependencies = [] |
---|
| 436 | |
---|
[9df9609] | 437 | def setTarget(self, value): |
---|
| 438 | self.target = value |
---|
| 439 | |
---|
[294ae20] | 440 | def addHeaderFiles(self, files): |
---|
| 441 | self.headerFiles.extend(files) |
---|
[0d436c7] | 442 | for file in files: |
---|
| 443 | if file[-2] != '.' or file[-1] != 'h': |
---|
| 444 | print "*** " + file + " does not end in .h" |
---|
| 445 | print "*** Move it to a C source file list" |
---|
| 446 | sys.exit(2) |
---|
[294ae20] | 447 | |
---|
| 448 | def addSourceFiles(self, files): |
---|
| 449 | self.sourceFiles.extend(files) |
---|
[0d436c7] | 450 | for file in files: |
---|
[9df9609] | 451 | if file[-2] != '.' or \ |
---|
| 452 | (file[-1] != 'c' and file[-1] != 'S'): |
---|
[0d436c7] | 453 | print "*** " + file + " does not end in .c" |
---|
| 454 | print "*** Move it to a header file list" |
---|
| 455 | sys.exit(2) |
---|
| 456 | |
---|
[294ae20] | 457 | |
---|
| 458 | def addDependency(self, dep): |
---|
| 459 | self.dependencies.append(dep) |
---|
| 460 | |
---|
[1e8830f0] | 461 | # Create Module Manager and supporting Modules |
---|
| 462 | # - initialize each module with set of files associated |
---|
[294ae20] | 463 | mm = ModuleManager() |
---|
| 464 | |
---|
[63e8969] | 465 | rtems_headerFiles = [ |
---|
| 466 | 'rtems/machine/atomic.h', |
---|
[294ae20] | 467 | 'rtems/machine/_bus.h', |
---|
[63e8969] | 468 | 'rtems/machine/bus.h', |
---|
| 469 | 'rtems/machine/bus_dma.h', |
---|
[294ae20] | 470 | 'rtems/machine/rtems-bsd-config.h', |
---|
| 471 | 'rtems/machine/clock.h', |
---|
[63e8969] | 472 | 'rtems/machine/cpufunc.h', |
---|
| 473 | 'rtems/machine/endian.h', |
---|
| 474 | 'rtems/machine/_limits.h', |
---|
| 475 | 'rtems/machine/_align.h', |
---|
| 476 | 'rtems/machine/mutex.h', |
---|
| 477 | 'rtems/machine/param.h', |
---|
| 478 | 'rtems/machine/pcpu.h', |
---|
[d75b748] | 479 | 'rtems/machine/pmap.h', |
---|
[63e8969] | 480 | 'rtems/machine/proc.h', |
---|
| 481 | 'rtems/machine/resource.h', |
---|
| 482 | 'rtems/machine/runq.h', |
---|
| 483 | 'rtems/machine/signal.h', |
---|
| 484 | 'rtems/machine/stdarg.h', |
---|
| 485 | 'rtems/machine/_stdint.h', |
---|
| 486 | 'rtems/machine/_types.h', |
---|
| 487 | 'rtems/machine/ucontext.h', |
---|
| 488 | 'rtems/machine/rtems-bsd-symbols.h', |
---|
| 489 | 'rtems/machine/rtems-bsd-cache.h', |
---|
| 490 | 'rtems/machine/rtems-bsd-sysinit.h', |
---|
[294ae20] | 491 | 'rtems/machine/rtems-bsd-select.h', |
---|
[da162c8] | 492 | 'rtems/machine/rtems-bsd-taskqueue.h', |
---|
[63e8969] | 493 | 'bsd.h', |
---|
[294ae20] | 494 | ] |
---|
[63e8969] | 495 | rtems_sourceFiles = [ |
---|
[918638f] | 496 | 'dev/usb/controller/ohci_lpc24xx.c', |
---|
| 497 | 'dev/usb/controller/ohci_lpc32xx.c', |
---|
| 498 | 'dev/usb/controller/ehci_mpc83xx.c', |
---|
[24600f2] | 499 | 'src/rtems-bsd-cam.c', |
---|
| 500 | 'src/rtems-bsd-nexus.c', |
---|
| 501 | 'src/rtems-bsd-autoconf.c', |
---|
| 502 | 'src/rtems-bsd-delay.c', |
---|
| 503 | 'src/rtems-bsd-mutex.c', |
---|
| 504 | 'src/rtems-bsd-thread.c', |
---|
| 505 | 'src/rtems-bsd-condvar.c', |
---|
| 506 | 'src/rtems-bsd-lock.c', |
---|
[d1528ff] | 507 | 'src/rtems-bsd-log.c', |
---|
[24600f2] | 508 | 'src/rtems-bsd-sx.c', |
---|
| 509 | 'src/rtems-bsd-rwlock.c', |
---|
| 510 | 'src/rtems-bsd-generic.c', |
---|
| 511 | 'src/rtems-bsd-panic.c', |
---|
| 512 | 'src/rtems-bsd-synch.c', |
---|
| 513 | 'src/rtems-bsd-signal.c', |
---|
| 514 | 'src/rtems-bsd-callout.c', |
---|
| 515 | 'src/rtems-bsd-init.c', |
---|
| 516 | 'src/rtems-bsd-init-with-irq.c', |
---|
| 517 | 'src/rtems-bsd-assert.c', |
---|
| 518 | 'src/rtems-bsd-prot.c', |
---|
| 519 | 'src/rtems-bsd-resource.c', |
---|
| 520 | 'src/rtems-bsd-jail.c', |
---|
| 521 | 'src/rtems-bsd-shell.c', |
---|
| 522 | 'src/rtems-bsd-syscalls.c', |
---|
[0f09b72] | 523 | 'src/rtems-bsd-smp.c', |
---|
[24600f2] | 524 | #'src/rtems-bsd-socket.c', |
---|
| 525 | #'src/rtems-bsd-mbuf.c', |
---|
| 526 | 'src/rtems-bsd-malloc.c', |
---|
| 527 | 'src/rtems-bsd-support.c', |
---|
| 528 | 'src/rtems-bsd-bus-dma.c', |
---|
| 529 | 'src/rtems-bsd-sysctl.c', |
---|
| 530 | 'src/rtems-bsd-sysctlbyname.c', |
---|
| 531 | 'src/rtems-bsd-sysctlnametomib.c', |
---|
| 532 | 'src/rtems-bsd-uma.c', |
---|
[da162c8] | 533 | 'src/rtems-bsd-taskqueue.c', |
---|
[dc4c490] | 534 | 'src/rtems-bsd-timesupport.c', |
---|
[459afb1] | 535 | 'src/rtems-bsd-timeout.c', |
---|
[134df2e] | 536 | 'src/rtems-bsd-newproc.c', |
---|
[962b220] | 537 | 'src/rtems-bsd-vm_glue.c', |
---|
[d9e838b] | 538 | 'src/rtems-bsd-cyclecount.c', |
---|
[294ae20] | 539 | ] |
---|
[63e8969] | 540 | # RTEMS files handled separately from modules |
---|
| 541 | # rtems = Module('rtems') |
---|
| 542 | # rtems.addHeaderFiles( rtems_headerFiles ) |
---|
| 543 | # rtems.addSourceFiles( rtems_sourceFiles ) |
---|
[294ae20] | 544 | |
---|
| 545 | local = Module('local') |
---|
[24600f2] | 546 | # RTEMS has its own local/pmap.h |
---|
[294ae20] | 547 | local.addHeaderFiles( |
---|
| 548 | [ |
---|
| 549 | 'local/bus_if.h', |
---|
| 550 | 'local/device_if.h', |
---|
| 551 | #'local/linker_if.h', |
---|
| 552 | 'local/opt_bus.h', |
---|
| 553 | 'local/opt_cam.h', |
---|
| 554 | 'local/opt_compat.h', |
---|
| 555 | 'local/opt_ddb.h', |
---|
| 556 | 'local/opt_hwpmc_hooks.h', |
---|
| 557 | 'local/opt_init_path.h', |
---|
| 558 | 'local/opt_ktrace.h', |
---|
| 559 | 'local/opt_printf.h', |
---|
| 560 | 'local/opt_scsi.h', |
---|
| 561 | 'local/opt_usb.h', |
---|
| 562 | 'local/opt_inet.h', |
---|
| 563 | 'local/opt_inet6.h', |
---|
| 564 | 'local/opt_altq.h', |
---|
| 565 | 'local/opt_atalk.h', |
---|
| 566 | 'local/opt_bootp.h', |
---|
| 567 | 'local/opt_bpf.h', |
---|
| 568 | 'local/opt_bus.h', |
---|
| 569 | 'local/opt_cam.h', |
---|
| 570 | 'local/opt_carp.h', |
---|
| 571 | 'local/opt_compat.h', |
---|
[1e8830f0] | 572 | 'local/opt_config.h', |
---|
[294ae20] | 573 | 'local/opt_cpu.h', |
---|
| 574 | 'local/opt_ddb.h', |
---|
| 575 | 'local/opt_device_polling.h', |
---|
| 576 | 'local/opt_ef.h', |
---|
| 577 | 'local/opt_enc.h', |
---|
| 578 | 'local/opt_hwpmc_hooks.h', |
---|
| 579 | 'local/opt_inet6.h', |
---|
| 580 | 'local/opt_inet.h', |
---|
| 581 | 'local/opt_init_path.h', |
---|
| 582 | 'local/opt_ipdivert.h', |
---|
| 583 | 'local/opt_ipdn.h', |
---|
| 584 | 'local/opt_ipfw.h', |
---|
| 585 | 'local/opt_ipsec.h', |
---|
| 586 | 'local/opt_ipstealth.h', |
---|
| 587 | 'local/opt_ipx.h', |
---|
| 588 | 'local/opt_kdb.h', |
---|
| 589 | 'local/opt_kdtrace.h', |
---|
| 590 | 'local/opt_ktrace.h', |
---|
| 591 | 'local/opt_mbuf_profiling.h', |
---|
| 592 | 'local/opt_mbuf_stress_test.h', |
---|
| 593 | 'local/opt_mpath.h', |
---|
| 594 | 'local/opt_mrouting.h', |
---|
| 595 | 'local/opt_natm.h', |
---|
| 596 | 'local/opt_netgraph.h', |
---|
| 597 | 'local/opt_param.h', |
---|
[1e8830f0] | 598 | 'local/opt_posix.h', |
---|
| 599 | 'local/opt_pf.h', |
---|
[294ae20] | 600 | 'local/opt_printf.h', |
---|
| 601 | 'local/opt_route.h', |
---|
| 602 | 'local/opt_scsi.h', |
---|
| 603 | 'local/opt_sctp.h', |
---|
| 604 | 'local/opt_tcpdebug.h', |
---|
| 605 | 'local/opt_tdma.h', |
---|
| 606 | 'local/opt_usb.h', |
---|
| 607 | 'local/opt_vlan.h', |
---|
| 608 | 'local/opt_wlan.h', |
---|
[1e8830f0] | 609 | 'local/opt_zero.h', |
---|
[294ae20] | 610 | 'local/usbdevs_data.h', |
---|
| 611 | 'local/usbdevs.h', |
---|
| 612 | 'local/usb_if.h', |
---|
| 613 | 'local/vnode_if.h', |
---|
| 614 | 'local/vnode_if_newproto.h', |
---|
| 615 | 'local/vnode_if_typedef.h', |
---|
| 616 | 'local/cryptodev_if.h', |
---|
| 617 | 'local/miibus_if.h', |
---|
[1e8830f0] | 618 | 'local/miidevs.h', |
---|
[294ae20] | 619 | ] |
---|
| 620 | ) |
---|
| 621 | local.addSourceFiles( |
---|
| 622 | [ |
---|
| 623 | 'local/usb_if.c', |
---|
| 624 | 'local/bus_if.c', |
---|
| 625 | #'local/linker_if.c', |
---|
| 626 | 'local/device_if.c', |
---|
| 627 | 'local/cryptodev_if.c', |
---|
| 628 | 'local/miibus_if.c', |
---|
| 629 | ] |
---|
| 630 | ) |
---|
| 631 | |
---|
| 632 | devUsb = Module('dev_usb') |
---|
| 633 | devUsb.addHeaderFiles( |
---|
| 634 | [ |
---|
| 635 | 'dev/usb/ufm_ioctl.h', |
---|
| 636 | 'dev/usb/usb_busdma.h', |
---|
| 637 | 'dev/usb/usb_bus.h', |
---|
| 638 | 'dev/usb/usb_cdc.h', |
---|
| 639 | 'dev/usb/usb_controller.h', |
---|
| 640 | 'dev/usb/usb_core.h', |
---|
| 641 | 'dev/usb/usb_debug.h', |
---|
| 642 | 'dev/usb/usb_dev.h', |
---|
| 643 | 'dev/usb/usb_device.h', |
---|
| 644 | 'dev/usb/usbdi.h', |
---|
| 645 | 'dev/usb/usbdi_util.h', |
---|
| 646 | 'dev/usb/usb_dynamic.h', |
---|
| 647 | 'dev/usb/usb_endian.h', |
---|
| 648 | 'dev/usb/usb_freebsd.h', |
---|
| 649 | 'dev/usb/usb_generic.h', |
---|
| 650 | 'dev/usb/usb.h', |
---|
| 651 | 'dev/usb/usbhid.h', |
---|
| 652 | 'dev/usb/usb_hub.h', |
---|
| 653 | 'dev/usb/usb_ioctl.h', |
---|
| 654 | 'dev/usb/usb_mbuf.h', |
---|
| 655 | 'dev/usb/usb_msctest.h', |
---|
| 656 | 'dev/usb/usb_process.h', |
---|
| 657 | 'dev/usb/usb_request.h', |
---|
| 658 | 'dev/usb/usb_transfer.h', |
---|
| 659 | 'dev/usb/usb_util.h', |
---|
| 660 | ] |
---|
| 661 | ) |
---|
| 662 | devUsb.addSourceFiles( |
---|
| 663 | [ |
---|
| 664 | 'dev/usb/usb_busdma.c', |
---|
| 665 | 'dev/usb/usb_core.c', |
---|
| 666 | 'dev/usb/usb_debug.c', |
---|
| 667 | 'dev/usb/usb_dev.c', |
---|
| 668 | 'dev/usb/usb_device.c', |
---|
| 669 | 'dev/usb/usb_dynamic.c', |
---|
| 670 | 'dev/usb/usb_error.c', |
---|
| 671 | 'dev/usb/usb_generic.c', |
---|
| 672 | 'dev/usb/usb_handle_request.c', |
---|
| 673 | 'dev/usb/usb_hid.c', |
---|
| 674 | 'dev/usb/usb_hub.c', |
---|
| 675 | 'dev/usb/usb_lookup.c', |
---|
| 676 | 'dev/usb/usb_mbuf.c', |
---|
| 677 | 'dev/usb/usb_msctest.c', |
---|
| 678 | 'dev/usb/usb_parse.c', |
---|
| 679 | 'dev/usb/usb_process.c', |
---|
| 680 | 'dev/usb/usb_request.c', |
---|
| 681 | 'dev/usb/usb_transfer.c', |
---|
| 682 | 'dev/usb/usb_util.c', |
---|
| 683 | ] |
---|
| 684 | ) |
---|
| 685 | |
---|
| 686 | devUsbAddOn = Module('dev_usb_add_on') |
---|
| 687 | devUsbAddOn.addHeaderFiles( |
---|
| 688 | [ |
---|
| 689 | 'dev/usb/usb_pci.h', |
---|
| 690 | 'dev/usb/usb_compat_linux.h', |
---|
| 691 | ] |
---|
| 692 | ) |
---|
| 693 | devUsbAddOn.addSourceFiles( |
---|
| 694 | [ |
---|
| 695 | 'dev/usb/usb_compat_linux.c', |
---|
| 696 | ] |
---|
| 697 | ) |
---|
| 698 | |
---|
| 699 | devUsbBluetooth = Module('dev_usb_bluetooth') |
---|
| 700 | devUsbBluetooth.addDependency(devUsb) |
---|
| 701 | devUsbBluetooth.addHeaderFiles( |
---|
| 702 | [ |
---|
| 703 | 'dev/usb/bluetooth/ng_ubt_var.h', |
---|
| 704 | ] |
---|
| 705 | ) |
---|
| 706 | devUsbBluetooth.addSourceFiles( |
---|
| 707 | [ |
---|
| 708 | 'dev/usb/bluetooth/ng_ubt.c', |
---|
| 709 | 'dev/usb/bluetooth/ubtbcmfw.c', |
---|
| 710 | ] |
---|
| 711 | ) |
---|
| 712 | |
---|
| 713 | devUsbController = Module('dev_usb_controller') |
---|
| 714 | devUsbController.addDependency(devUsb) |
---|
| 715 | devUsbController.addHeaderFiles( |
---|
| 716 | [ |
---|
| 717 | 'dev/usb/controller/ohci.h', |
---|
| 718 | 'dev/usb/controller/ohcireg.h', |
---|
| 719 | 'dev/usb/controller/ehci.h', |
---|
| 720 | 'dev/usb/controller/ehcireg.h', |
---|
| 721 | ] |
---|
| 722 | ) |
---|
| 723 | devUsbController.addSourceFiles( |
---|
| 724 | [ |
---|
| 725 | 'dev/usb/controller/ohci.c', |
---|
| 726 | 'dev/usb/controller/ehci.c', |
---|
| 727 | 'dev/usb/controller/usb_controller.c', |
---|
| 728 | ] |
---|
| 729 | ) |
---|
| 730 | |
---|
| 731 | devUsbControllerAddOn = Module('dev_usb_controller_add_on') |
---|
| 732 | devUsbControllerAddOn.addDependency(devUsb) |
---|
| 733 | devUsbControllerAddOn.addHeaderFiles( |
---|
| 734 | [ |
---|
| 735 | 'dev/usb/controller/at91dci.h', |
---|
| 736 | 'dev/usb/controller/atmegadci.h', |
---|
| 737 | 'dev/usb/controller/musb_otg.h', |
---|
| 738 | 'dev/usb/controller/uss820dci.h', |
---|
| 739 | ] |
---|
| 740 | ) |
---|
| 741 | devUsbControllerAddOn.addSourceFiles( |
---|
| 742 | [ |
---|
| 743 | 'dev/usb/controller/at91dci_atmelarm.c', |
---|
| 744 | 'dev/usb/controller/at91dci.c', |
---|
| 745 | 'dev/usb/controller/atmegadci_atmelarm.c', |
---|
| 746 | 'dev/usb/controller/atmegadci.c', |
---|
| 747 | 'dev/usb/controller/ehci_ixp4xx.c', |
---|
| 748 | 'dev/usb/controller/ehci_pci.c', |
---|
| 749 | 'dev/usb/controller/musb_otg.c', |
---|
| 750 | 'dev/usb/controller/ehci_mbus.c', |
---|
| 751 | 'dev/usb/controller/musb_otg_atmelarm.c', |
---|
| 752 | 'dev/usb/controller/ohci_atmelarm.c', |
---|
| 753 | 'dev/usb/controller/ohci_pci.c', |
---|
| 754 | 'dev/usb/controller/uhci_pci.c', |
---|
| 755 | 'dev/usb/controller/uss820dci_atmelarm.c', |
---|
| 756 | 'dev/usb/controller/uss820dci.c', |
---|
| 757 | ] |
---|
| 758 | ) |
---|
| 759 | |
---|
| 760 | devUsbInput = Module('dev_usb_input') |
---|
| 761 | devUsbInput.addDependency(devUsb) |
---|
| 762 | devUsbInput.addHeaderFiles( |
---|
| 763 | [ |
---|
| 764 | 'dev/usb/input/usb_rdesc.h', |
---|
| 765 | ] |
---|
| 766 | ) |
---|
| 767 | devUsbInput.addSourceFiles( |
---|
| 768 | [ |
---|
| 769 | 'dev/usb/input/uhid.c', |
---|
| 770 | 'dev/usb/input/ukbd.c', |
---|
| 771 | ] |
---|
| 772 | ) |
---|
| 773 | |
---|
| 774 | devUsbInputMouse = Module('dev_usb_mouse') |
---|
| 775 | devUsbInputMouse.addDependency(devUsb) |
---|
| 776 | devUsbInputMouse.addHeaderFiles( |
---|
| 777 | [ |
---|
| 778 | 'sys/tty.h', |
---|
| 779 | 'sys/mouse.h', |
---|
| 780 | 'sys/ttyqueue.h', |
---|
| 781 | 'sys/ttydefaults.h', |
---|
| 782 | 'sys/ttydisc.h', |
---|
| 783 | 'sys/ttydevsw.h', |
---|
| 784 | 'sys/ttyhook.h', |
---|
| 785 | ] |
---|
| 786 | ) |
---|
| 787 | devUsbInputMouse.addSourceFiles( |
---|
| 788 | [ |
---|
| 789 | 'dev/usb/input/ums.c', |
---|
| 790 | ] |
---|
| 791 | ) |
---|
| 792 | |
---|
| 793 | devUsbMisc = Module('dev_usb_misc') |
---|
| 794 | devUsbMisc.addDependency(devUsb) |
---|
| 795 | devUsbMisc.addHeaderFiles( |
---|
| 796 | [ |
---|
| 797 | 'dev/usb/misc/udbp.h', |
---|
| 798 | ] |
---|
| 799 | ) |
---|
| 800 | devUsbMisc.addSourceFiles( |
---|
| 801 | [ |
---|
| 802 | 'dev/usb/misc/udbp.c', |
---|
| 803 | 'dev/usb/misc/ufm.c', |
---|
| 804 | ] |
---|
| 805 | ) |
---|
| 806 | |
---|
| 807 | devUsbNet = Module('dev_usb_net') |
---|
| 808 | devUsbNet.addDependency(devUsb) |
---|
| 809 | devUsbNet.addHeaderFiles( |
---|
| 810 | [ |
---|
| 811 | 'dev/mii/mii.h', |
---|
| 812 | 'dev/mii/miivar.h', |
---|
| 813 | 'net/bpf.h', |
---|
| 814 | 'net/ethernet.h', |
---|
| 815 | 'net/if_arp.h', |
---|
| 816 | 'net/if_dl.h', |
---|
| 817 | 'net/if.h', |
---|
| 818 | 'net/if_media.h', |
---|
| 819 | 'net/if_types.h', |
---|
| 820 | 'net/if_var.h', |
---|
| 821 | 'net/vnet.h', |
---|
| 822 | 'dev/usb/net/if_cdcereg.h', |
---|
| 823 | 'dev/usb/net/usb_ethernet.h', |
---|
| 824 | ] |
---|
| 825 | ) |
---|
| 826 | devUsbNet.addSourceFiles( |
---|
| 827 | [ |
---|
| 828 | 'dev/usb/net/if_cdce.c', |
---|
| 829 | 'dev/usb/net/usb_ethernet.c', |
---|
| 830 | ] |
---|
| 831 | ) |
---|
| 832 | |
---|
| 833 | devUsbQuirk = Module('dev_usb_quirk') |
---|
| 834 | devUsbQuirk.addDependency(devUsb) |
---|
| 835 | devUsbQuirk.addHeaderFiles( |
---|
| 836 | [ |
---|
| 837 | 'dev/usb/quirk/usb_quirk.h', |
---|
| 838 | ] |
---|
| 839 | ) |
---|
| 840 | devUsbQuirk.addSourceFiles( |
---|
| 841 | [ |
---|
| 842 | 'dev/usb/quirk/usb_quirk.c', |
---|
| 843 | ] |
---|
| 844 | ) |
---|
| 845 | |
---|
| 846 | devUsbSerial = Module('dev_usb_serial') |
---|
| 847 | devUsbSerial.addDependency(devUsb) |
---|
| 848 | devUsbSerial.addHeaderFiles( |
---|
| 849 | [ |
---|
| 850 | 'dev/usb/serial/uftdi_reg.h', |
---|
| 851 | 'dev/usb/serial/usb_serial.h', |
---|
| 852 | ] |
---|
| 853 | ) |
---|
| 854 | devUsbSerial.addSourceFiles( |
---|
| 855 | [ |
---|
| 856 | 'dev/usb/serial/u3g.c', |
---|
| 857 | 'dev/usb/serial/uark.c', |
---|
| 858 | 'dev/usb/serial/ubsa.c', |
---|
| 859 | 'dev/usb/serial/ubser.c', |
---|
| 860 | 'dev/usb/serial/uchcom.c', |
---|
| 861 | 'dev/usb/serial/ucycom.c', |
---|
| 862 | 'dev/usb/serial/ufoma.c', |
---|
| 863 | 'dev/usb/serial/uftdi.c', |
---|
| 864 | 'dev/usb/serial/ugensa.c', |
---|
| 865 | 'dev/usb/serial/uipaq.c', |
---|
| 866 | 'dev/usb/serial/ulpt.c', |
---|
| 867 | 'dev/usb/serial/umct.c', |
---|
| 868 | 'dev/usb/serial/umodem.c', |
---|
| 869 | 'dev/usb/serial/umoscom.c', |
---|
| 870 | 'dev/usb/serial/uplcom.c', |
---|
| 871 | 'dev/usb/serial/usb_serial.c', |
---|
| 872 | 'dev/usb/serial/uslcom.c', |
---|
| 873 | 'dev/usb/serial/uvisor.c', |
---|
| 874 | 'dev/usb/serial/uvscom.c', |
---|
| 875 | ] |
---|
| 876 | ) |
---|
| 877 | |
---|
| 878 | devUsbStorage = Module('dev_usb_storage') |
---|
| 879 | devUsbStorage.addDependency(devUsb) |
---|
| 880 | devUsbStorage.addSourceFiles( |
---|
| 881 | [ |
---|
| 882 | 'dev/usb/storage/umass.c', |
---|
| 883 | ] |
---|
| 884 | ) |
---|
| 885 | |
---|
| 886 | devUsbStorageAddOn = Module('dev_usb_storage_add_on') |
---|
| 887 | devUsbStorageAddOn.addDependency(devUsb) |
---|
| 888 | devUsbStorageAddOn.addHeaderFiles( |
---|
| 889 | [ |
---|
| 890 | 'dev/usb/storage/rio500_usb.h', |
---|
| 891 | ] |
---|
| 892 | ) |
---|
| 893 | devUsbStorageAddOn.addSourceFiles( |
---|
| 894 | [ |
---|
| 895 | 'dev/usb/storage/urio.c', |
---|
| 896 | 'dev/usb/storage/ustorage_fs.c', |
---|
| 897 | ] |
---|
| 898 | ) |
---|
| 899 | |
---|
| 900 | devUsbTemplate = Module('dev_usb_template') |
---|
| 901 | devUsbTemplate.addDependency(devUsb) |
---|
| 902 | devUsbTemplate.addHeaderFiles( |
---|
| 903 | [ |
---|
| 904 | 'dev/usb/template/usb_template.h', |
---|
| 905 | ] |
---|
| 906 | ) |
---|
| 907 | devUsbTemplate.addSourceFiles( |
---|
| 908 | [ |
---|
| 909 | 'dev/usb/template/usb_template.c', |
---|
| 910 | 'dev/usb/template/usb_template_cdce.c', |
---|
| 911 | 'dev/usb/template/usb_template_msc.c', |
---|
| 912 | 'dev/usb/template/usb_template_mtp.c', |
---|
| 913 | ] |
---|
| 914 | ) |
---|
| 915 | |
---|
| 916 | devUsbWlan = Module('dev_usb_wlan') |
---|
| 917 | devUsbWlan.addDependency(devUsb) |
---|
| 918 | devUsbWlan.addHeaderFiles( |
---|
| 919 | [ |
---|
| 920 | 'dev/usb/wlan/if_rumfw.h', |
---|
| 921 | 'dev/usb/wlan/if_rumreg.h', |
---|
| 922 | 'dev/usb/wlan/if_rumvar.h', |
---|
| 923 | 'dev/usb/wlan/if_uathreg.h', |
---|
| 924 | 'dev/usb/wlan/if_uathvar.h', |
---|
| 925 | 'dev/usb/wlan/if_upgtvar.h', |
---|
| 926 | 'dev/usb/wlan/if_uralreg.h', |
---|
| 927 | 'dev/usb/wlan/if_uralvar.h', |
---|
| 928 | 'dev/usb/wlan/if_zydfw.h', |
---|
| 929 | 'dev/usb/wlan/if_zydreg.h', |
---|
| 930 | ] |
---|
| 931 | ) |
---|
| 932 | devUsbWlan.addSourceFiles( |
---|
| 933 | [ |
---|
| 934 | 'dev/usb/wlan/if_rum.c', |
---|
| 935 | 'dev/usb/wlan/if_uath.c', |
---|
| 936 | 'dev/usb/wlan/if_upgt.c', |
---|
| 937 | 'dev/usb/wlan/if_ural.c', |
---|
| 938 | 'dev/usb/wlan/if_zyd.c', |
---|
| 939 | ] |
---|
| 940 | ) |
---|
| 941 | |
---|
| 942 | devPci = Module('dev_pci') |
---|
| 943 | devPci.addHeaderFiles( |
---|
| 944 | [ |
---|
| 945 | 'dev/pci/pcireg.h', |
---|
| 946 | 'dev/pci/pcivar.h', |
---|
| 947 | ] |
---|
| 948 | ) |
---|
| 949 | |
---|
| 950 | devUsbBase = Module('dev_usb_base') |
---|
| 951 | devUsbBase.addHeaderFiles( |
---|
| 952 | [ |
---|
| 953 | 'bsm/audit.h', |
---|
| 954 | 'bsm/audit_kevents.h', |
---|
| 955 | 'sys/acl.h', |
---|
| 956 | 'sys/bufobj.h', |
---|
| 957 | 'sys/_bus_dma.h', |
---|
| 958 | 'sys/bus_dma.h', |
---|
| 959 | 'sys/bus.h', |
---|
| 960 | 'sys/callout.h', |
---|
| 961 | 'sys/cdefs.h', |
---|
| 962 | 'sys/condvar.h', |
---|
| 963 | 'sys/conf.h', |
---|
| 964 | #'sys/cpuset.h', |
---|
| 965 | 'sys/ctype.h', |
---|
| 966 | 'sys/endian.h', |
---|
[1e8830f0] | 967 | 'sys/errno.h', |
---|
[294ae20] | 968 | 'sys/event.h', |
---|
| 969 | 'sys/eventhandler.h', |
---|
| 970 | 'sys/fcntl.h', |
---|
| 971 | 'sys/filedesc.h', |
---|
| 972 | 'sys/file.h', |
---|
| 973 | 'sys/filio.h', |
---|
| 974 | 'sys/ioccom.h', |
---|
| 975 | 'sys/_iovec.h', |
---|
| 976 | 'sys/kernel.h', |
---|
| 977 | 'sys/kobj.h', |
---|
| 978 | 'sys/kthread.h', |
---|
| 979 | 'sys/ktr.h', |
---|
| 980 | 'sys/libkern.h', |
---|
| 981 | 'sys/linker_set.h', |
---|
| 982 | 'sys/_lock.h', |
---|
| 983 | 'sys/lock.h', |
---|
| 984 | 'sys/_lockmgr.h', |
---|
| 985 | 'sys/lockmgr.h', |
---|
| 986 | 'sys/lock_profile.h', |
---|
| 987 | 'sys/lockstat.h', |
---|
| 988 | 'sys/mac.h', |
---|
| 989 | 'sys/malloc.h', |
---|
| 990 | 'sys/mbuf.h', |
---|
| 991 | 'sys/module.h', |
---|
| 992 | 'sys/mount.h', |
---|
| 993 | 'sys/_mutex.h', |
---|
| 994 | 'sys/mutex.h', |
---|
| 995 | 'sys/_null.h', |
---|
| 996 | 'sys/osd.h', |
---|
| 997 | 'sys/param.h', |
---|
| 998 | 'sys/pcpu.h', |
---|
| 999 | 'sys/poll.h', |
---|
| 1000 | 'sys/priority.h', |
---|
| 1001 | 'sys/priv.h', |
---|
| 1002 | 'sys/proc.h', |
---|
| 1003 | 'sys/queue.h', |
---|
| 1004 | 'sys/refcount.h', |
---|
| 1005 | 'sys/resource.h', |
---|
[1e8830f0] | 1006 | 'sys/resourcevar.h', |
---|
[294ae20] | 1007 | 'sys/rtprio.h', |
---|
| 1008 | 'sys/runq.h', |
---|
| 1009 | 'sys/_rwlock.h', |
---|
[1e8830f0] | 1010 | 'sys/rwlock.h', |
---|
[294ae20] | 1011 | 'sys/_semaphore.h', |
---|
| 1012 | 'sys/selinfo.h', |
---|
| 1013 | 'sys/sigio.h', |
---|
| 1014 | 'sys/signal.h', |
---|
| 1015 | 'sys/signalvar.h', |
---|
| 1016 | 'sys/_sigset.h', |
---|
[1e8830f0] | 1017 | #'sys/sleepqueue.h', |
---|
[294ae20] | 1018 | 'sys/socket.h', |
---|
| 1019 | 'sys/stddef.h', |
---|
| 1020 | 'sys/stdint.h', |
---|
| 1021 | 'sys/_sx.h', |
---|
| 1022 | 'sys/sx.h', |
---|
| 1023 | 'sys/sysctl.h', |
---|
| 1024 | 'sys/systm.h', |
---|
| 1025 | 'sys/ttycom.h', |
---|
| 1026 | 'sys/_types.h', |
---|
| 1027 | 'sys/types.h', |
---|
| 1028 | 'sys/ucontext.h', |
---|
| 1029 | 'sys/ucred.h', |
---|
| 1030 | 'sys/uio.h', |
---|
[3f7b966] | 1031 | 'sys/aio.h', |
---|
[294ae20] | 1032 | 'sys/unistd.h', |
---|
[1e8830f0] | 1033 | #'sys/vmmeter.h', |
---|
| 1034 | #'sys/vnode.h', |
---|
[294ae20] | 1035 | 'sys/rman.h', |
---|
| 1036 | 'sys/reboot.h', |
---|
| 1037 | 'sys/bitstring.h', |
---|
| 1038 | 'sys/linker.h', |
---|
[1e8830f0] | 1039 | 'vm/uma.h', |
---|
| 1040 | 'vm/uma_int.h', |
---|
| 1041 | 'vm/uma_dbg.h', |
---|
[a52104c] | 1042 | 'vm/vm.h', |
---|
[1e8830f0] | 1043 | #'vm/vm_page.h', |
---|
[294ae20] | 1044 | 'fs/devfs/devfs_int.h', |
---|
| 1045 | ] |
---|
| 1046 | ) |
---|
| 1047 | devUsbBase.addSourceFiles( |
---|
| 1048 | [ |
---|
| 1049 | 'kern/init_main.c', |
---|
[1e8830f0] | 1050 | #'kern/kern_linker.c', |
---|
[27ae2dfc] | 1051 | 'kern/kern_mib.c', |
---|
[1e8830f0] | 1052 | 'kern/kern_mbuf.c', |
---|
[294ae20] | 1053 | 'kern/kern_module.c', |
---|
| 1054 | 'kern/kern_sysctl.c', |
---|
| 1055 | 'kern/subr_bus.c', |
---|
[1e8830f0] | 1056 | 'kern/subr_kobj.c', |
---|
| 1057 | #'kern/subr_sleepqueue.c', |
---|
| 1058 | 'kern/uipc_mbuf.c', |
---|
| 1059 | 'kern/uipc_mbuf2.c', |
---|
| 1060 | 'kern/uipc_socket.c', |
---|
[3f7b966] | 1061 | 'kern/uipc_sockbuf.c', |
---|
[471e6f9] | 1062 | 'kern/uipc_domain.c', |
---|
[294ae20] | 1063 | #'kern/uipc_syscalls.c', |
---|
[1e8830f0] | 1064 | #'vm/uma_core.c', |
---|
[294ae20] | 1065 | ] |
---|
| 1066 | ) |
---|
| 1067 | |
---|
| 1068 | cam = Module('cam') |
---|
| 1069 | cam.addHeaderFiles( |
---|
| 1070 | [ |
---|
| 1071 | 'sys/ata.h', |
---|
| 1072 | 'cam/cam.h', |
---|
| 1073 | 'cam/cam_ccb.h', |
---|
| 1074 | 'cam/cam_sim.h', |
---|
| 1075 | 'cam/cam_xpt_sim.h', |
---|
| 1076 | 'cam/scsi/scsi_all.h', |
---|
| 1077 | 'cam/scsi/scsi_da.h', |
---|
| 1078 | 'cam/ata/ata_all.h', |
---|
| 1079 | 'cam/cam_periph.h', |
---|
| 1080 | 'cam/cam_debug.h', |
---|
| 1081 | 'cam/cam_xpt.h', |
---|
| 1082 | ] |
---|
| 1083 | ) |
---|
| 1084 | cam.addSourceFiles( |
---|
| 1085 | [ |
---|
| 1086 | 'cam/cam.c', |
---|
| 1087 | 'cam/scsi/scsi_all.c', |
---|
| 1088 | ] |
---|
| 1089 | ) |
---|
| 1090 | |
---|
| 1091 | devNet = Module('dev_net') |
---|
| 1092 | devNet.addHeaderFiles( |
---|
[1e8830f0] | 1093 | [ |
---|
| 1094 | 'dev/mii/mii.h', |
---|
| 1095 | 'dev/mii/miivar.h', |
---|
[5ad09a1] | 1096 | 'dev/mii/brgphyreg.h', |
---|
[1e8830f0] | 1097 | 'dev/mii/icsphyreg.h', |
---|
[a52104c] | 1098 | 'dev/led/led.h', |
---|
[1e8830f0] | 1099 | 'net/bpf.h', |
---|
| 1100 | 'net/ethernet.h', |
---|
| 1101 | 'net/if_arp.h', |
---|
| 1102 | 'net/if_dl.h', |
---|
| 1103 | 'net/if.h', |
---|
| 1104 | 'net/if_media.h', |
---|
| 1105 | 'net/if_types.h', |
---|
| 1106 | 'net/if_var.h', |
---|
| 1107 | 'net/vnet.h', |
---|
| 1108 | ] |
---|
[294ae20] | 1109 | ) |
---|
| 1110 | devNet.addSourceFiles( |
---|
[1e8830f0] | 1111 | [ |
---|
| 1112 | 'dev/mii/mii.c', |
---|
| 1113 | 'dev/mii/mii_physubr.c', |
---|
| 1114 | 'dev/mii/icsphy.c', |
---|
[5ad09a1] | 1115 | 'dev/mii/brgphy.c', |
---|
[1e8830f0] | 1116 | ] |
---|
[294ae20] | 1117 | ) |
---|
| 1118 | |
---|
[cd07c7a] | 1119 | devNic = Module('dev_nic') |
---|
| 1120 | devNic.addHeaderFiles( |
---|
| 1121 | [ |
---|
| 1122 | # 'sys/taskqueue.h', |
---|
[c613894] | 1123 | 'sys/pciio.h', |
---|
[60cf5cd] | 1124 | 'dev/random/randomdev_soft.h', |
---|
[251480e] | 1125 | 'sys/eventvar.h', |
---|
[cd07c7a] | 1126 | ] |
---|
| 1127 | ) |
---|
| 1128 | devNic.addSourceFiles( |
---|
| 1129 | [ |
---|
| 1130 | # 'kern/subr_taskqueue.c', |
---|
[e4b9989] | 1131 | 'kern/subr_hints.c', |
---|
[60cf5cd] | 1132 | 'dev/random/harvest.c', |
---|
| 1133 | 'libkern/random.c', |
---|
[f6289b3] | 1134 | 'libkern/arc4random.c', |
---|
[ce0b530] | 1135 | 'kern/subr_pcpu.c', |
---|
[7730088] | 1136 | 'kern/subr_sbuf.c', |
---|
[2385258] | 1137 | 'kern/subr_rman.c', |
---|
[8960780] | 1138 | 'libkern/inet_ntoa.c', |
---|
[d75b748] | 1139 | 'kern/kern_prot.c', |
---|
[b2e05ef] | 1140 | 'kern/kern_time.c', |
---|
[3c05977] | 1141 | 'kern/kern_event.c', |
---|
[39292ce] | 1142 | 'netinet/tcp_hostcache.c', |
---|
[c613894] | 1143 | 'dev/pci/pci.c', |
---|
[508e3df] | 1144 | 'kern/uipc_accf.c', |
---|
[459afb1] | 1145 | 'kern/kern_ntptime.c', |
---|
[cd07c7a] | 1146 | ] |
---|
| 1147 | ) |
---|
| 1148 | |
---|
[3d7f69c] | 1149 | devNic_re = Module('dev_nic_re') |
---|
| 1150 | devNic_re.addHeaderFiles( |
---|
| 1151 | [ |
---|
| 1152 | 'pci/if_rlreg.h', |
---|
| 1153 | ] |
---|
| 1154 | ) |
---|
| 1155 | devNic_re.addSourceFiles( |
---|
| 1156 | [ |
---|
| 1157 | 'dev/re/if_re.c', |
---|
| 1158 | ] |
---|
| 1159 | ) |
---|
| 1160 | |
---|
[f4e3138] | 1161 | devNic_fxp = Module('dev_nic_fxp') |
---|
| 1162 | devNic_fxp.addHeaderFiles( |
---|
| 1163 | [ |
---|
| 1164 | 'dev/fxp/if_fxpreg.h', |
---|
| 1165 | 'dev/fxp/if_fxpvar.h', |
---|
| 1166 | 'dev/fxp/rcvbundl.h', |
---|
| 1167 | ] |
---|
| 1168 | ) |
---|
| 1169 | devNic_fxp.addSourceFiles( |
---|
| 1170 | [ |
---|
| 1171 | 'dev/fxp/if_fxp.c', |
---|
| 1172 | ] |
---|
| 1173 | ) |
---|
| 1174 | |
---|
[cd07c7a] | 1175 | devNic_e1000 = Module('dev_nic_e1000') |
---|
| 1176 | devNic_e1000.addHeaderFiles( |
---|
| 1177 | [ |
---|
| 1178 | 'dev/e1000/e1000_80003es2lan.h', |
---|
| 1179 | 'dev/e1000/e1000_82571.h', |
---|
| 1180 | 'dev/e1000/e1000_defines.h', |
---|
| 1181 | 'dev/e1000/e1000_mac.h', |
---|
| 1182 | 'dev/e1000/e1000_nvm.h', |
---|
| 1183 | 'dev/e1000/e1000_regs.h', |
---|
| 1184 | 'dev/e1000/if_igb.h', |
---|
| 1185 | 'dev/e1000/e1000_82541.h', |
---|
| 1186 | 'dev/e1000/e1000_82575.h', |
---|
| 1187 | 'dev/e1000/e1000_hw.h', |
---|
| 1188 | 'dev/e1000/e1000_manage.h', |
---|
| 1189 | 'dev/e1000/e1000_osdep.h', |
---|
| 1190 | 'dev/e1000/e1000_vf.h', |
---|
| 1191 | 'dev/e1000/if_lem.h', |
---|
| 1192 | 'dev/e1000/e1000_82543.h', |
---|
| 1193 | 'dev/e1000/e1000_api.h', |
---|
| 1194 | 'dev/e1000/e1000_ich8lan.h', |
---|
| 1195 | 'dev/e1000/e1000_mbx.h', |
---|
| 1196 | 'dev/e1000/e1000_phy.h', |
---|
| 1197 | 'dev/e1000/if_em.h', |
---|
| 1198 | ] |
---|
| 1199 | ) |
---|
| 1200 | devNic_e1000.addSourceFiles( |
---|
| 1201 | [ |
---|
| 1202 | 'dev/e1000/e1000_80003es2lan.c', |
---|
| 1203 | 'dev/e1000/e1000_82542.c', |
---|
| 1204 | 'dev/e1000/e1000_82575.c', |
---|
| 1205 | 'dev/e1000/e1000_mac.c', |
---|
| 1206 | 'dev/e1000/e1000_nvm.c', |
---|
| 1207 | 'dev/e1000/e1000_vf.c', |
---|
| 1208 | 'dev/e1000/if_lem.c', |
---|
| 1209 | 'dev/e1000/e1000_82540.c', |
---|
| 1210 | 'dev/e1000/e1000_82543.c', |
---|
| 1211 | 'dev/e1000/e1000_api.c', |
---|
| 1212 | 'dev/e1000/e1000_manage.c', |
---|
| 1213 | 'dev/e1000/e1000_osdep.c', |
---|
| 1214 | 'dev/e1000/if_em.c', |
---|
| 1215 | 'dev/e1000/e1000_82541.c', |
---|
| 1216 | 'dev/e1000/e1000_82571.c', |
---|
| 1217 | 'dev/e1000/e1000_ich8lan.c', |
---|
| 1218 | 'dev/e1000/e1000_mbx.c', |
---|
| 1219 | 'dev/e1000/e1000_phy.c', |
---|
| 1220 | 'dev/e1000/if_igb.c', |
---|
| 1221 | ] |
---|
| 1222 | ) |
---|
| 1223 | |
---|
[5ad09a1] | 1224 | # DEC Tulip aka Intel 21143 |
---|
| 1225 | devNic_dc = Module('dev_nic_dc') |
---|
| 1226 | devNic_dc.addHeaderFiles( |
---|
| 1227 | [ |
---|
| 1228 | 'dev/dc/if_dcreg.h', |
---|
| 1229 | ] |
---|
| 1230 | ) |
---|
| 1231 | devNic_dc.addSourceFiles( |
---|
| 1232 | [ |
---|
| 1233 | 'dev/dc/dcphy.c', |
---|
| 1234 | 'dev/dc/if_dc.c', |
---|
| 1235 | 'dev/dc/pnphy.c', |
---|
| 1236 | ] |
---|
| 1237 | ) |
---|
| 1238 | |
---|
| 1239 | # SMC9111x |
---|
| 1240 | devNic_smc = Module('dev_nic_smc') |
---|
| 1241 | devNic_smc.addHeaderFiles( |
---|
| 1242 | [ |
---|
| 1243 | 'dev/smc/if_smcreg.h', |
---|
| 1244 | 'dev/smc/if_smcvar.h', |
---|
| 1245 | ] |
---|
| 1246 | ) |
---|
| 1247 | devNic_smc.addSourceFiles( |
---|
| 1248 | [ |
---|
| 1249 | 'dev/smc/if_smc.c', |
---|
| 1250 | ] |
---|
| 1251 | ) |
---|
| 1252 | |
---|
| 1253 | # Crystal Semiconductor CS8900 |
---|
| 1254 | devNic_cs = Module('dev_nic_cs') |
---|
| 1255 | devNic_cs.addHeaderFiles( |
---|
| 1256 | [ |
---|
| 1257 | 'dev/cs/if_csreg.h', |
---|
| 1258 | 'dev/cs/if_csvar.h', |
---|
| 1259 | ] |
---|
| 1260 | ) |
---|
| 1261 | devNic_cs.addSourceFiles( |
---|
| 1262 | [ |
---|
| 1263 | 'dev/cs/if_cs.c', |
---|
| 1264 | 'dev/cs/if_cs_isa.c', |
---|
| 1265 | 'dev/cs/if_cs_pccard.c', |
---|
| 1266 | ] |
---|
| 1267 | ) |
---|
| 1268 | |
---|
| 1269 | # Broadcomm BCE, BFE, BGE - MII is intertwined |
---|
| 1270 | devNic_broadcomm = Module('dev_nic_broadcomm') |
---|
| 1271 | devNic_broadcomm.addHeaderFiles( |
---|
| 1272 | [ |
---|
| 1273 | 'dev/bce/if_bcefw.h', |
---|
| 1274 | 'dev/bce/if_bcereg.h', |
---|
| 1275 | 'dev/bfe/if_bfereg.h', |
---|
| 1276 | 'dev/bge/if_bgereg.h', |
---|
| 1277 | ] |
---|
| 1278 | ) |
---|
| 1279 | devNic_broadcomm.addSourceFiles( |
---|
| 1280 | [ |
---|
| 1281 | 'dev/bce/if_bce.c', |
---|
| 1282 | 'dev/bfe/if_bfe.c', |
---|
| 1283 | 'dev/bge/if_bge.c', |
---|
| 1284 | ] |
---|
| 1285 | ) |
---|
| 1286 | |
---|
[294ae20] | 1287 | netDeps = Module('netDeps') |
---|
| 1288 | netDeps.addHeaderFiles( |
---|
| 1289 | [ |
---|
[1e8830f0] | 1290 | 'security/mac/mac_framework.h', |
---|
| 1291 | 'sys/cpu.h', |
---|
[294ae20] | 1292 | 'sys/interrupt.h', |
---|
[1e8830f0] | 1293 | 'sys/fnv_hash.h', |
---|
[294ae20] | 1294 | 'sys/tree.h', |
---|
| 1295 | 'sys/buf_ring.h', |
---|
| 1296 | 'sys/rwlock.h', |
---|
| 1297 | 'sys/_rmlock.h', |
---|
| 1298 | 'sys/sockio.h', |
---|
| 1299 | 'sys/sdt.h', |
---|
| 1300 | 'sys/_task.h', |
---|
| 1301 | 'sys/sbuf.h', |
---|
[da162c8] | 1302 | 'sys/smp.h', |
---|
[294ae20] | 1303 | 'sys/syslog.h', |
---|
| 1304 | 'sys/jail.h', |
---|
[1e8830f0] | 1305 | 'sys/protosw.h', |
---|
[294ae20] | 1306 | 'sys/random.h', |
---|
| 1307 | 'sys/rmlock.h', |
---|
| 1308 | 'sys/hash.h', |
---|
[1e8830f0] | 1309 | #'sys/select.h', |
---|
[294ae20] | 1310 | 'sys/sf_buf.h', |
---|
| 1311 | 'sys/socketvar.h', |
---|
| 1312 | 'sys/sockbuf.h', |
---|
| 1313 | #'sys/sysproto.h', |
---|
| 1314 | 'sys/sockstate.h', |
---|
[1e8830f0] | 1315 | 'sys/sockopt.h', |
---|
| 1316 | 'sys/domain.h', |
---|
| 1317 | 'sys/time.h', |
---|
[294ae20] | 1318 | ] |
---|
| 1319 | ) |
---|
| 1320 | |
---|
| 1321 | net = Module('net') |
---|
| 1322 | net.addHeaderFiles( |
---|
| 1323 | [ |
---|
| 1324 | 'net/bpf_buffer.h', |
---|
| 1325 | 'net/bpfdesc.h', |
---|
| 1326 | 'net/bpf.h', |
---|
| 1327 | 'net/bpf_jitter.h', |
---|
| 1328 | 'net/bpf_zerocopy.h', |
---|
| 1329 | 'net/bridgestp.h', |
---|
| 1330 | 'net/ethernet.h', |
---|
| 1331 | 'net/fddi.h', |
---|
| 1332 | 'net/firewire.h', |
---|
| 1333 | 'net/flowtable.h', |
---|
| 1334 | 'net/ieee8023ad_lacp.h', |
---|
| 1335 | 'net/if_arc.h', |
---|
| 1336 | 'net/if_arp.h', |
---|
| 1337 | 'net/if_atm.h', |
---|
| 1338 | 'net/if_bridgevar.h', |
---|
| 1339 | 'net/if_clone.h', |
---|
| 1340 | 'net/if_dl.h', |
---|
| 1341 | 'net/if_enc.h', |
---|
| 1342 | 'net/if_gif.h', |
---|
| 1343 | 'net/if_gre.h', |
---|
| 1344 | 'net/if.h', |
---|
| 1345 | 'net/if_lagg.h', |
---|
| 1346 | 'net/if_llatbl.h', |
---|
| 1347 | 'net/if_llc.h', |
---|
| 1348 | 'net/if_media.h', |
---|
| 1349 | 'net/if_mib.h', |
---|
| 1350 | 'net/if_sppp.h', |
---|
| 1351 | 'net/if_stf.h', |
---|
| 1352 | 'net/if_tap.h', |
---|
| 1353 | 'net/if_tapvar.h', |
---|
| 1354 | 'net/if_tun.h', |
---|
| 1355 | 'net/if_types.h', |
---|
| 1356 | 'net/if_var.h', |
---|
| 1357 | 'net/if_vlan_var.h', |
---|
| 1358 | 'net/iso88025.h', |
---|
| 1359 | 'net/netisr.h', |
---|
| 1360 | 'net/pfil.h', |
---|
| 1361 | 'net/pfkeyv2.h', |
---|
| 1362 | 'net/ppp_defs.h', |
---|
| 1363 | 'net/radix.h', |
---|
| 1364 | 'net/radix_mpath.h', |
---|
| 1365 | 'net/raw_cb.h', |
---|
| 1366 | 'net/route.h', |
---|
| 1367 | 'net/slcompress.h', |
---|
| 1368 | 'net/vnet.h', |
---|
| 1369 | 'net/zlib.h', |
---|
[fcce4d2] | 1370 | 'sys/timepps.h', |
---|
| 1371 | 'sys/timetc.h', |
---|
| 1372 | 'sys/timex.h', |
---|
[294ae20] | 1373 | ] |
---|
| 1374 | ) |
---|
| 1375 | net.addSourceFiles( |
---|
| 1376 | [ |
---|
[3939378] | 1377 | 'kern/subr_eventhandler.c', |
---|
[9df9609] | 1378 | 'kern/kern_subr.c', |
---|
[fcce4d2] | 1379 | 'kern/kern_tc.c', |
---|
[c4117bb] | 1380 | 'libkern/fls.c', |
---|
[294ae20] | 1381 | 'net/bridgestp.c', |
---|
| 1382 | 'net/ieee8023ad_lacp.c', |
---|
| 1383 | 'net/if_atmsubr.c', |
---|
| 1384 | 'net/if.c', |
---|
| 1385 | 'net/if_clone.c', |
---|
| 1386 | 'net/if_dead.c', |
---|
| 1387 | 'net/if_disc.c', |
---|
| 1388 | 'net/if_edsc.c', |
---|
| 1389 | 'net/if_ef.c', |
---|
| 1390 | 'net/if_enc.c', |
---|
| 1391 | 'net/if_epair.c', |
---|
| 1392 | 'net/if_faith.c', |
---|
| 1393 | 'net/if_fddisubr.c', |
---|
| 1394 | 'net/if_fwsubr.c', |
---|
| 1395 | 'net/if_gif.c', |
---|
| 1396 | 'net/if_gre.c', |
---|
| 1397 | 'net/if_iso88025subr.c', |
---|
| 1398 | 'net/if_lagg.c', |
---|
| 1399 | 'net/if_llatbl.c', |
---|
| 1400 | 'net/if_loop.c', |
---|
| 1401 | 'net/if_media.c', |
---|
| 1402 | 'net/if_mib.c', |
---|
| 1403 | 'net/if_spppfr.c', |
---|
| 1404 | 'net/if_spppsubr.c', |
---|
| 1405 | 'net/if_stf.c', |
---|
| 1406 | 'net/if_tap.c', |
---|
| 1407 | 'net/if_tun.c', |
---|
| 1408 | 'net/if_vlan.c', |
---|
| 1409 | 'net/pfil.c', |
---|
| 1410 | 'net/radix.c', |
---|
| 1411 | 'net/radix_mpath.c', |
---|
| 1412 | 'net/raw_cb.c', |
---|
| 1413 | 'net/raw_usrreq.c', |
---|
| 1414 | 'net/route.c', |
---|
| 1415 | 'net/rtsock.c', |
---|
| 1416 | 'net/slcompress.c', |
---|
| 1417 | 'net/zlib.c', |
---|
| 1418 | 'net/bpf_buffer.c', |
---|
| 1419 | 'net/bpf.c', |
---|
| 1420 | 'net/bpf_filter.c', |
---|
| 1421 | 'net/bpf_jitter.c', |
---|
| 1422 | 'net/if_arcsubr.c', |
---|
| 1423 | 'net/if_bridge.c', |
---|
| 1424 | 'net/if_ethersubr.c', |
---|
| 1425 | 'net/netisr.c', |
---|
| 1426 | ] |
---|
| 1427 | ) |
---|
| 1428 | |
---|
| 1429 | netinet = Module('netinet') |
---|
| 1430 | netinet.addHeaderFiles( |
---|
| 1431 | [ |
---|
| 1432 | 'netinet/icmp6.h', |
---|
| 1433 | 'netinet/icmp_var.h', |
---|
| 1434 | 'netinet/if_atm.h', |
---|
| 1435 | 'netinet/if_ether.h', |
---|
| 1436 | 'netinet/igmp.h', |
---|
| 1437 | 'netinet/igmp_var.h', |
---|
| 1438 | 'netinet/in_gif.h', |
---|
| 1439 | 'netinet/in.h', |
---|
| 1440 | 'netinet/in_pcb.h', |
---|
| 1441 | 'netinet/in_systm.h', |
---|
| 1442 | 'netinet/in_var.h', |
---|
| 1443 | 'netinet/ip6.h', |
---|
| 1444 | 'netinet/ip_carp.h', |
---|
| 1445 | 'netinet/ip_divert.h', |
---|
| 1446 | 'netinet/ip_dummynet.h', |
---|
| 1447 | 'netinet/ip_ecn.h', |
---|
| 1448 | 'netinet/ip_encap.h', |
---|
| 1449 | 'netinet/ip_fw.h', |
---|
| 1450 | 'netinet/ip_gre.h', |
---|
| 1451 | 'netinet/ip.h', |
---|
| 1452 | 'netinet/ip_icmp.h', |
---|
| 1453 | 'netinet/ip_ipsec.h', |
---|
| 1454 | 'netinet/ip_mroute.h', |
---|
| 1455 | 'netinet/ip_options.h', |
---|
| 1456 | 'netinet/ip_var.h', |
---|
| 1457 | 'netinet/ipfw/ip_dn_private.h', |
---|
| 1458 | 'netinet/ipfw/ip_fw_private.h', |
---|
| 1459 | 'netinet/ipfw/dn_sched.h', |
---|
| 1460 | 'netinet/ipfw/dn_heap.h', |
---|
| 1461 | 'netinet/pim.h', |
---|
| 1462 | 'netinet/pim_var.h', |
---|
| 1463 | 'netinet/sctp_asconf.h', |
---|
| 1464 | 'netinet/sctp_auth.h', |
---|
| 1465 | 'netinet/sctp_bsd_addr.h', |
---|
| 1466 | 'netinet/sctp_cc_functions.h', |
---|
| 1467 | 'netinet/sctp_constants.h', |
---|
| 1468 | 'netinet/sctp_crc32.h', |
---|
| 1469 | 'netinet/sctp.h', |
---|
| 1470 | 'netinet/sctp_header.h', |
---|
| 1471 | 'netinet/sctp_indata.h', |
---|
| 1472 | 'netinet/sctp_input.h', |
---|
| 1473 | 'netinet/sctp_lock_bsd.h', |
---|
| 1474 | 'netinet/sctp_os_bsd.h', |
---|
| 1475 | 'netinet/sctp_os.h', |
---|
| 1476 | 'netinet/sctp_output.h', |
---|
| 1477 | 'netinet/sctp_pcb.h', |
---|
| 1478 | 'netinet/sctp_peeloff.h', |
---|
| 1479 | 'netinet/sctp_structs.h', |
---|
| 1480 | 'netinet/sctp_sysctl.h', |
---|
| 1481 | 'netinet/sctp_timer.h', |
---|
| 1482 | 'netinet/sctp_uio.h', |
---|
| 1483 | 'netinet/sctputil.h', |
---|
| 1484 | 'netinet/sctp_var.h', |
---|
| 1485 | 'netinet/tcp_debug.h', |
---|
| 1486 | 'netinet/tcp_fsm.h', |
---|
| 1487 | 'netinet/tcp.h', |
---|
[1e8830f0] | 1488 | 'netinet/tcp_hostcache.h', |
---|
[294ae20] | 1489 | 'netinet/tcpip.h', |
---|
| 1490 | 'netinet/tcp_lro.h', |
---|
| 1491 | 'netinet/tcp_offload.h', |
---|
| 1492 | 'netinet/tcp_seq.h', |
---|
| 1493 | 'netinet/tcp_syncache.h', |
---|
| 1494 | 'netinet/tcp_timer.h', |
---|
| 1495 | 'netinet/tcp_var.h', |
---|
| 1496 | 'netinet/toedev.h', |
---|
| 1497 | 'netinet/udp.h', |
---|
| 1498 | 'netinet/udp_var.h', |
---|
| 1499 | 'netinet/libalias/alias_local.h', |
---|
| 1500 | 'netinet/libalias/alias.h', |
---|
| 1501 | 'netinet/libalias/alias_mod.h', |
---|
| 1502 | 'netinet/libalias/alias_sctp.h', |
---|
| 1503 | ] |
---|
| 1504 | ) |
---|
[9df9609] | 1505 | # in_cksum.c is architecture dependent |
---|
[294ae20] | 1506 | netinet.addSourceFiles( |
---|
| 1507 | [ |
---|
| 1508 | 'netinet/accf_data.c', |
---|
| 1509 | 'netinet/accf_dns.c', |
---|
| 1510 | 'netinet/accf_http.c', |
---|
| 1511 | 'netinet/if_atm.c', |
---|
| 1512 | 'netinet/if_ether.c', |
---|
| 1513 | 'netinet/igmp.c', |
---|
| 1514 | 'netinet/in.c', |
---|
| 1515 | 'netinet/in_gif.c', |
---|
| 1516 | 'netinet/in_mcast.c', |
---|
| 1517 | 'netinet/in_pcb.c', |
---|
| 1518 | 'netinet/in_proto.c', |
---|
| 1519 | 'netinet/in_rmx.c', |
---|
| 1520 | 'netinet/ip_carp.c', |
---|
| 1521 | 'netinet/ip_divert.c', |
---|
| 1522 | 'netinet/ip_ecn.c', |
---|
| 1523 | 'netinet/ip_encap.c', |
---|
| 1524 | 'netinet/ip_fastfwd.c', |
---|
| 1525 | 'netinet/ip_gre.c', |
---|
| 1526 | 'netinet/ip_icmp.c', |
---|
| 1527 | 'netinet/ip_id.c', |
---|
| 1528 | 'netinet/ip_input.c', |
---|
| 1529 | 'netinet/ip_ipsec.c', |
---|
| 1530 | 'netinet/ip_mroute.c', |
---|
| 1531 | 'netinet/ip_options.c', |
---|
| 1532 | 'netinet/ip_output.c', |
---|
| 1533 | 'netinet/raw_ip.c', |
---|
| 1534 | 'netinet/sctp_asconf.c', |
---|
| 1535 | 'netinet/sctp_auth.c', |
---|
| 1536 | 'netinet/sctp_bsd_addr.c', |
---|
| 1537 | 'netinet/sctp_cc_functions.c', |
---|
| 1538 | 'netinet/sctp_crc32.c', |
---|
| 1539 | 'netinet/sctp_indata.c', |
---|
| 1540 | 'netinet/sctp_input.c', |
---|
| 1541 | 'netinet/sctp_output.c', |
---|
| 1542 | 'netinet/sctp_pcb.c', |
---|
| 1543 | 'netinet/sctp_peeloff.c', |
---|
| 1544 | 'netinet/sctp_sysctl.c', |
---|
| 1545 | 'netinet/sctp_timer.c', |
---|
| 1546 | 'netinet/sctp_usrreq.c', |
---|
| 1547 | 'netinet/sctputil.c', |
---|
| 1548 | 'netinet/tcp_debug.c', |
---|
[1e8830f0] | 1549 | #'netinet/tcp_hostcache.c', |
---|
[294ae20] | 1550 | 'netinet/tcp_input.c', |
---|
| 1551 | 'netinet/tcp_lro.c', |
---|
| 1552 | 'netinet/tcp_offload.c', |
---|
| 1553 | 'netinet/tcp_output.c', |
---|
| 1554 | 'netinet/tcp_reass.c', |
---|
| 1555 | 'netinet/tcp_sack.c', |
---|
| 1556 | 'netinet/tcp_subr.c', |
---|
| 1557 | 'netinet/tcp_syncache.c', |
---|
| 1558 | 'netinet/tcp_timer.c', |
---|
| 1559 | 'netinet/tcp_timewait.c', |
---|
| 1560 | 'netinet/tcp_usrreq.c', |
---|
| 1561 | 'netinet/udp_usrreq.c', |
---|
| 1562 | 'netinet/ipfw/dn_sched_fifo.c', |
---|
| 1563 | 'netinet/ipfw/dn_sched_rr.c', |
---|
| 1564 | 'netinet/ipfw/ip_fw_log.c', |
---|
| 1565 | 'netinet/ipfw/dn_sched_qfq.c', |
---|
| 1566 | 'netinet/ipfw/dn_sched_prio.c', |
---|
[1e8830f0] | 1567 | #'netinet/ipfw/ip_fw_dynamic.c', |
---|
[294ae20] | 1568 | 'netinet/ipfw/ip_dn_glue.c', |
---|
| 1569 | 'netinet/ipfw/ip_fw2.c', |
---|
| 1570 | 'netinet/ipfw/dn_heap.c', |
---|
| 1571 | 'netinet/ipfw/ip_dummynet.c', |
---|
| 1572 | 'netinet/ipfw/ip_fw_sockopt.c', |
---|
| 1573 | 'netinet/ipfw/dn_sched_wf2q.c', |
---|
| 1574 | 'netinet/ipfw/ip_fw_nat.c', |
---|
| 1575 | 'netinet/ipfw/ip_fw_pfil.c', |
---|
| 1576 | 'netinet/ipfw/ip_dn_io.c', |
---|
| 1577 | 'netinet/ipfw/ip_fw_table.c', |
---|
| 1578 | 'netinet/libalias/alias_dummy.c', |
---|
| 1579 | 'netinet/libalias/alias_pptp.c', |
---|
| 1580 | 'netinet/libalias/alias_smedia.c', |
---|
| 1581 | 'netinet/libalias/alias_mod.c', |
---|
| 1582 | 'netinet/libalias/alias_cuseeme.c', |
---|
| 1583 | 'netinet/libalias/alias_nbt.c', |
---|
| 1584 | 'netinet/libalias/alias_irc.c', |
---|
| 1585 | 'netinet/libalias/alias_util.c', |
---|
| 1586 | 'netinet/libalias/alias_db.c', |
---|
| 1587 | 'netinet/libalias/alias_ftp.c', |
---|
| 1588 | 'netinet/libalias/alias_proxy.c', |
---|
| 1589 | 'netinet/libalias/alias.c', |
---|
| 1590 | 'netinet/libalias/alias_skinny.c', |
---|
| 1591 | 'netinet/libalias/alias_sctp.c', |
---|
| 1592 | ] |
---|
| 1593 | ) |
---|
| 1594 | |
---|
| 1595 | netinet6 = Module('netinet6') |
---|
| 1596 | netinet6.addHeaderFiles( |
---|
| 1597 | [ |
---|
| 1598 | 'netinet6/icmp6.h', |
---|
| 1599 | 'netinet6/in6_gif.h', |
---|
| 1600 | 'netinet6/in6.h', |
---|
| 1601 | 'netinet6/in6_ifattach.h', |
---|
| 1602 | 'netinet6/in6_pcb.h', |
---|
| 1603 | 'netinet6/in6_var.h', |
---|
| 1604 | 'netinet6/ip6_ecn.h', |
---|
| 1605 | 'netinet6/ip6.h', |
---|
| 1606 | 'netinet6/ip6_ipsec.h', |
---|
| 1607 | 'netinet6/ip6_mroute.h', |
---|
| 1608 | 'netinet6/ip6protosw.h', |
---|
| 1609 | 'netinet6/ip6_var.h', |
---|
| 1610 | 'netinet6/mld6.h', |
---|
| 1611 | 'netinet6/mld6_var.h', |
---|
| 1612 | 'netinet6/nd6.h', |
---|
| 1613 | 'netinet6/pim6.h', |
---|
| 1614 | 'netinet6/pim6_var.h', |
---|
| 1615 | 'netinet6/raw_ip6.h', |
---|
| 1616 | 'netinet6/scope6_var.h', |
---|
| 1617 | 'netinet6/sctp6_var.h', |
---|
| 1618 | 'netinet6/tcp6_var.h', |
---|
| 1619 | 'netinet6/udp6_var.h', |
---|
| 1620 | ] |
---|
| 1621 | ) |
---|
| 1622 | netinet6.addSourceFiles( |
---|
| 1623 | [ |
---|
| 1624 | 'netinet6/dest6.c', |
---|
| 1625 | 'netinet6/frag6.c', |
---|
| 1626 | 'netinet6/icmp6.c', |
---|
| 1627 | 'netinet6/in6.c', |
---|
| 1628 | 'netinet6/in6_cksum.c', |
---|
| 1629 | 'netinet6/in6_gif.c', |
---|
| 1630 | 'netinet6/in6_ifattach.c', |
---|
| 1631 | 'netinet6/in6_mcast.c', |
---|
| 1632 | 'netinet6/in6_pcb.c', |
---|
| 1633 | 'netinet6/in6_proto.c', |
---|
| 1634 | 'netinet6/in6_rmx.c', |
---|
| 1635 | 'netinet6/in6_src.c', |
---|
| 1636 | 'netinet6/ip6_forward.c', |
---|
| 1637 | 'netinet6/ip6_id.c', |
---|
| 1638 | 'netinet6/ip6_input.c', |
---|
| 1639 | 'netinet6/ip6_ipsec.c', |
---|
| 1640 | 'netinet6/ip6_mroute.c', |
---|
| 1641 | 'netinet6/ip6_output.c', |
---|
| 1642 | 'netinet6/mld6.c', |
---|
| 1643 | 'netinet6/nd6.c', |
---|
| 1644 | 'netinet6/nd6_nbr.c', |
---|
| 1645 | 'netinet6/nd6_rtr.c', |
---|
| 1646 | 'netinet6/raw_ip6.c', |
---|
| 1647 | 'netinet6/route6.c', |
---|
| 1648 | 'netinet6/scope6.c', |
---|
| 1649 | 'netinet6/sctp6_usrreq.c', |
---|
| 1650 | 'netinet6/udp6_usrreq.c', |
---|
| 1651 | ] |
---|
| 1652 | ) |
---|
| 1653 | |
---|
| 1654 | netipsec = Module('netipsec') |
---|
| 1655 | netipsec.addHeaderFiles( |
---|
| 1656 | [ |
---|
| 1657 | 'netipsec/ah.h', |
---|
| 1658 | 'netipsec/ah_var.h', |
---|
| 1659 | 'netipsec/esp.h', |
---|
| 1660 | 'netipsec/esp_var.h', |
---|
| 1661 | 'netipsec/ipcomp.h', |
---|
| 1662 | 'netipsec/ipcomp_var.h', |
---|
| 1663 | 'netipsec/ipip_var.h', |
---|
| 1664 | 'netipsec/ipsec6.h', |
---|
| 1665 | 'netipsec/ipsec.h', |
---|
| 1666 | 'netipsec/keydb.h', |
---|
| 1667 | 'netipsec/key_debug.h', |
---|
| 1668 | 'netipsec/key.h', |
---|
| 1669 | 'netipsec/keysock.h', |
---|
| 1670 | 'netipsec/key_var.h', |
---|
| 1671 | 'netipsec/xform.h', |
---|
| 1672 | ] |
---|
| 1673 | ) |
---|
| 1674 | netipsec.addSourceFiles( |
---|
| 1675 | [ |
---|
[0d436c7] | 1676 | 'netipsec/ipsec.c', |
---|
[294ae20] | 1677 | 'netipsec/ipsec_input.c', |
---|
| 1678 | 'netipsec/ipsec_mbuf.c', |
---|
| 1679 | 'netipsec/ipsec_output.c', |
---|
| 1680 | 'netipsec/key.c', |
---|
| 1681 | 'netipsec/key_debug.c', |
---|
| 1682 | 'netipsec/keysock.c', |
---|
| 1683 | 'netipsec/xform_ah.c', |
---|
| 1684 | 'netipsec/xform_esp.c', |
---|
| 1685 | 'netipsec/xform_ipcomp.c', |
---|
| 1686 | 'netipsec/xform_ipip.c', |
---|
| 1687 | 'netipsec/xform_tcp.c', |
---|
| 1688 | ] |
---|
| 1689 | ) |
---|
| 1690 | |
---|
| 1691 | net80211 = Module('net80211') |
---|
| 1692 | net80211.addHeaderFiles( |
---|
| 1693 | [ |
---|
| 1694 | 'net80211/ieee80211_action.h', |
---|
| 1695 | 'net80211/ieee80211_adhoc.h', |
---|
| 1696 | 'net80211/ieee80211_ageq.h', |
---|
| 1697 | 'net80211/ieee80211_amrr.h', |
---|
| 1698 | 'net80211/ieee80211_crypto.h', |
---|
| 1699 | 'net80211/ieee80211_dfs.h', |
---|
| 1700 | 'net80211/ieee80211_freebsd.h', |
---|
| 1701 | 'net80211/_ieee80211.h', |
---|
| 1702 | 'net80211/ieee80211.h', |
---|
| 1703 | 'net80211/ieee80211_hostap.h', |
---|
| 1704 | 'net80211/ieee80211_ht.h', |
---|
| 1705 | 'net80211/ieee80211_input.h', |
---|
| 1706 | 'net80211/ieee80211_ioctl.h', |
---|
| 1707 | 'net80211/ieee80211_mesh.h', |
---|
| 1708 | 'net80211/ieee80211_monitor.h', |
---|
| 1709 | 'net80211/ieee80211_node.h', |
---|
| 1710 | 'net80211/ieee80211_phy.h', |
---|
| 1711 | 'net80211/ieee80211_power.h', |
---|
| 1712 | 'net80211/ieee80211_proto.h', |
---|
| 1713 | 'net80211/ieee80211_radiotap.h', |
---|
| 1714 | 'net80211/ieee80211_ratectl.h', |
---|
| 1715 | 'net80211/ieee80211_regdomain.h', |
---|
| 1716 | 'net80211/ieee80211_rssadapt.h', |
---|
| 1717 | 'net80211/ieee80211_scan.h', |
---|
| 1718 | 'net80211/ieee80211_sta.h', |
---|
| 1719 | 'net80211/ieee80211_superg.h', |
---|
| 1720 | 'net80211/ieee80211_tdma.h', |
---|
| 1721 | 'net80211/ieee80211_var.h', |
---|
| 1722 | 'net80211/ieee80211_wds.h', |
---|
| 1723 | ] |
---|
| 1724 | ) |
---|
| 1725 | netipsec.addSourceFiles( |
---|
| 1726 | [ |
---|
| 1727 | 'net80211/ieee80211_acl.c', |
---|
| 1728 | 'net80211/ieee80211_action.c', |
---|
| 1729 | 'net80211/ieee80211_adhoc.c', |
---|
| 1730 | 'net80211/ieee80211_ageq.c', |
---|
| 1731 | 'net80211/ieee80211_amrr.c', |
---|
| 1732 | 'net80211/ieee80211.c', |
---|
| 1733 | 'net80211/ieee80211_crypto.c', |
---|
| 1734 | 'net80211/ieee80211_crypto_ccmp.c', |
---|
| 1735 | 'net80211/ieee80211_crypto_none.c', |
---|
| 1736 | 'net80211/ieee80211_crypto_tkip.c', |
---|
| 1737 | 'net80211/ieee80211_crypto_wep.c', |
---|
| 1738 | 'net80211/ieee80211_ddb.c', |
---|
| 1739 | 'net80211/ieee80211_dfs.c', |
---|
| 1740 | 'net80211/ieee80211_freebsd.c', |
---|
| 1741 | 'net80211/ieee80211_hostap.c', |
---|
| 1742 | 'net80211/ieee80211_ht.c', |
---|
| 1743 | 'net80211/ieee80211_hwmp.c', |
---|
| 1744 | 'net80211/ieee80211_input.c', |
---|
| 1745 | 'net80211/ieee80211_ioctl.c', |
---|
| 1746 | 'net80211/ieee80211_mesh.c', |
---|
| 1747 | 'net80211/ieee80211_monitor.c', |
---|
| 1748 | 'net80211/ieee80211_node.c', |
---|
| 1749 | 'net80211/ieee80211_output.c', |
---|
| 1750 | 'net80211/ieee80211_phy.c', |
---|
| 1751 | 'net80211/ieee80211_power.c', |
---|
| 1752 | 'net80211/ieee80211_proto.c', |
---|
| 1753 | 'net80211/ieee80211_radiotap.c', |
---|
| 1754 | 'net80211/ieee80211_ratectl.c', |
---|
| 1755 | 'net80211/ieee80211_ratectl_none.c', |
---|
| 1756 | 'net80211/ieee80211_regdomain.c', |
---|
| 1757 | 'net80211/ieee80211_rssadapt.c', |
---|
| 1758 | 'net80211/ieee80211_scan.c', |
---|
| 1759 | 'net80211/ieee80211_scan_sta.c', |
---|
| 1760 | 'net80211/ieee80211_sta.c', |
---|
| 1761 | 'net80211/ieee80211_superg.c', |
---|
| 1762 | 'net80211/ieee80211_tdma.c', |
---|
| 1763 | 'net80211/ieee80211_wds.c', |
---|
| 1764 | 'net80211/ieee80211_xauth.c', |
---|
| 1765 | ] |
---|
| 1766 | ) |
---|
| 1767 | |
---|
| 1768 | opencrypto = Module('opencrypto') |
---|
| 1769 | opencrypto.addHeaderFiles( |
---|
| 1770 | [ |
---|
| 1771 | 'sys/md5.h', |
---|
| 1772 | 'opencrypto/deflate.h', |
---|
| 1773 | 'opencrypto/xform.h', |
---|
| 1774 | 'opencrypto/cryptosoft.h', |
---|
| 1775 | 'opencrypto/rmd160.h', |
---|
| 1776 | 'opencrypto/cryptodev.h', |
---|
| 1777 | 'opencrypto/castsb.h', |
---|
| 1778 | 'opencrypto/skipjack.h', |
---|
| 1779 | 'opencrypto/cast.h', |
---|
| 1780 | ] |
---|
| 1781 | ) |
---|
| 1782 | opencrypto.addSourceFiles( |
---|
| 1783 | [ |
---|
| 1784 | 'opencrypto/crypto.c', |
---|
| 1785 | 'opencrypto/deflate.c', |
---|
| 1786 | 'opencrypto/cryptosoft.c', |
---|
| 1787 | 'opencrypto/criov.c', |
---|
| 1788 | 'opencrypto/rmd160.c', |
---|
| 1789 | 'opencrypto/xform.c', |
---|
| 1790 | 'opencrypto/skipjack.c', |
---|
| 1791 | 'opencrypto/cast.c', |
---|
| 1792 | 'opencrypto/cryptodev.c', |
---|
| 1793 | ] |
---|
| 1794 | ) |
---|
| 1795 | |
---|
| 1796 | crypto = Module('crypto') |
---|
| 1797 | crypto.addHeaderFiles( |
---|
| 1798 | [ |
---|
[1e8830f0] | 1799 | #'crypto/aesni/aesni.h', |
---|
[294ae20] | 1800 | 'crypto/sha1.h', |
---|
| 1801 | 'crypto/sha2/sha2.h', |
---|
| 1802 | 'crypto/rijndael/rijndael.h', |
---|
| 1803 | 'crypto/rijndael/rijndael_local.h', |
---|
| 1804 | 'crypto/rijndael/rijndael-api-fst.h', |
---|
| 1805 | 'crypto/des/des.h', |
---|
| 1806 | 'crypto/des/spr.h', |
---|
| 1807 | 'crypto/des/podd.h', |
---|
| 1808 | 'crypto/des/sk.h', |
---|
| 1809 | 'crypto/des/des_locl.h', |
---|
| 1810 | 'crypto/blowfish/bf_pi.h', |
---|
| 1811 | 'crypto/blowfish/bf_locl.h', |
---|
| 1812 | 'crypto/blowfish/blowfish.h', |
---|
| 1813 | 'crypto/rc4/rc4.h', |
---|
[1e8830f0] | 1814 | #'crypto/via/padlock.h', |
---|
[294ae20] | 1815 | 'crypto/camellia/camellia.h', |
---|
| 1816 | ] |
---|
| 1817 | ) |
---|
| 1818 | crypto.addSourceFiles( |
---|
| 1819 | [ |
---|
[1e8830f0] | 1820 | #'crypto/aesni/aesni.c', |
---|
| 1821 | #'crypto/aesni/aesni_wrap.c', |
---|
[294ae20] | 1822 | 'crypto/sha1.c', |
---|
| 1823 | 'crypto/sha2/sha2.c', |
---|
| 1824 | 'crypto/rijndael/rijndael-alg-fst.c', |
---|
| 1825 | 'crypto/rijndael/rijndael-api.c', |
---|
| 1826 | 'crypto/rijndael/rijndael-api-fst.c', |
---|
| 1827 | 'crypto/des/des_setkey.c', |
---|
| 1828 | 'crypto/des/des_enc.c', |
---|
| 1829 | 'crypto/des/des_ecb.c', |
---|
| 1830 | 'crypto/blowfish/bf_enc.c', |
---|
| 1831 | 'crypto/blowfish/bf_skey.c', |
---|
| 1832 | 'crypto/blowfish/bf_ecb.c', |
---|
| 1833 | 'crypto/rc4/rc4.c', |
---|
[1e8830f0] | 1834 | #'crypto/via/padlock.c', |
---|
| 1835 | #'crypto/via/padlock_cipher.c', |
---|
| 1836 | #'crypto/via/padlock_hash.c', |
---|
[294ae20] | 1837 | 'crypto/camellia/camellia-api.c', |
---|
| 1838 | 'crypto/camellia/camellia.c', |
---|
| 1839 | ] |
---|
| 1840 | ) |
---|
| 1841 | |
---|
| 1842 | altq = Module('altq') |
---|
| 1843 | altq.addHeaderFiles( |
---|
| 1844 | [ |
---|
| 1845 | 'contrib/altq/altq/altq_rmclass.h', |
---|
| 1846 | 'contrib/altq/altq/altq_cbq.h', |
---|
| 1847 | 'contrib/altq/altq/altq_var.h', |
---|
| 1848 | 'contrib/altq/altq/altqconf.h', |
---|
| 1849 | 'contrib/altq/altq/altq.h', |
---|
| 1850 | 'contrib/altq/altq/altq_hfsc.h', |
---|
| 1851 | 'contrib/altq/altq/altq_red.h', |
---|
| 1852 | 'contrib/altq/altq/altq_classq.h', |
---|
| 1853 | 'contrib/altq/altq/altq_priq.h', |
---|
| 1854 | 'contrib/altq/altq/altq_rmclass_debug.h', |
---|
| 1855 | 'contrib/altq/altq/altq_cdnr.h', |
---|
| 1856 | 'contrib/altq/altq/altq_rio.h', |
---|
| 1857 | 'contrib/altq/altq/if_altq.h', |
---|
| 1858 | ] |
---|
| 1859 | ) |
---|
| 1860 | altq.addSourceFiles( |
---|
| 1861 | [ |
---|
| 1862 | 'contrib/altq/altq/altq_rmclass.c', |
---|
| 1863 | 'contrib/altq/altq/altq_rio.c', |
---|
| 1864 | 'contrib/altq/altq/altq_subr.c', |
---|
| 1865 | 'contrib/altq/altq/altq_cdnr.c', |
---|
| 1866 | 'contrib/altq/altq/altq_priq.c', |
---|
| 1867 | 'contrib/altq/altq/altq_cbq.c', |
---|
| 1868 | 'contrib/altq/altq/altq_hfsc.c', |
---|
| 1869 | 'contrib/altq/altq/altq_red.c', |
---|
| 1870 | ] |
---|
| 1871 | ) |
---|
| 1872 | |
---|
[9df9609] | 1873 | # contrib/pf Module |
---|
[294ae20] | 1874 | pf = Module('pf') |
---|
| 1875 | pf.addHeaderFiles( |
---|
| 1876 | [ |
---|
| 1877 | 'contrib/pf/net/pf_mtag.h', |
---|
| 1878 | 'contrib/pf/net/if_pfsync.h', |
---|
| 1879 | 'contrib/pf/net/pfvar.h', |
---|
| 1880 | 'contrib/pf/net/if_pflog.h', |
---|
| 1881 | ] |
---|
| 1882 | ) |
---|
| 1883 | pf.addSourceFiles( |
---|
| 1884 | [ |
---|
| 1885 | 'contrib/pf/netinet/in4_cksum.c', |
---|
| 1886 | 'contrib/pf/net/pf.c', |
---|
| 1887 | 'contrib/pf/net/if_pflog.c', |
---|
| 1888 | 'contrib/pf/net/pf_subr.c', |
---|
| 1889 | 'contrib/pf/net/pf_ioctl.c', |
---|
| 1890 | 'contrib/pf/net/pf_table.c', |
---|
| 1891 | 'contrib/pf/net/pf_if.c', |
---|
| 1892 | 'contrib/pf/net/pf_osfp.c', |
---|
| 1893 | 'contrib/pf/net/pf_norm.c', |
---|
| 1894 | 'contrib/pf/net/pf_ruleset.c', |
---|
| 1895 | 'contrib/pf/net/if_pfsync.c', |
---|
| 1896 | ] |
---|
| 1897 | ) |
---|
| 1898 | |
---|
[9df9609] | 1899 | # ARM Architecture Specific Files Module |
---|
| 1900 | armDependent = Module('armDependent') |
---|
| 1901 | armDependent.setTarget("arm") |
---|
| 1902 | armDependent.addHeaderFiles( |
---|
| 1903 | [ |
---|
| 1904 | 'arm/include/in_cksum.h', |
---|
| 1905 | ] |
---|
| 1906 | ) |
---|
| 1907 | armDependent.addSourceFiles( |
---|
| 1908 | [ |
---|
| 1909 | 'arm/arm/in_cksum.c', |
---|
| 1910 | 'arm/arm/in_cksum_arm.S', |
---|
| 1911 | ] |
---|
| 1912 | ) |
---|
| 1913 | |
---|
| 1914 | # i386 Architecture Specific Files Module |
---|
| 1915 | i386Dependent = Module('i386Dependent') |
---|
| 1916 | i386Dependent.setTarget("i386") |
---|
| 1917 | i386Dependent.addHeaderFiles( |
---|
| 1918 | [ |
---|
| 1919 | 'i386/include/in_cksum.h', |
---|
| 1920 | ] |
---|
| 1921 | ) |
---|
| 1922 | i386Dependent.addSourceFiles( |
---|
| 1923 | [ |
---|
| 1924 | 'i386/i386/in_cksum.c', |
---|
| 1925 | ] |
---|
| 1926 | ) |
---|
| 1927 | |
---|
| 1928 | # MIPS Architecture Specific Files Module |
---|
| 1929 | mipsDependent = Module('mipsDependent') |
---|
| 1930 | mipsDependent.setTarget("mips") |
---|
| 1931 | mipsDependent.addHeaderFiles( |
---|
| 1932 | [ |
---|
| 1933 | 'mips/include/in_cksum.h', |
---|
| 1934 | ] |
---|
| 1935 | ) |
---|
| 1936 | mipsDependent.addSourceFiles( |
---|
| 1937 | [ |
---|
| 1938 | 'mips/mips/in_cksum.c', |
---|
| 1939 | ] |
---|
| 1940 | ) |
---|
| 1941 | |
---|
| 1942 | # PowerPC Architecture Specific Files Module |
---|
| 1943 | powerpcDependent = Module('powerpcDependent') |
---|
| 1944 | powerpcDependent.setTarget("powerpc") |
---|
| 1945 | powerpcDependent.addHeaderFiles( |
---|
| 1946 | [ |
---|
| 1947 | 'powerpc/include/in_cksum.h', |
---|
| 1948 | ] |
---|
| 1949 | ) |
---|
| 1950 | powerpcDependent.addSourceFiles( |
---|
| 1951 | [ |
---|
| 1952 | 'powerpc/powerpc/in_cksum.c', |
---|
| 1953 | ] |
---|
| 1954 | ) |
---|
| 1955 | |
---|
| 1956 | # SPARC64 Architecture Specific Files Module |
---|
| 1957 | sparc64Dependent = Module('cpu_dependent') |
---|
[6434b4b] | 1958 | sparc64Dependent.setTarget("sparc64") |
---|
[9df9609] | 1959 | sparc64Dependent.addHeaderFiles( |
---|
| 1960 | [ |
---|
| 1961 | 'sparc64/include/in_cksum.h', |
---|
| 1962 | ] |
---|
| 1963 | ) |
---|
| 1964 | sparc64Dependent.addSourceFiles( |
---|
| 1965 | [ |
---|
| 1966 | 'sparc64/sparc64/in_cksum.c', |
---|
| 1967 | ] |
---|
| 1968 | ) |
---|
| 1969 | |
---|
| 1970 | # Add Empty Files |
---|
[294ae20] | 1971 | mm.addEmptyFiles( |
---|
| 1972 | [ |
---|
| 1973 | 'cam/cam_queue.h', |
---|
| 1974 | 'ddb/db_sym.h', |
---|
| 1975 | 'ddb/ddb.h', |
---|
| 1976 | 'machine/cpu.h', |
---|
| 1977 | 'machine/elf.h', |
---|
| 1978 | 'machine/sf_buf.h', |
---|
[0f09b72] | 1979 | 'machine/smp.h', |
---|
[a52104c] | 1980 | 'machine/vm.h', |
---|
[1e8830f0] | 1981 | #'machine/vmparam.h', |
---|
[5ad09a1] | 1982 | 'local/opt_bce.h', |
---|
[fcce4d2] | 1983 | 'local/opt_ntp.h', |
---|
[f4e3138] | 1984 | 'local/pci_if.h', |
---|
[294ae20] | 1985 | 'security/audit/audit.h', |
---|
| 1986 | 'sys/bio.h', |
---|
| 1987 | 'sys/copyright.h', |
---|
| 1988 | 'sys/cpuset.h', |
---|
| 1989 | 'sys/exec.h', |
---|
| 1990 | 'sys/fail.h', |
---|
| 1991 | 'sys/limits.h', |
---|
| 1992 | 'sys/namei.h', |
---|
| 1993 | 'sys/_pthreadtypes.h', |
---|
[1e8830f0] | 1994 | #'sys/resourcevar.h', |
---|
[294ae20] | 1995 | 'sys/sched.h', |
---|
[1e8830f0] | 1996 | 'sys/select.h', |
---|
[294ae20] | 1997 | 'sys/syscallsubr.h', |
---|
| 1998 | 'sys/sysent.h', |
---|
| 1999 | 'sys/syslimits.h', |
---|
| 2000 | 'sys/sysproto.h', |
---|
[1e8830f0] | 2001 | 'sys/stat.h', |
---|
| 2002 | #'sys/time.h', |
---|
[294ae20] | 2003 | 'time.h', |
---|
| 2004 | 'sys/timespec.h', |
---|
| 2005 | 'sys/_timeval.h', |
---|
[1e8830f0] | 2006 | #'sys/vmmeter.h', |
---|
| 2007 | #'sys/vnode.h', |
---|
[a52104c] | 2008 | 'vm/pmap.h', |
---|
[1e8830f0] | 2009 | #'vm/uma_int.h', |
---|
| 2010 | #'vm/uma_dbg.h', |
---|
| 2011 | #'vm/vm_extern.h', |
---|
| 2012 | #'vm/vm_map.h', |
---|
| 2013 | #'vm/vm_object.h', |
---|
| 2014 | #'vm/vm_page.h', |
---|
| 2015 | #'vm/vm_param.h', |
---|
| 2016 | #'vm/vm_kern.h', |
---|
[294ae20] | 2017 | 'geom/geom_disk.h', |
---|
| 2018 | #'sys/kdb.h', |
---|
| 2019 | #'libkern/jenkins.h', |
---|
[a52104c] | 2020 | 'machine/pcb.h', |
---|
[294ae20] | 2021 | #'net80211/ieee80211_freebsd.h', |
---|
| 2022 | 'netgraph/ng_ipfw.h', |
---|
| 2023 | #'sys/sf_buf.h', |
---|
| 2024 | ] |
---|
| 2025 | ) |
---|
| 2026 | |
---|
[1e8830f0] | 2027 | # Register all the Module instances with the Module Manager |
---|
[294ae20] | 2028 | mm.addModule(netDeps) |
---|
| 2029 | mm.addModule(net) |
---|
| 2030 | mm.addModule(netinet) |
---|
| 2031 | mm.addModule(netinet6) |
---|
| 2032 | mm.addModule(netipsec) |
---|
| 2033 | mm.addModule(net80211) |
---|
| 2034 | mm.addModule(opencrypto) |
---|
| 2035 | mm.addModule(crypto) |
---|
| 2036 | mm.addModule(altq) |
---|
| 2037 | mm.addModule(pf) |
---|
| 2038 | mm.addModule(devNet) |
---|
| 2039 | |
---|
| 2040 | mm.addModule(local) |
---|
| 2041 | mm.addModule(devUsbBase) |
---|
| 2042 | mm.addModule(devUsb) |
---|
| 2043 | mm.addModule(devUsbQuirk) |
---|
| 2044 | mm.addModule(devUsbController) |
---|
| 2045 | |
---|
| 2046 | mm.addModule(cam) |
---|
| 2047 | mm.addModule(devUsbStorage) |
---|
| 2048 | #mm.addModule(devUsbNet) |
---|
| 2049 | |
---|
[3d7f69c] | 2050 | # Add PCI |
---|
| 2051 | mm.addModule(devPci) |
---|
| 2052 | |
---|
| 2053 | # Add NIC devices |
---|
[cd07c7a] | 2054 | mm.addModule(devNic) |
---|
[3d7f69c] | 2055 | mm.addModule(devNic_re) |
---|
[f4e3138] | 2056 | mm.addModule(devNic_fxp) |
---|
[7fa65ca] | 2057 | mm.addModule(devNic_e1000) |
---|
[5ad09a1] | 2058 | mm.addModule(devNic_dc) |
---|
| 2059 | mm.addModule(devNic_smc) |
---|
| 2060 | mm.addModule(devNic_broadcomm) |
---|
| 2061 | # TBD Requires ISA and PCCard Support to be pulled in. |
---|
| 2062 | # mm.addModule(devNic_cs) |
---|
[3d7f69c] | 2063 | |
---|
[9df9609] | 2064 | # Now add CPU Architecture Dependent Modules |
---|
[6434b4b] | 2065 | mm.addModule(armDependent) |
---|
| 2066 | mm.addModule(i386Dependent) |
---|
| 2067 | mm.addModule(mipsDependent) |
---|
[9df9609] | 2068 | mm.addModule(powerpcDependent) |
---|
[6434b4b] | 2069 | mm.addModule(sparc64Dependent) |
---|
[9df9609] | 2070 | |
---|
[3d7f69c] | 2071 | # XXX TODO Check that no file is also listed in empty |
---|
| 2072 | # XXX TODO Check that no file in in two modules |
---|
| 2073 | |
---|
[1e8830f0] | 2074 | # Perform the actual file manipulation |
---|
| 2075 | if isForward == True: |
---|
[7326d96] | 2076 | if isOnlyMakefile == False: |
---|
| 2077 | mm.copyFiles() |
---|
| 2078 | mm.createMakefile() |
---|
[1e8830f0] | 2079 | else: |
---|
[7326d96] | 2080 | mm.revertFiles() |
---|
[63e8969] | 2081 | |
---|
[7326d96] | 2082 | # Print a summary if changing files |
---|
| 2083 | if isDiffMode == False: |
---|
[e1da9dc] | 2084 | if filesProcessed == 1: |
---|
| 2085 | print str(filesProcessed) + " file was changed." |
---|
[7326d96] | 2086 | else: |
---|
[e1da9dc] | 2087 | print str(filesProcessed) + " files were changed." |
---|