Changes in tools/ew.py [06f10ac:c35cc8b] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    r06f10ac rc35cc8b  
    7676
    7777def termemu_detect():
    78         emus = ['gnome-terminal', 'xfce4-terminal', 'xterm']
     78        emus = ['gnome-terminal', 'foot', 'xfce4-terminal', 'xterm']
     79
     80        if 'TERMINAL' in os.environ:
     81                emus.insert(0, os.environ['TERMINAL'])
     82
    7983        for termemu in emus:
    8084                try:
    81                         subprocess.check_output('which ' + termemu, shell = True)
     85                        subprocess.check_output('which ' + termemu, shell = True, stderr = subprocess.STDOUT)
    8286                        return termemu
    8387                except:
     
    8993def run_in_console(cmd, title):
    9094        temu = termemu_detect()
    91         if temu == 'gnome-terminal':
     95
     96        if os.path.basename(temu.split(' ')[0]) in ['gnome-terminal', 'foot']:
    9297                cmdline = temu + ' -- ' + cmd
    9398        else:
     
    173178                        raise Exception
    174179                if processor == 'us':
    175                         return 'system-sparc64', '-M sun4u --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"'
     180                        cmdline = '-M sun4u'
     181                        if is_override('nographic'):
     182                            cmdline += ' --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"'
     183                        return 'system-sparc64', cmdline
    176184
    177185                # processor = 'sun4v'
     
    285293        if (is_override('nographic')):
    286294                cmdline += ' -nographic'
     295                console = True
    287296
    288297        if (not console and (not is_override('nographic')) and not is_override('noserial')):
     
    327336def msim_run(platform, machine, processor):
    328337        hdisk_mk()
    329         run_in_console('msim -c ' + TOOLS_DIR + '/conf/msim.conf', 'HelenOS/mips32 on msim')
     338        run_in_console('msim -n -c ' + TOOLS_DIR + '/conf/msim.conf', 'HelenOS/mips32 on msim')
    330339
    331340def spike_run(platform, machine, processor):
     
    410419                                'image' : 'image.iso',
    411420                                'audio' : False,
    412                                 'console' : True,
     421                                'console' : False,
    413422                                'net' : False,
    414423                                'usb' : False,
     
    418427                        'sun4v' : {
    419428                                'run' : qemu_run,
    420                                 'image' : '-drive if=pflash,readonly=on,file=image.iso',
     429                                # QEMU 8.0.0 ignores the 'file' argument and instead uses 'id',
     430                                # which defaults to 'pflash0', but can be changed to the same value
     431                                # as 'file'
     432                                'image' : '-drive if=pflash,id=image.iso,readonly=on,file=image.iso',
    421433                                'audio' : False,
    422434                                'console' : True,
Note: See TracChangeset for help on using the changeset viewer.