Changeset df6ded8 in mainline for tools/ew.py


Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    rf5e5f73 rdf6ded8  
    169169        return ' -usb'
    170170
     171def qemu_xhci_options():
     172        if is_override('noxhci'):
     173                return ''
     174        return ' -device nec-usb-xhci,id=xhci'
     175
     176def qemu_tablet_options():
     177        if is_override('notablet') or (is_override('nousb') and is_override('noxhci')):
     178                return ''
     179        return ' -device usb-tablet'
     180
    171181def qemu_audio_options():
    172182        if is_override('nosnd'):
     
    180190
    181191        cmdline = cmd
     192        if 'qemu_path' in overrides.keys():
     193                cmdline = overrides['qemu_path'] + cmd
     194
    182195        if options != '':
    183196                cmdline += ' ' + options
     
    189202        if (not 'usb' in cfg.keys()) or cfg['usb']:
    190203                cmdline += qemu_usb_options()
     204        if (not 'xhci' in cfg.keys()) or cfg['xhci']:
     205                cmdline += qemu_xhci_options()
     206        if (not 'tablet' in cfg.keys()) or cfg['tablet']:
     207                cmdline += qemu_tablet_options()
    191208        if (not 'audio' in cfg.keys()) or cfg['audio']:
    192209                cmdline += qemu_audio_options()
     
    297314def usage():
    298315        print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0]))
    299         print("%s [-d] [-h] [-net e1k|rtl8139|ne2k] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb]\n" %
     316        print("%s [-d] [-h] [-net e1k|rtl8139|ne2k] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
    300317            os.path.basename(sys.argv[0]))
    301318        print("-d\tDry run: do not run the emulation, just print the command line.")
     
    306323        print("-nosnd\tDisable sound, if applicable.")
    307324        print("-nousb\tDisable USB support, if applicable.")
     325        print("-noxhci\tDisable XHCI support, if applicable.")
     326        print("-notablet\tDisable USB tablet (use only relative-position PS/2 mouse instead), if applicable.")
    308327
    309328def fail(platform, machine):
     
    313332def run():
    314333        expect_nic = False
     334        expect_qemu = False
    315335
    316336        for i in range(1, len(sys.argv)):
     
    329349                                usage()
    330350                                exit()
     351
     352                if expect_qemu:
     353                        expect_qemu = False
     354                        overrides['qemu_path'] = sys.argv[i]
    331355
    332356                elif sys.argv[i] == '-h':
     
    347371                elif sys.argv[i] == '-nousb':
    348372                        overrides['nousb'] = True
     373                elif sys.argv[i] == '-noxhci':
     374                        overrides['noxhci'] = True
     375                elif sys.argv[i] == '-notablet':
     376                        overrides['notablet'] = True
     377                elif sys.argv[i] == '-qemu_path' and i < len(sys.argv) - 1:
     378                        expect_qemu = True
    349379                else:
    350380                        usage()
Note: See TracChangeset for help on using the changeset viewer.