fs.py (13606:2ad4449e6cb4) | fs.py (13608:e91969b61d3d) |
---|---|
1# Copyright (c) 2010-2013, 2016, 2019 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 346 unchanged lines hidden (view full) --- 355if buildEnv['TARGET_ISA'] == "arm" and not options.bare_metal \ 356 and not options.dtb_filename: 357 if options.machine_type not in ["VExpress_GEM5", "VExpress_GEM5_V1"]: 358 warn("Can only correctly generate a dtb for VExpress_GEM5_V1 " \ 359 "platforms, unless custom hardware models have been equipped "\ 360 "with generation functionality.") 361 362 # Generate a Device Tree | 1# Copyright (c) 2010-2013, 2016, 2019 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 346 unchanged lines hidden (view full) --- 355if buildEnv['TARGET_ISA'] == "arm" and not options.bare_metal \ 356 and not options.dtb_filename: 357 if options.machine_type not in ["VExpress_GEM5", "VExpress_GEM5_V1"]: 358 warn("Can only correctly generate a dtb for VExpress_GEM5_V1 " \ 359 "platforms, unless custom hardware models have been equipped "\ 360 "with generation functionality.") 361 362 # Generate a Device Tree |
363 def create_dtb_for_system(system, filename): 364 state = FdtState(addr_cells=2, size_cells=2, cpu_cells=1) 365 rootNode = system.generateDeviceTree(state) 366 367 fdt = Fdt() 368 fdt.add_rootnode(rootNode) 369 dtb_filename = os.path.join(m5.options.outdir, filename) 370 return fdt.writeDtbFile(dtb_filename) 371 | |
372 for sysname in ('system', 'testsys', 'drivesys'): 373 if hasattr(root, sysname): 374 sys = getattr(root, sysname) | 363 for sysname in ('system', 'testsys', 'drivesys'): 364 if hasattr(root, sysname): 365 sys = getattr(root, sysname) |
375 sys.dtb_filename = create_dtb_for_system(sys, '%s.dtb' % sysname) | 366 sys.generateDtb(m5.options.outdir, '%s.dtb' % sysname) |
376 377Simulation.setWorkCountOptions(test_sys, options) 378Simulation.run(options, root, test_sys, FutureClass) | 367 368Simulation.setWorkCountOptions(test_sys, options) 369Simulation.run(options, root, test_sys, FutureClass) |