[df64dbc] | 1 | #!/usr/bin/env python
|
---|
| 2 | #
|
---|
[3f4c537a] | 3 | # Copyright (c) 2013 Jakub Jermar
|
---|
[df64dbc] | 4 | # All rights reserved.
|
---|
| 5 | #
|
---|
| 6 | # Redistribution and use in source and binary forms, with or without
|
---|
| 7 | # modification, are permitted provided that the following conditions
|
---|
| 8 | # are met:
|
---|
| 9 | #
|
---|
| 10 | # - Redistributions of source code must retain the above copyright
|
---|
| 11 | # notice, this list of conditions and the following disclaimer.
|
---|
| 12 | # - Redistributions in binary form must reproduce the above copyright
|
---|
| 13 | # notice, this list of conditions and the following disclaimer in the
|
---|
| 14 | # documentation and/or other materials provided with the distribution.
|
---|
| 15 | # - The name of the author may not be used to endorse or promote products
|
---|
| 16 | # derived from this software without specific prior written permission.
|
---|
| 17 | #
|
---|
| 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 19 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 20 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 21 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 22 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 23 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 28 | #
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | """
|
---|
| 32 | Emulator wrapper for running HelenOS
|
---|
| 33 | """
|
---|
| 34 |
|
---|
[1c24c7c] | 35 | import os
|
---|
[f5ceb18] | 36 | import sys
|
---|
[1c24c7c] | 37 | import subprocess
|
---|
[df64dbc] | 38 | import autotool
|
---|
[8a26f82] | 39 | import platform
|
---|
[df425da] | 40 | import thread
|
---|
| 41 | import time
|
---|
[df64dbc] | 42 |
|
---|
[f5ceb18] | 43 | overrides = {}
|
---|
| 44 |
|
---|
| 45 | def is_override(str):
|
---|
| 46 | if str in overrides.keys():
|
---|
| 47 | return overrides[str]
|
---|
| 48 | return False
|
---|
| 49 |
|
---|
[df425da] | 50 | def cfg_get(platform, machine, processor):
|
---|
| 51 | if machine == "" or emulators[platform].has_key("run"):
|
---|
[f5ceb18] | 52 | return emulators[platform]
|
---|
[df425da] | 53 | elif processor == "" or emulators[platform][machine].has_key("run"):
|
---|
[f5ceb18] | 54 | return emulators[platform][machine]
|
---|
[df425da] | 55 | else:
|
---|
| 56 | return emulators[platform][machine][processor]
|
---|
[f5ceb18] | 57 |
|
---|
[e4c8e3cf] | 58 | def termemu_detect():
|
---|
| 59 | for termemu in ['xfce4-terminal', 'xterm']:
|
---|
| 60 | try:
|
---|
| 61 | subprocess.check_output('which ' + termemu, shell = True)
|
---|
| 62 | return termemu
|
---|
| 63 | except:
|
---|
| 64 | pass
|
---|
| 65 |
|
---|
[df64dbc] | 66 | def run_in_console(cmd, title):
|
---|
[1dab093] | 67 | ecmd = cmd.replace('"', '\\"')
|
---|
| 68 | cmdline = termemu_detect() + ' -T ' + '"' + title + '"' + ' -e "' + ecmd + '"'
|
---|
[e4a1497] | 69 | print(cmdline)
|
---|
[f5ceb18] | 70 | if not is_override('dryrun'):
|
---|
[e4c8e3cf] | 71 | subprocess.call(cmdline, shell = True)
|
---|
[df64dbc] | 72 |
|
---|
[8a26f82] | 73 | def get_host_native_width():
|
---|
| 74 | return int(platform.architecture()[0].strip('bit'))
|
---|
| 75 |
|
---|
| 76 | def pc_options(guest_width):
|
---|
| 77 | opts = ''
|
---|
[a35b458] | 78 |
|
---|
[8a26f82] | 79 | # Do not enable KVM if running 64 bits HelenOS
|
---|
| 80 | # on 32 bits host
|
---|
| 81 | host_width = get_host_native_width()
|
---|
[f5ceb18] | 82 | if guest_width <= host_width and not is_override('nokvm'):
|
---|
[8a26f82] | 83 | opts = opts + ' -enable-kvm'
|
---|
[a35b458] | 84 |
|
---|
[8a26f82] | 85 | # Remove the leading space
|
---|
| 86 | return opts[1:]
|
---|
[df64dbc] | 87 |
|
---|
| 88 | def malta_options():
|
---|
| 89 | return '-cpu 4Kc'
|
---|
| 90 |
|
---|
[9185e42] | 91 | def platform_to_qemu_options(platform, machine, processor):
|
---|
[df64dbc] | 92 | if platform == 'amd64':
|
---|
[8a26f82] | 93 | return 'system-x86_64', pc_options(64)
|
---|
[df64dbc] | 94 | elif platform == 'arm32':
|
---|
[83b01c2] | 95 | return 'system-arm', '-M integratorcp'
|
---|
[df64dbc] | 96 | elif platform == 'ia32':
|
---|
[8a26f82] | 97 | return 'system-i386', pc_options(32)
|
---|
[df64dbc] | 98 | elif platform == 'mips32':
|
---|
| 99 | if machine == 'lmalta':
|
---|
| 100 | return 'system-mipsel', malta_options()
|
---|
| 101 | elif machine == 'bmalta':
|
---|
| 102 | return 'system-mips', malta_options()
|
---|
| 103 | elif platform == 'ppc32':
|
---|
[644352c] | 104 | return 'system-ppc', '-m 256'
|
---|
[df64dbc] | 105 | elif platform == 'sparc64':
|
---|
[9185e42] | 106 | if machine != 'generic':
|
---|
| 107 | raise Exception
|
---|
| 108 | if processor == 'us':
|
---|
[7f4937e] | 109 | return 'system-sparc64', '-M sun4u --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"'
|
---|
[9185e42] | 110 | elif processor == 'sun4v':
|
---|
| 111 | default_path = '/usr/local/opensparc/image/'
|
---|
| 112 | try:
|
---|
| 113 | if os.path.exists(default_path):
|
---|
| 114 | opensparc_bins = default_path
|
---|
| 115 | elif os.path.exists(os.environ['OPENSPARC_BINARIES']):
|
---|
| 116 | opensparc_bins = os.environ['OPENSPARC_BINARIES']
|
---|
| 117 | else:
|
---|
| 118 | raise Exception
|
---|
| 119 | except:
|
---|
| 120 | print("Cannot find OpenSPARC binary images!")
|
---|
| 121 | print("Either set OPENSPARC_BINARIES environment variable accordingly or place the images in %s." % (default_path))
|
---|
| 122 | raise Exception
|
---|
| 123 |
|
---|
| 124 | return 'system-sparc64', '-M niagara -m 256 -L %s' % (opensparc_bins)
|
---|
| 125 |
|
---|
[df64dbc] | 126 |
|
---|
[129b92c6] | 127 | def hdisk_mk():
|
---|
[df64dbc] | 128 | if not os.path.exists('hdisk.img'):
|
---|
| 129 | subprocess.call('tools/mkfat.py 1048576 uspace/dist/data hdisk.img', shell = True)
|
---|
[f5ceb18] | 130 |
|
---|
[129b92c6] | 131 | def qemu_bd_options():
|
---|
| 132 | if is_override('nohdd'):
|
---|
| 133 | return ''
|
---|
[a35b458] | 134 |
|
---|
[129b92c6] | 135 | hdisk_mk()
|
---|
[a35b458] | 136 |
|
---|
[5fdad22] | 137 | return ' -drive file=hdisk.img,index=0,media=disk,format=raw'
|
---|
[df64dbc] | 138 |
|
---|
| 139 | def qemu_nic_ne2k_options():
|
---|
| 140 | return ' -device ne2k_isa,irq=5,vlan=0'
|
---|
| 141 |
|
---|
| 142 | def qemu_nic_e1k_options():
|
---|
| 143 | return ' -device e1000,vlan=0'
|
---|
| 144 |
|
---|
| 145 | def qemu_nic_rtl8139_options():
|
---|
| 146 | return ' -device rtl8139,vlan=0'
|
---|
| 147 |
|
---|
| 148 | def qemu_net_options():
|
---|
[f5ceb18] | 149 | if is_override('nonet'):
|
---|
| 150 | return ''
|
---|
| 151 |
|
---|
| 152 | nic_options = ''
|
---|
| 153 | if 'net' in overrides.keys():
|
---|
| 154 | if 'e1k' in overrides['net'].keys():
|
---|
| 155 | nic_options += qemu_nic_e1k_options()
|
---|
| 156 | if 'rtl8139' in overrides['net'].keys():
|
---|
| 157 | nic_options += qemu_nic_rtl8139_options()
|
---|
| 158 | if 'ne2k' in overrides['net'].keys():
|
---|
| 159 | nic_options += qemu_nic_ne2k_options()
|
---|
| 160 | else:
|
---|
| 161 | # Use the default NIC
|
---|
| 162 | nic_options += qemu_nic_e1k_options()
|
---|
| 163 |
|
---|
[362654a] | 164 | return nic_options + ' -net user,hostfwd=udp::8080-:8080,hostfwd=udp::8081-:8081,hostfwd=tcp::8080-:8080,hostfwd=tcp::8081-:8081,hostfwd=tcp::2223-:2223'
|
---|
[df64dbc] | 165 |
|
---|
| 166 | def qemu_usb_options():
|
---|
[f5ceb18] | 167 | if is_override('nousb'):
|
---|
| 168 | return ''
|
---|
| 169 | return ' -usb'
|
---|
[df64dbc] | 170 |
|
---|
[5119d34] | 171 | def qemu_xhci_options():
|
---|
| 172 | if is_override('noxhci'):
|
---|
| 173 | return ''
|
---|
| 174 | return ' -device nec-usb-xhci,id=xhci'
|
---|
| 175 |
|
---|
[27de618] | 176 | def qemu_tablet_options():
|
---|
| 177 | if is_override('notablet') or (is_override('nousb') and is_override('noxhci')):
|
---|
| 178 | return ''
|
---|
| 179 | return ' -device usb-tablet'
|
---|
| 180 |
|
---|
[f5ceb18] | 181 | def qemu_audio_options():
|
---|
| 182 | if is_override('nosnd'):
|
---|
| 183 | return ''
|
---|
[089901e] | 184 | return ' -device intel-hda -device hda-duplex'
|
---|
[f5ceb18] | 185 |
|
---|
[df425da] | 186 | def qemu_run(platform, machine, processor):
|
---|
| 187 | cfg = cfg_get(platform, machine, processor)
|
---|
[9185e42] | 188 | suffix, options = platform_to_qemu_options(platform, machine, processor)
|
---|
[df64dbc] | 189 | cmd = 'qemu-' + suffix
|
---|
| 190 |
|
---|
| 191 | cmdline = cmd
|
---|
[3692678] | 192 | if 'qemu_path' in overrides.keys():
|
---|
| 193 | cmdline = overrides['qemu_path'] + cmd
|
---|
| 194 |
|
---|
[df64dbc] | 195 | if options != '':
|
---|
| 196 | cmdline += ' ' + options
|
---|
| 197 |
|
---|
[f5ceb18] | 198 | cmdline += qemu_bd_options()
|
---|
| 199 |
|
---|
| 200 | if (not 'net' in cfg.keys()) or cfg['net']:
|
---|
[df64dbc] | 201 | cmdline += qemu_net_options()
|
---|
[f5ceb18] | 202 | if (not 'usb' in cfg.keys()) or cfg['usb']:
|
---|
[df64dbc] | 203 | cmdline += qemu_usb_options()
|
---|
[5119d34] | 204 | if (not 'xhci' in cfg.keys()) or cfg['xhci']:
|
---|
| 205 | cmdline += qemu_xhci_options()
|
---|
[27de618] | 206 | if (not 'tablet' in cfg.keys()) or cfg['tablet']:
|
---|
| 207 | cmdline += qemu_tablet_options()
|
---|
[f5ceb18] | 208 | if (not 'audio' in cfg.keys()) or cfg['audio']:
|
---|
| 209 | cmdline += qemu_audio_options()
|
---|
[a35b458] | 210 |
|
---|
[f5ceb18] | 211 | if cfg['image'] == 'image.iso':
|
---|
[df64dbc] | 212 | cmdline += ' -boot d -cdrom image.iso'
|
---|
[f5ceb18] | 213 | elif cfg['image'] == 'image.boot':
|
---|
[df64dbc] | 214 | cmdline += ' -kernel image.boot'
|
---|
[9185e42] | 215 | else:
|
---|
| 216 | cmdline += ' ' + cfg['image']
|
---|
[df64dbc] | 217 |
|
---|
[f5ceb18] | 218 | if ('console' in cfg.keys()) and not cfg['console']:
|
---|
[df64dbc] | 219 | cmdline += ' -nographic'
|
---|
| 220 |
|
---|
| 221 | title = 'HelenOS/' + platform
|
---|
| 222 | if machine != '':
|
---|
| 223 | title += ' on ' + machine
|
---|
[9185e42] | 224 | if 'expect' in cfg.keys():
|
---|
| 225 | cmdline = 'expect -c \'spawn %s; expect "%s" { send "%s" } timeout exp_continue; interact\'' % (cmdline, cfg['expect']['src'], cfg['expect']['dst'])
|
---|
[df64dbc] | 226 | run_in_console(cmdline, title)
|
---|
| 227 | else:
|
---|
[e4a1497] | 228 | print(cmdline)
|
---|
[f5ceb18] | 229 | if not is_override('dryrun'):
|
---|
| 230 | subprocess.call(cmdline, shell = True)
|
---|
[3f4c537a] | 231 |
|
---|
[df425da] | 232 | def ski_run(platform, machine, processor):
|
---|
[df64dbc] | 233 | run_in_console('ski -i contrib/conf/ski.conf', 'HelenOS/ia64 on ski')
|
---|
| 234 |
|
---|
[df425da] | 235 | def msim_run(platform, machine, processor):
|
---|
[129b92c6] | 236 | hdisk_mk()
|
---|
[df64dbc] | 237 | run_in_console('msim -c contrib/conf/msim.conf', 'HelenOS/mips32 on msim')
|
---|
| 238 |
|
---|
[3f4c537a] | 239 | def spike_run(platform, machine, processor):
|
---|
[ae8d7b0] | 240 | run_in_console('spike -m1073741824:1073741824 image.boot', 'HelenOS/risvc64 on Spike')
|
---|
[3f4c537a] | 241 |
|
---|
[f5ceb18] | 242 | emulators = {
|
---|
| 243 | 'amd64' : {
|
---|
| 244 | 'run' : qemu_run,
|
---|
| 245 | 'image' : 'image.iso'
|
---|
| 246 | },
|
---|
| 247 | 'arm32' : {
|
---|
| 248 | 'integratorcp' : {
|
---|
| 249 | 'run' : qemu_run,
|
---|
| 250 | 'image' : 'image.boot',
|
---|
| 251 | 'net' : False,
|
---|
[a1a81f69] | 252 | 'audio' : False,
|
---|
| 253 | 'xhci' : False,
|
---|
| 254 | 'tablet' : False
|
---|
[f5ceb18] | 255 | }
|
---|
| 256 | },
|
---|
| 257 | 'ia32' : {
|
---|
| 258 | 'run' : qemu_run,
|
---|
| 259 | 'image' : 'image.iso'
|
---|
| 260 | },
|
---|
| 261 | 'ia64' : {
|
---|
| 262 | 'ski' : {
|
---|
| 263 | 'run' : ski_run
|
---|
| 264 | }
|
---|
| 265 | },
|
---|
| 266 | 'mips32' : {
|
---|
| 267 | 'msim' : {
|
---|
| 268 | 'run' : msim_run
|
---|
| 269 | },
|
---|
| 270 | 'lmalta' : {
|
---|
| 271 | 'run' : qemu_run,
|
---|
| 272 | 'image' : 'image.boot',
|
---|
| 273 | 'console' : False
|
---|
| 274 | },
|
---|
| 275 | 'bmalta' : {
|
---|
| 276 | 'run' : qemu_run,
|
---|
| 277 | 'image' : 'image.boot',
|
---|
| 278 | 'console' : False
|
---|
| 279 | },
|
---|
| 280 | },
|
---|
| 281 | 'ppc32' : {
|
---|
| 282 | 'run' : qemu_run,
|
---|
| 283 | 'image' : 'image.iso',
|
---|
| 284 | 'audio' : False
|
---|
| 285 | },
|
---|
[3f4c537a] | 286 | 'riscv64' : {
|
---|
| 287 | 'run' : spike_run,
|
---|
| 288 | 'image' : 'image.boot'
|
---|
| 289 | },
|
---|
[f5ceb18] | 290 | 'sparc64' : {
|
---|
| 291 | 'generic' : {
|
---|
[df425da] | 292 | 'us' : {
|
---|
| 293 | 'run' : qemu_run,
|
---|
| 294 | 'image' : 'image.iso',
|
---|
[0195374] | 295 | 'audio' : False,
|
---|
| 296 | 'console' : False,
|
---|
[fd57cf17] | 297 | 'net' : False,
|
---|
| 298 | 'usb' : False,
|
---|
| 299 | 'xhci' : False,
|
---|
| 300 | 'tablet' : False
|
---|
[df425da] | 301 | },
|
---|
| 302 | 'sun4v' : {
|
---|
[9185e42] | 303 | 'run' : qemu_run,
|
---|
| 304 | 'image' : '-drive if=pflash,readonly=on,file=image.iso',
|
---|
| 305 | 'audio' : False,
|
---|
| 306 | 'console' : False,
|
---|
| 307 | 'net' : False,
|
---|
| 308 | 'usb' : False,
|
---|
[fd57cf17] | 309 | 'xhci' : False,
|
---|
| 310 | 'tablet' : False,
|
---|
[9185e42] | 311 | 'expect' : {
|
---|
| 312 | 'src' : 'ok ',
|
---|
| 313 | 'dst' : 'boot\n'
|
---|
| 314 | },
|
---|
[df425da] | 315 | }
|
---|
[f5ceb18] | 316 | }
|
---|
| 317 | },
|
---|
| 318 | }
|
---|
| 319 |
|
---|
| 320 | def usage():
|
---|
| 321 | print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0]))
|
---|
[27de618] | 322 | print("%s [-d] [-h] [-net e1k|rtl8139|ne2k] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
|
---|
[f5ceb18] | 323 | os.path.basename(sys.argv[0]))
|
---|
| 324 | print("-d\tDry run: do not run the emulation, just print the command line.")
|
---|
| 325 | print("-h\tPrint the usage information and exit.")
|
---|
| 326 | print("-nohdd\tDisable hard disk, if applicable.")
|
---|
| 327 | print("-nokvm\tDisable KVM, if applicable.")
|
---|
| 328 | print("-nonet\tDisable networking support, if applicable.")
|
---|
| 329 | print("-nosnd\tDisable sound, if applicable.")
|
---|
| 330 | print("-nousb\tDisable USB support, if applicable.")
|
---|
[5119d34] | 331 | print("-noxhci\tDisable XHCI support, if applicable.")
|
---|
[27de618] | 332 | print("-notablet\tDisable USB tablet (use only relative-position PS/2 mouse instead), if applicable.")
|
---|
[df64dbc] | 333 |
|
---|
[df425da] | 334 | def fail(platform, machine):
|
---|
| 335 | print("Cannot start emulation for the chosen configuration. (%s/%s)" % (platform, machine))
|
---|
[a35b458] | 336 |
|
---|
[df425da] | 337 |
|
---|
[df64dbc] | 338 | def run():
|
---|
[f5ceb18] | 339 | expect_nic = False
|
---|
[3692678] | 340 | expect_qemu = False
|
---|
[f5ceb18] | 341 |
|
---|
| 342 | for i in range(1, len(sys.argv)):
|
---|
| 343 |
|
---|
| 344 | if expect_nic:
|
---|
| 345 | expect_nic = False
|
---|
| 346 | if not 'net' in overrides.keys():
|
---|
| 347 | overrides['net'] = {}
|
---|
| 348 | if sys.argv[i] == 'e1k':
|
---|
| 349 | overrides['net']['e1k'] = True
|
---|
| 350 | elif sys.argv[i] == 'rtl8139':
|
---|
| 351 | overrides['net']['rtl8139'] = True
|
---|
| 352 | elif sys.argv[i] == 'ne2k':
|
---|
| 353 | overrides['net']['ne2k'] = True
|
---|
| 354 | else:
|
---|
| 355 | usage()
|
---|
| 356 | exit()
|
---|
[f134413] | 357 | continue
|
---|
[f5ceb18] | 358 |
|
---|
[3692678] | 359 | if expect_qemu:
|
---|
| 360 | expect_qemu = False
|
---|
| 361 | overrides['qemu_path'] = sys.argv[i]
|
---|
| 362 |
|
---|
[f5ceb18] | 363 | elif sys.argv[i] == '-h':
|
---|
| 364 | usage()
|
---|
| 365 | exit()
|
---|
| 366 | elif sys.argv[i] == '-d':
|
---|
| 367 | overrides['dryrun'] = True
|
---|
| 368 | elif sys.argv[i] == '-net' and i < len(sys.argv) - 1:
|
---|
| 369 | expect_nic = True
|
---|
| 370 | elif sys.argv[i] == '-nohdd':
|
---|
| 371 | overrides['nohdd'] = True
|
---|
| 372 | elif sys.argv[i] == '-nokvm':
|
---|
| 373 | overrides['nokvm'] = True
|
---|
| 374 | elif sys.argv[i] == '-nonet':
|
---|
| 375 | overrides['nonet'] = True
|
---|
| 376 | elif sys.argv[i] == '-nosnd':
|
---|
| 377 | overrides['nosnd'] = True
|
---|
| 378 | elif sys.argv[i] == '-nousb':
|
---|
| 379 | overrides['nousb'] = True
|
---|
[5119d34] | 380 | elif sys.argv[i] == '-noxhci':
|
---|
| 381 | overrides['noxhci'] = True
|
---|
[27de618] | 382 | elif sys.argv[i] == '-notablet':
|
---|
| 383 | overrides['notablet'] = True
|
---|
[3692678] | 384 | elif sys.argv[i] == '-qemu_path' and i < len(sys.argv) - 1:
|
---|
| 385 | expect_qemu = True
|
---|
[f5ceb18] | 386 | else:
|
---|
| 387 | usage()
|
---|
| 388 | exit()
|
---|
| 389 |
|
---|
[df64dbc] | 390 | config = {}
|
---|
| 391 | autotool.read_config(autotool.CONFIG, config)
|
---|
| 392 |
|
---|
[f5ceb18] | 393 | if 'PLATFORM' in config.keys():
|
---|
[df64dbc] | 394 | platform = config['PLATFORM']
|
---|
[f5ceb18] | 395 | else:
|
---|
[df64dbc] | 396 | platform = ''
|
---|
| 397 |
|
---|
[f5ceb18] | 398 | if 'MACHINE' in config.keys():
|
---|
[df64dbc] | 399 | mach = config['MACHINE']
|
---|
[f5ceb18] | 400 | else:
|
---|
[df64dbc] | 401 | mach = ''
|
---|
| 402 |
|
---|
[df425da] | 403 | if 'PROCESSOR' in config.keys():
|
---|
| 404 | processor = config['PROCESSOR']
|
---|
| 405 | else:
|
---|
| 406 | processor = ''
|
---|
| 407 |
|
---|
[df64dbc] | 408 | try:
|
---|
[df425da] | 409 | emu_run = cfg_get(platform, mach, processor)['run']
|
---|
| 410 | emu_run(platform, mach, processor)
|
---|
[df64dbc] | 411 | except:
|
---|
[df425da] | 412 | fail(platform, mach)
|
---|
[df64dbc] | 413 | return
|
---|
| 414 |
|
---|
| 415 | run()
|
---|