Changes in tools/ew.py [e9f7778:56a3c29e] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    re9f7778 r56a3c29e  
    7979        for termemu in emus:
    8080                try:
    81                         subprocess.check_output('which ' + termemu, shell = True)
     81                        subprocess.check_output('which ' + termemu, shell = True, stderr = subprocess.STDOUT)
    8282                        return termemu
    8383                except:
     
    144144                        return 'system-arm', '-M raspi1ap'
    145145        elif platform == 'arm64':
    146                 # Search for the EDK2 firmware image
    147                 default_paths = (
    148                         '/usr/local/qemu-efi-aarch64/QEMU_EFI.fd', # Custom
    149                         '/usr/share/edk2/aarch64/QEMU_EFI.fd',     # Fedora
    150                         '/usr/share/qemu-efi-aarch64/QEMU_EFI.fd', # Ubuntu
    151                 )
    152                 extra_info = ("Pre-compiled binary can be obtained from "
    153                     "http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/latest/QEMU-AARCH64/RELEASE_GCC5/QEMU_EFI.fd.\n")
    154                 efi_path = find_firmware(
    155                     "EDK2", 'EW_QEMU_EFI_AARCH64', default_paths, extra_info)
    156                 if efi_path is None:
    157                         raise Exception
    158 
    159                 return 'system-aarch64', \
    160                     '-M virt -cpu cortex-a57 -m 1024 -bios %s' % efi_path
     146                if machine == 'virt':
     147                        # Search for the EDK2 firmware image
     148                        default_paths = (
     149                                '/usr/local/qemu-efi-aarch64/QEMU_EFI.fd', # Custom
     150                                '/usr/share/edk2/aarch64/QEMU_EFI.fd',     # Fedora
     151                                '/usr/share/qemu-efi-aarch64/QEMU_EFI.fd', # Ubuntu
     152                        )
     153                        extra_info = ("Pre-compiled binary can be obtained from "
     154                            "http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/latest/QEMU-AARCH64/RELEASE_GCC5/QEMU_EFI.fd.\n")
     155                        efi_path = find_firmware(
     156                            "EDK2", 'EW_QEMU_EFI_AARCH64', default_paths, extra_info)
     157                        if efi_path is None:
     158                                raise Exception
     159
     160                        return 'system-aarch64', \
     161                            '-M virt -cpu cortex-a57 -m 1024 -bios %s' % efi_path
    161162        elif platform == 'ia32':
    162163                return 'system-i386', pc_options(32)
     
    172173                        raise Exception
    173174                if processor == 'us':
    174                         return 'system-sparc64', '-M sun4u --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"'
     175                        cmdline = '-M sun4u'
     176                        if is_override('nographic'):
     177                            cmdline += ' --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"'
     178                        return 'system-sparc64', cmdline
    175179
    176180                # processor = 'sun4v'
     
    284288        if (is_override('nographic')):
    285289                cmdline += ' -nographic'
     290                console = True
    286291
    287292        if (not console and (not is_override('nographic')) and not is_override('noserial')):
     
    326331def msim_run(platform, machine, processor):
    327332        hdisk_mk()
    328         run_in_console('msim -c ' + TOOLS_DIR + '/conf/msim.conf', 'HelenOS/mips32 on msim')
     333        run_in_console('msim -n -c ' + TOOLS_DIR + '/conf/msim.conf', 'HelenOS/mips32 on msim')
    329334
    330335def spike_run(platform, machine, processor):
     
    409414                                'image' : 'image.iso',
    410415                                'audio' : False,
    411                                 'console' : True,
     416                                'console' : False,
    412417                                'net' : False,
    413418                                'usb' : False,
     
    417422                        'sun4v' : {
    418423                                'run' : qemu_run,
    419                                 'image' : '-drive if=pflash,readonly=on,file=image.iso',
     424                                # QEMU 8.0.0 ignores the 'file' argument and instead uses 'id',
     425                                # which defaults to 'pflash0', but can be changed to the same value
     426                                # as 'file'
     427                                'image' : '-drive if=pflash,id=image.iso,readonly=on,file=image.iso',
    420428                                'audio' : False,
    421429                                'console' : True,
Note: See TracChangeset for help on using the changeset viewer.