Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7bf16b7e in mainline


Ignore:
Timestamp:
2018-05-22T19:06:50Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
ee0c03a
Parents:
0180c67
git-author:
Jakub Jermar <jakub@…> (2018-05-19 19:44:16)
git-committer:
Jakub Jermar <jakub@…> (2018-05-22 19:06:50)
Message:

tools/ew.py: Add support for virtio-net

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    r0180c67 r7bf16b7e  
    146146        return ' -device rtl8139,vlan=0'
    147147
     148def qemu_nic_virtio_options():
     149        return ' -device virtio-net,vlan=0'
     150
    148151def qemu_net_options():
    149152        if is_override('nonet'):
     
    158161                if 'ne2k' in overrides['net'].keys():
    159162                        nic_options += qemu_nic_ne2k_options()
     163                if 'virtio-net' in overrides['net'].keys():
     164                        nic_options += qemu_nic_virtio_options()
    160165        else:
    161166                # Use the default NIC
     
    320325def usage():
    321326        print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0]))
    322         print("%s [-d] [-h] [-net e1k|rtl8139|ne2k] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
     327        print("%s [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
    323328            os.path.basename(sys.argv[0]))
    324329        print("-d\tDry run: do not run the emulation, just print the command line.")
     
    352357                        elif sys.argv[i] == 'ne2k':
    353358                                overrides['net']['ne2k'] = True
     359                        elif sys.argv[i] == 'virtio-net':
     360                                overrides['net']['virtio-net'] = True
    354361                        else:
    355362                                usage()
Note: See TracChangeset for help on using the changeset viewer.