Update scripts to include support for input devices - USB Keyboard, USB mouse, touch, and EVDEV

This commit is contained in:
Kevin Kirspel 2017-05-17 08:40:37 -04:00 committed by Sebastian Huber
parent 427ee3e9eb
commit 29c0cffe57
2 changed files with 101 additions and 21 deletions

View File

@ -151,6 +151,7 @@ def rtems(mm):
'pppd/sys-rtems.c', 'pppd/sys-rtems.c',
'pppd/upap.c', 'pppd/upap.c',
'pppd/utils.c', 'pppd/utils.c',
'sys/dev/input/touchscreen/tsc_lpc32xx.c',
'sys/dev/usb/controller/ehci_mpc83xx.c', 'sys/dev/usb/controller/ehci_mpc83xx.c',
'sys/dev/usb/controller/ohci_lpc.c', 'sys/dev/usb/controller/ohci_lpc.c',
'sys/dev/usb/controller/ohci_lpc32xx.c', 'sys/dev/usb/controller/ohci_lpc32xx.c',
@ -499,6 +500,53 @@ def mmc(mm):
) )
return mod return mod
#
# Input
#
def dev_input(mm):
mod = builder.Module('dev_input')
mod.addKernelSpaceHeaderFiles(
[
'sys/sys/kbio.h',
'sys/dev/kbd/kbdreg.h',
'sys/dev/kbd/kbdtables.h',
'sys/sys/mouse.h',
]
)
mod.addKernelSpaceSourceFiles(
[
'sys/dev/kbd/kbd.c',
],
mm.generator['source']()
)
return mod
#
# EVDEV
#
def evdev(mm):
mod = builder.Module('evdev')
mod.addKernelSpaceHeaderFiles(
[
'sys/dev/evdev/evdev.h',
'sys/dev/evdev/evdev_private.h',
'sys/dev/evdev/input.h',
'sys/dev/evdev/input-event-codes.h',
'sys/dev/evdev/uinput.h',
]
)
mod.addKernelSpaceSourceFiles(
[
'sys/dev/evdev/cdev.c',
'sys/dev/evdev/evdev.c',
'sys/dev/evdev/evdev_mt.c',
'sys/dev/evdev/evdev_utils.c',
'sys/dev/evdev/uinput.c',
],
mm.generator['source']()
)
return mod
# #
# USB # USB
# #
@ -671,32 +719,17 @@ def dev_usb_input(mm):
mod.addDependency(mm['dev_usb']) mod.addDependency(mm['dev_usb'])
mod.addKernelSpaceHeaderFiles( mod.addKernelSpaceHeaderFiles(
[ [
'sys/dev/usb/input/usb_rdesc.h', 'sys/dev/usb/input/usb_rdesc.h',
] ]
) )
mod.addKernelSpaceSourceFiles( mod.addKernelSpaceSourceFiles(
[ [
'sys/dev/usb/input/atp.c',
'sys/dev/usb/input/uep.c',
'sys/dev/usb/input/uhid.c', 'sys/dev/usb/input/uhid.c',
'sys/dev/usb/input/ukbd.c', 'sys/dev/usb/input/ukbd.c',
],
mm.generator['source']()
)
return mod
#
# USB Mouse
#
def dev_usb_mouse(mm):
mod = builder.Module('dev_usb_mouse')
mod.addDependency(mm['dev_usb'])
mod.addKernelSpaceHeaderFiles(
[
'sys/sys/mouse.h',
]
)
mod.addKernelSpaceSourceFiles(
[
'sys/dev/usb/input/ums.c', 'sys/dev/usb/input/ums.c',
'sys/dev/usb/input/wsp.c',
], ],
mm.generator['source']() mm.generator['source']()
) )
@ -3021,6 +3054,9 @@ def tests(mm):
mod.addTest(mm.generator['test']('commands01', ['test_main'])) mod.addTest(mm.generator['test']('commands01', ['test_main']))
mod.addTest(mm.generator['test']('usb01', ['init'], False)) mod.addTest(mm.generator['test']('usb01', ['init'], False))
mod.addTest(mm.generator['test']('usbserial01', ['init'], False)) mod.addTest(mm.generator['test']('usbserial01', ['init'], False))
mod.addTest(mm.generator['test']('usbkbd01', ['init'], False))
mod.addTest(mm.generator['test']('usbmouse01', ['init'], False))
mod.addTest(mm.generator['test']('evdev01', ['init'], False))
mod.addTest(mm.generator['test']('loopback01', ['test_main'])) mod.addTest(mm.generator['test']('loopback01', ['test_main']))
mod.addTest(mm.generator['test']('netshell01', ['test_main', 'shellconfig'], False)) mod.addTest(mm.generator['test']('netshell01', ['test_main', 'shellconfig'], False))
mod.addTest(mm.generator['test']('swi01', ['init', 'swi_test'])) mod.addTest(mm.generator['test']('swi01', ['init', 'swi_test']))
@ -3151,6 +3187,8 @@ def sources(mm):
mm.addModule(fdt(mm)) mm.addModule(fdt(mm))
mm.addModule(tty(mm)) mm.addModule(tty(mm))
mm.addModule(mmc(mm)) mm.addModule(mmc(mm))
mm.addModule(dev_input(mm))
mm.addModule(evdev(mm))
mm.addModule(dev_usb(mm)) mm.addModule(dev_usb(mm))
#mm.addModule(dev_usb_add_on(mm)) #mm.addModule(dev_usb_add_on(mm))
@ -3160,8 +3198,7 @@ def sources(mm):
#mm.addModule(dev_usb_misc(mm)) #mm.addModule(dev_usb_misc(mm))
#mm.addModule(dev_usb_bluetooth(mm)) #mm.addModule(dev_usb_bluetooth(mm))
#mm.addModule(dev_usb_input(mm)) mm.addModule(dev_usb_input(mm))
#mm.addModule(dev_usb_mouse(mm))
mm.addModule(dev_usb_serial(mm)) mm.addModule(dev_usb_serial(mm))
mm.addModule(dev_usb_net(mm)) mm.addModule(dev_usb_net(mm))
mm.addModule(dev_usb_wlan(mm)) mm.addModule(dev_usb_wlan(mm))

