[PATCH 9/9] Updating script files for USB serial devices
Kevin Kirspel
kevin-kirspel at idexx.com
Thu Feb 9 03:21:40 UTC 2017
---
libbsd.py | 67 +++++++++++++++++++++++++++++++++-------------
libbsd_waf.py | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 134 insertions(+), 19 deletions(-)
diff --git a/libbsd.py b/libbsd.py
index 7264ac4..a690a00 100755
--- a/libbsd.py
+++ b/libbsd.py
@@ -75,11 +75,13 @@ def rtems(mm):
'rtems/rtems-bsd-shell-pfctl.c',
'rtems/rtems-bsd-shell-ping.c',
'rtems/rtems-bsd-shell-route.c',
+ 'rtems/rtems-bsd-shell-stty.c',
'rtems/rtems-bsd-shell-sysctl.c',
'rtems/rtems-bsd-shell-tcpdump.c',
'rtems/rtems-bsd-shell-vmstat.c',
'rtems/rtems-bsd-shell-wlanstats.c',
'rtems/rtems-bsd-syscall-api.c',
+ 'rtems/rtems-bsd-termios.c',
'rtems/rtems-kernel-assert.c',
'rtems/rtems-kernel-autoconf.c',
'rtems/rtems-kernel-bus-dma.c',
@@ -155,6 +157,7 @@ def rtems(mm):
'sys/dev/ffec/if_ffec_mcf548x.c',
'sys/dev/dw_mmc/dw_mmc.c',
'sys/fs/devfs/devfs_devs.c',
+ 'sys/fs/devfs/devfs_vnops.c',
'sys/net/if_ppp.c',
'sys/net/ppp_tty.c',
'telnetd/check_passwd.c',
@@ -717,31 +720,41 @@ def dev_usb_serial(mm):
mod.addDependency(mm['dev_usb'])
mod.addKernelSpaceHeaderFiles(
[
- 'sys/dev/usb/serial/uftdi_reg.h',
+# 'sys/dev/usb/serial/uftdi_reg.h',
'sys/dev/usb/serial/usb_serial.h',
+ 'sys/sys/_termios.h',
+ 'sys/sys/cons.h',
+ 'sys/sys/serial.h',
+ 'sys/sys/timepps.h',
+ 'sys/sys/ttyqueue.h',
+ 'sys/sys/ttydefaults.h',
]
)
mod.addKernelSpaceSourceFiles(
[
- 'sys/dev/usb/serial/u3g.c',
- 'sys/dev/usb/serial/uark.c',
- 'sys/dev/usb/serial/ubsa.c',
- 'sys/dev/usb/serial/ubser.c',
- 'sys/dev/usb/serial/uchcom.c',
- 'sys/dev/usb/serial/ucycom.c',
- 'sys/dev/usb/serial/ufoma.c',
- 'sys/dev/usb/serial/uftdi.c',
- 'sys/dev/usb/serial/ugensa.c',
- 'sys/dev/usb/serial/uipaq.c',
- 'sys/dev/usb/serial/ulpt.c',
- 'sys/dev/usb/serial/umct.c',
- 'sys/dev/usb/serial/umodem.c',
- 'sys/dev/usb/serial/umoscom.c',
+# 'sys/dev/usb/serial/u3g.c',
+# 'sys/dev/usb/serial/uark.c',
+# 'sys/dev/usb/serial/ubsa.c',
+# 'sys/dev/usb/serial/ubser.c',
+# 'sys/dev/usb/serial/uchcom.c',
+# 'sys/dev/usb/serial/ucycom.c',
+# 'sys/dev/usb/serial/ufoma.c',
+# 'sys/dev/usb/serial/uftdi.c',
+# 'sys/dev/usb/serial/ugensa.c',
+# 'sys/dev/usb/serial/uipaq.c',
+# 'sys/dev/usb/serial/ulpt.c',
+# 'sys/dev/usb/serial/umct.c',
+# 'sys/dev/usb/serial/umodem.c',
+# 'sys/dev/usb/serial/umoscom.c',
'sys/dev/usb/serial/uplcom.c',
'sys/dev/usb/serial/usb_serial.c',
- 'sys/dev/usb/serial/uslcom.c',
- 'sys/dev/usb/serial/uvisor.c',
- 'sys/dev/usb/serial/uvscom.c',
+# 'sys/dev/usb/serial/uslcom.c',
+# 'sys/dev/usb/serial/uvisor.c',
+# 'sys/dev/usb/serial/uvscom.c',
+ 'sys/kern/tty.c',
+ 'sys/kern/tty_inq.c',
+ 'sys/kern/tty_outq.c',
+ 'sys/kern/tty_ttydisc.c',
],
mm.generator['source']()
)
@@ -2069,6 +2082,8 @@ def user_space(mm):
mod = builder.Module('user_space')
mod.addUserSpaceHeaderFiles(
[
+ 'bin/stty/extern.h',
+ 'bin/stty/stty.h',
'contrib/libxo/libxo/xo_buf.h',
'contrib/libxo/libxo/xo_encoder.h',
'contrib/libxo/libxo/xo.h',
@@ -2229,6 +2244,13 @@ def user_space(mm):
mod.addUserSpaceSourceFiles(
[
'bin/hostname/hostname.c',
+ 'bin/stty/cchar.c',
+ 'bin/stty/gfmt.c',
+ 'bin/stty/key.c',
+ 'bin/stty/modes.c',
+ 'bin/stty/print.c',
+ 'bin/stty/stty.c',
+ 'bin/stty/util.c',
'contrib/libxo/libxo/libxo.c',
'contrib/libxo/libxo/xo_encoder.c',
'lib/lib80211/lib80211_ioctl.c',
@@ -2926,6 +2948,13 @@ def tests(mm):
mod.addTest(mm.generator['test']('program01', ['test_main']))
mod.addTest(mm.generator['test']('commands01', ['test_main']))
mod.addTest(mm.generator['test']('usb01', ['init'], False))
+ mod.addTest(mm.generator['test']('usbserial', ['init'], False))
+ mod.addTest(mm.generator['test']('usbserial01', ['test_main'], False))
+ mod.addTest(mm.generator['test']('usbserial02', ['test_main'], False))
+ mod.addTest(mm.generator['test']('usbserial03', ['test_main'], False))
+ mod.addTest(mm.generator['test']('usbserial04', ['test_main'], False))
+ mod.addTest(mm.generator['test']('usbserial05', ['test_main'], False))
+ mod.addTest(mm.generator['test']('usbserial06', ['test_main'], False))
mod.addTest(mm.generator['test']('loopback01', ['test_main']))
mod.addTest(mm.generator['test']('netshell01', ['test_main', 'shellconfig'], False))
mod.addTest(mm.generator['test']('swi01', ['init', 'swi_test']))
@@ -3044,7 +3073,7 @@ def sources(mm):
#mm.addModule(dev_usb_bluetooth(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_wlan(mm))
mm.addModule(dev_wlan_rtwn(mm))
diff --git a/libbsd_waf.py b/libbsd_waf.py
index ecd87af..29f1787 100644
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -247,6 +247,13 @@ def build(bld):
libbsd_use += ["objs01"]
objs02_source = ['freebsd/bin/hostname/hostname.c',
+ 'freebsd/bin/stty/cchar.c',
+ 'freebsd/bin/stty/gfmt.c',
+ 'freebsd/bin/stty/key.c',
+ 'freebsd/bin/stty/modes.c',
+ 'freebsd/bin/stty/print.c',
+ 'freebsd/bin/stty/stty.c',
+ 'freebsd/bin/stty/util.c',
'freebsd/contrib/libxo/libxo/libxo.c',
'freebsd/contrib/libxo/libxo/xo_encoder.c',
'freebsd/lib/lib80211/lib80211_ioctl.c',
@@ -889,6 +896,8 @@ def build(bld):
'freebsd/sys/dev/usb/net/ruephy.c',
'freebsd/sys/dev/usb/net/usb_ethernet.c',
'freebsd/sys/dev/usb/quirk/usb_quirk.c',
+ 'freebsd/sys/dev/usb/serial/uplcom.c',
+ 'freebsd/sys/dev/usb/serial/usb_serial.c',
'freebsd/sys/dev/usb/storage/umass.c',
'freebsd/sys/dev/usb/usb_busdma.c',
'freebsd/sys/dev/usb/usb_core.c',
@@ -956,6 +965,10 @@ def build(bld):
'freebsd/sys/kern/sys_generic.c',
'freebsd/sys/kern/sys_pipe.c',
'freebsd/sys/kern/sys_socket.c',
+ 'freebsd/sys/kern/tty.c',
+ 'freebsd/sys/kern/tty_inq.c',
+ 'freebsd/sys/kern/tty_outq.c',
+ 'freebsd/sys/kern/tty_ttydisc.c',
'freebsd/sys/kern/uipc_accf.c',
'freebsd/sys/kern/uipc_domain.c',
'freebsd/sys/kern/uipc_mbuf.c',
@@ -1273,11 +1286,13 @@ def build(bld):
'rtemsbsd/rtems/rtems-bsd-shell-pfctl.c',
'rtemsbsd/rtems/rtems-bsd-shell-ping.c',
'rtemsbsd/rtems/rtems-bsd-shell-route.c',
+ 'rtemsbsd/rtems/rtems-bsd-shell-stty.c',
'rtemsbsd/rtems/rtems-bsd-shell-sysctl.c',
'rtemsbsd/rtems/rtems-bsd-shell-tcpdump.c',
'rtemsbsd/rtems/rtems-bsd-shell-vmstat.c',
'rtemsbsd/rtems/rtems-bsd-shell-wlanstats.c',
'rtemsbsd/rtems/rtems-bsd-syscall-api.c',
+ 'rtemsbsd/rtems/rtems-bsd-termios.c',
'rtemsbsd/rtems/rtems-kernel-assert.c',
'rtemsbsd/rtems/rtems-kernel-autoconf.c',
'rtemsbsd/rtems/rtems-kernel-bus-dma-mbuf.c',
@@ -1328,6 +1343,7 @@ def build(bld):
'rtemsbsd/sys/dev/usb/controller/usb_otg_transceiver.c',
'rtemsbsd/sys/dev/usb/controller/usb_otg_transceiver_dump.c',
'rtemsbsd/sys/fs/devfs/devfs_devs.c',
+ 'rtemsbsd/sys/fs/devfs/devfs_vnops.c',
'rtemsbsd/sys/net/if_ppp.c',
'rtemsbsd/sys/net/ppp_tty.c',
'rtemsbsd/telnetd/check_passwd.c',
@@ -1787,6 +1803,76 @@ def build(bld):
lib = ["m", "z"],
install_path = None)
+ test_usbserial = ['testsuite/usbserial/init.c']
+ bld.program(target = "usbserial.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial01 = ['testsuite/usbserial01/test_main.c']
+ bld.program(target = "usbserial01.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial01,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial02 = ['testsuite/usbserial02/test_main.c']
+ bld.program(target = "usbserial02.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial02,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial03 = ['testsuite/usbserial03/test_main.c']
+ bld.program(target = "usbserial03.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial03,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial04 = ['testsuite/usbserial04/test_main.c']
+ bld.program(target = "usbserial04.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial04,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial05 = ['testsuite/usbserial05/test_main.c']
+ bld.program(target = "usbserial05.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial05,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
+ test_usbserial06 = ['testsuite/usbserial06/test_main.c']
+ bld.program(target = "usbserial06.exe",
+ features = "cprogram",
+ cflags = cflags,
+ includes = includes,
+ source = test_usbserial06,
+ use = ["bsd"],
+ lib = ["m", "z"],
+ install_path = None)
+
test_vlan01 = ['testsuite/vlan01/test_main.c']
bld.program(target = "vlan01.exe",
features = "cprogram",
--
1.9.1
More information about the devel
mailing list