View File

@ -780,9 +780,15 @@ def build(bld):
'freebsd/sys/dev/e1000/em_txrx.c', 'freebsd/sys/dev/e1000/em_txrx.c',
'freebsd/sys/dev/e1000/if_em.c', 'freebsd/sys/dev/e1000/if_em.c',
'freebsd/sys/dev/e1000/igb_txrx.c', 'freebsd/sys/dev/e1000/igb_txrx.c',
'freebsd/sys/dev/evdev/cdev.c',
'freebsd/sys/dev/evdev/evdev.c',
'freebsd/sys/dev/evdev/evdev_mt.c',
'freebsd/sys/dev/evdev/evdev_utils.c',
'freebsd/sys/dev/evdev/uinput.c',
'freebsd/sys/dev/fdt/fdt_common.c', 'freebsd/sys/dev/fdt/fdt_common.c',
'freebsd/sys/dev/fdt/simplebus.c', 'freebsd/sys/dev/fdt/simplebus.c',
'freebsd/sys/dev/fxp/if_fxp.c', 'freebsd/sys/dev/fxp/if_fxp.c',
'freebsd/sys/dev/kbd/kbd.c',
'freebsd/sys/dev/led/led.c', 'freebsd/sys/dev/led/led.c',
'freebsd/sys/dev/mii/brgphy.c', 'freebsd/sys/dev/mii/brgphy.c',
'freebsd/sys/dev/mii/e1000phy.c', 'freebsd/sys/dev/mii/e1000phy.c',
@ -892,6 +898,12 @@ def build(bld):
'freebsd/sys/dev/usb/controller/ehci.c', 'freebsd/sys/dev/usb/controller/ehci.c',
'freebsd/sys/dev/usb/controller/ohci.c', 'freebsd/sys/dev/usb/controller/ohci.c',
'freebsd/sys/dev/usb/controller/usb_controller.c', 'freebsd/sys/dev/usb/controller/usb_controller.c',
'freebsd/sys/dev/usb/input/atp.c',
'freebsd/sys/dev/usb/input/uep.c',
'freebsd/sys/dev/usb/input/uhid.c',
'freebsd/sys/dev/usb/input/ukbd.c',
'freebsd/sys/dev/usb/input/ums.c',
'freebsd/sys/dev/usb/input/wsp.c',
'freebsd/sys/dev/usb/net/if_aue.c', 'freebsd/sys/dev/usb/net/if_aue.c',
'freebsd/sys/dev/usb/net/if_axe.c', 'freebsd/sys/dev/usb/net/if_axe.c',
'freebsd/sys/dev/usb/net/if_axge.c', 'freebsd/sys/dev/usb/net/if_axge.c',
@ -1370,6 +1382,7 @@ def build(bld):
'rtemsbsd/rtems/syslog.c', 'rtemsbsd/rtems/syslog.c',
'rtemsbsd/sys/dev/dw_mmc/dw_mmc.c', 'rtemsbsd/sys/dev/dw_mmc/dw_mmc.c',
'rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c', 'rtemsbsd/sys/dev/ffec/if_ffec_mcf548x.c',
'rtemsbsd/sys/dev/input/touchscreen/tsc_lpc32xx.c',
'rtemsbsd/sys/dev/smc/if_smc_nexus.c', 'rtemsbsd/sys/dev/smc/if_smc_nexus.c',
'rtemsbsd/sys/dev/tsec/if_tsec_nexus.c', 'rtemsbsd/sys/dev/tsec/if_tsec_nexus.c',
'rtemsbsd/sys/dev/usb/controller/dwc_otg_nexus.c', 'rtemsbsd/sys/dev/usb/controller/dwc_otg_nexus.c',
@ -1535,6 +1548,16 @@ def build(bld):
lib = ["m", "z"], lib = ["m", "z"],
install_path = None) install_path = None)
test_evdev01 = ['testsuite/evdev01/init.c']
bld.program(target = "evdev01.exe",
features = "cprogram",
cflags = cflags,
includes = includes,
source = test_evdev01,
use = ["bsd"],
lib = ["m", "z"],
install_path = None)
test_foobarclient = ['testsuite/foobarclient/test_main.c'] test_foobarclient = ['testsuite/foobarclient/test_main.c']
bld.program(target = "foobarclient.exe", bld.program(target = "foobarclient.exe",
features = "cprogram", features = "cprogram",
@ -1922,6 +1945,26 @@ def build(bld):
lib = ["m", "z"], lib = ["m", "z"],
install_path = None) install_path = None)
test_usbkbd01 = ['testsuite/usbkbd01/init.c']
bld.program(target = "usbkbd01.exe",
features = "cprogram",
cflags = cflags,
includes = includes,
source = test_usbkbd01,
use = ["bsd"],
lib = ["m", "z"],
install_path = None)
test_usbmouse01 = ['testsuite/usbmouse01/init.c']
bld.program(target = "usbmouse01.exe",
features = "cprogram",
cflags = cflags,
includes = includes,
source = test_usbmouse01,
use = ["bsd"],
lib = ["m", "z"],
install_path = None)
test_usbserial01 = ['testsuite/usbserial01/init.c'] test_usbserial01 = ['testsuite/usbserial01/init.c']
bld.program(target = "usbserial01.exe", bld.program(target = "usbserial01.exe",
features = "cprogram", features = "cprogram",