From d8113615f9e7482478c23b6d831c03b9abda4546 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 15 Aug 2003 01:19:54 +0000 Subject: [PATCH] Make modules work again part 1: wire up the module build for bus/ --- sys/bus/Makefile | 6 +++++ sys/bus/cam/Makefile | 6 +++++ sys/bus/cam/scsi/Makefile | 3 +-- sys/bus/canbus/Makefile | 3 +-- sys/bus/firewire/Makefile | 4 +-- sys/bus/pccard/pccbb/Makefile | 5 ++-- sys/bus/usb/Makefile | 10 +++++--- sys/bus/usb/devlist2h.awk | 29 +++------------------ sys/bus/usb/usbdevs | 6 ++--- sys/bus/usb/usbdevs.h | 11 ++++---- sys/bus/usb/usbdevs_data.h | 47 ++++++++++++++++++++++++++++++----- 11 files changed, 77 insertions(+), 53 deletions(-) create mode 100644 sys/bus/Makefile create mode 100644 sys/bus/cam/Makefile diff --git a/sys/bus/Makefile b/sys/bus/Makefile new file mode 100644 index 0000000000..c6b9659051 --- /dev/null +++ b/sys/bus/Makefile @@ -0,0 +1,6 @@ +# $DragonFly: src/sys/bus/Makefile,v 1.1 2003/08/15 01:19:44 dillon Exp $ +# + +SUBDIR=cam canbus firewire + +.include diff --git a/sys/bus/cam/Makefile b/sys/bus/cam/Makefile new file mode 100644 index 0000000000..0dd16fd810 --- /dev/null +++ b/sys/bus/cam/Makefile @@ -0,0 +1,6 @@ +# $DragonFly: src/sys/bus/cam/Makefile,v 1.1 2003/08/15 01:19:45 dillon Exp $ +# + +SUBDIR=scsi + +.include diff --git a/sys/bus/cam/scsi/Makefile b/sys/bus/cam/scsi/Makefile index 08a45f2a31..73d64b8339 100644 --- a/sys/bus/cam/scsi/Makefile +++ b/sys/bus/cam/scsi/Makefile @@ -1,7 +1,6 @@ # $FreeBSD: src/sys/modules/scsi_low/Makefile,v 1.1.2.1 2001/12/17 13:32:31 non Exp $ -# $DragonFly: src/sys/bus/cam/scsi/Makefile,v 1.2 2003/06/17 04:28:46 dillon Exp $ +# $DragonFly: src/sys/bus/cam/scsi/Makefile,v 1.3 2003/08/15 01:19:46 dillon Exp $ -.PATH: ${.CURDIR}/../../cam/scsi KMOD= scsi_low SRCS= scsi_low.c scsi_low_pisa.c SRCS+= opt_ddb.h opt_scsi.h opt_cam.h bus_if.h device_if.h diff --git a/sys/bus/canbus/Makefile b/sys/bus/canbus/Makefile index c23a36c373..c4179a2f01 100644 --- a/sys/bus/canbus/Makefile +++ b/sys/bus/canbus/Makefile @@ -1,7 +1,6 @@ # $FreeBSD: src/sys/modules/canbus/Makefile,v 1.1.2.1 2003/02/10 13:11:51 nyan Exp $ -# $DragonFly: src/sys/bus/canbus/Attic/Makefile,v 1.2 2003/06/17 04:28:43 dillon Exp $ +# $DragonFly: src/sys/bus/canbus/Attic/Makefile,v 1.3 2003/08/15 01:19:47 dillon Exp $ -.PATH: ${.CURDIR}/../../pc98/pc98 KMOD = canbus SRCS = canbus.c SRCS += device_if.h bus_if.h canbus_if.h canbus_if.c diff --git a/sys/bus/firewire/Makefile b/sys/bus/firewire/Makefile index d5655dad92..ab34ea6500 100644 --- a/sys/bus/firewire/Makefile +++ b/sys/bus/firewire/Makefile @@ -1,10 +1,8 @@ # $FreeBSD: src/sys/modules/firewire/firewire/Makefile,v 1.2.2.5 2003/04/28 03:29:19 simokawa Exp $ -# $DragonFly: src/sys/bus/firewire/Makefile,v 1.2 2003/06/17 04:28:44 dillon Exp $ +# $DragonFly: src/sys/bus/firewire/Makefile,v 1.3 2003/08/15 01:19:50 dillon Exp $ # Makefile for the IEEE1394 OHCI chipset -.PATH: ${.CURDIR}/../../../dev/firewire - KMOD= firewire SRCS = bus_if.h device_if.h pci_if.h \ firewire.c firewire.h firewire_phy.h firewirereg.h \ diff --git a/sys/bus/pccard/pccbb/Makefile b/sys/bus/pccard/pccbb/Makefile index 6d3fcdad93..58a2d09625 100644 --- a/sys/bus/pccard/pccbb/Makefile +++ b/sys/bus/pccard/pccbb/Makefile @@ -1,7 +1,8 @@ # $FreeBSD: src/sys/modules/cbb/Makefile,v 1.2 1999/11/28 18:52:41 bde Exp $ -# $DragonFly: src/sys/bus/pccard/pccbb/Attic/Makefile,v 1.2 2003/06/17 04:28:43 dillon Exp $ +# $DragonFly: src/sys/bus/pccard/pccbb/Attic/Makefile,v 1.3 2003/08/15 01:19:54 dillon Exp $ +# +# XXX disabled, no pccbb.c to be found. -.PATH: ${.CURDIR}/../../pci KMOD= cbb SRCS= pccbb.c \ device_if.h bus_if.h diff --git a/sys/bus/usb/Makefile b/sys/bus/usb/Makefile index eff02c1047..87b2429f05 100644 --- a/sys/bus/usb/Makefile +++ b/sys/bus/usb/Makefile @@ -1,7 +1,7 @@ # The files usbdevs.h and usbdevs_data.h are generated from usbdevs # # $FreeBSD: src/sys/dev/usb/Makefile.usbdevs,v 1.1.2.2 2000/05/07 14:36:41 n_hibma Exp $ -# $DragonFly: src/sys/bus/usb/Makefile,v 1.2 2003/06/17 04:28:32 dillon Exp $ +# $DragonFly: src/sys/bus/usb/Makefile,v 1.3 2003/08/15 01:19:54 dillon Exp $ AWK= awk UNAME= uname @@ -9,9 +9,13 @@ RM= rm # The targets are always remade. -.PHONY= all +.PHONY= regen -all: usbdevs devlist2h.awk +all: + @echo "Only the 'regen' target may be used to regenerate the" + @echo "usbdevs.h and usbdevs_data.h header files" + +regen: usbdevs devlist2h.awk /bin/rm -f usbdevs.h usbdevs_data.h ${AWK} -v type=USB -v os=`${UNAME} -s` -f devlist2h.awk usbdevs diff --git a/sys/bus/usb/devlist2h.awk b/sys/bus/usb/devlist2h.awk index 091f282ff3..8629d9e0bf 100644 --- a/sys/bus/usb/devlist2h.awk +++ b/sys/bus/usb/devlist2h.awk @@ -1,7 +1,7 @@ #! /usr/bin/awk -f # $NetBSD: devlist2h.awk,v 1.6 1999/08/17 16:06:20 augustss Exp $ # $FreeBSD: src/sys/dev/usb/devlist2h.awk,v 1.1 1999/11/18 18:02:44 n_hibma Exp $ -# $DragonFly: src/sys/bus/usb/Attic/devlist2h.awk,v 1.2 2003/06/17 04:28:32 dillon Exp $ +# $DragonFly: src/sys/bus/usb/Attic/devlist2h.awk,v 1.3 2003/08/15 01:19:54 dillon Exp $ # # Copyright (c) 1995, 1996 Christopher G. Demetriou # All rights reserved. @@ -37,42 +37,19 @@ BEGIN { hfile="usbdevs.h" } NR == 1 { - VERSION = $0 - gsub("\\$", "", VERSION) - - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > dfile - else if (os == "FreeBSD") - printf("/*\t\$FreeBSD\$\t*/\n\n") > dfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile - else - printf("/* ??? */\n\n") > dfile printf("/*\n") > dfile + printf(" *\t\$DragonFly\$\n *\n") > dfile printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > dfile printf(" *\n") > dfile - printf(" * generated from:\n") > dfile - printf(" *\t%s\n", VERSION) > dfile printf(" */\n") > dfile - if (os == "NetBSD") - printf("/*\t\$NetBSD\$\t*/\n\n") > hfile - else if (os == "FreeBSD") - printf("/*\t\$FreeBSD\$\t*/\n\n") > hfile - else if (os == "OpenBSD") - printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile - else - printf("/* ??? */\n\n") > hfile printf("/*\n") > hfile + printf(" *\t\$DragonFly\$\n *\n") > hfile printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile printf(" *\n") > hfile - printf(" * generated from:\n") > hfile - printf(" *\t%s\n", VERSION) > hfile printf(" */\n") > hfile - - next } $1 == "vendor" { nvendors++ diff --git a/sys/bus/usb/usbdevs b/sys/bus/usb/usbdevs index 2524a9ad97..e205fcd473 100644 --- a/sys/bus/usb/usbdevs +++ b/sys/bus/usb/usbdevs @@ -1,6 +1,3 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp $ -$DragonFly: src/sys/bus/usb/Attic/usbdevs,v 1.2 2003/06/17 04:28:32 dillon Exp $ - /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,6 +33,9 @@ $DragonFly: src/sys/bus/usb/Attic/usbdevs,v 1.2 2003/06/17 04:28:32 dillon Exp $ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp $ + * $DragonFly: src/sys/bus/usb/Attic/usbdevs,v 1.3 2003/08/15 01:19:54 dillon Exp $ */ /* diff --git a/sys/bus/usb/usbdevs.h b/sys/bus/usb/usbdevs.h index 0bb696356f..ae4f787b93 100644 --- a/sys/bus/usb/usbdevs.h +++ b/sys/bus/usb/usbdevs.h @@ -1,13 +1,9 @@ -/* $FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.32.2.40 2003/06/14 15:56:48 trhodes Exp $ */ -/* $DragonFly: src/sys/bus/usb/Attic/usbdevs.h,v 1.2 2003/06/17 04:28:32 dillon Exp $ */ - /* + * $DragonFly: src/sys/bus/usb/Attic/usbdevs.h,v 1.3 2003/08/15 01:19:54 dillon Exp $ + * * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * - * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp */ - /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -43,6 +39,9 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp $ + * $DragonFly: src/sys/bus/usb/Attic/usbdevs.h,v 1.3 2003/08/15 01:19:54 dillon Exp $ */ /* diff --git a/sys/bus/usb/usbdevs_data.h b/sys/bus/usb/usbdevs_data.h index 2438187f40..5d8339ff3f 100644 --- a/sys/bus/usb/usbdevs_data.h +++ b/sys/bus/usb/usbdevs_data.h @@ -1,13 +1,9 @@ -/* $FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.32.2.40 2003/06/14 15:56:48 trhodes Exp $ */ -/* $DragonFly: src/sys/bus/usb/Attic/usbdevs_data.h,v 1.2 2003/06/17 04:28:32 dillon Exp $ */ - /* + * $DragonFly: src/sys/bus/usb/Attic/usbdevs_data.h,v 1.3 2003/08/15 01:19:54 dillon Exp $ + * * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * - * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp */ - /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -43,6 +39,45 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.42 2003/05/11 00:12:29 murray Exp $ + * $DragonFly: src/sys/bus/usb/Attic/usbdevs_data.h,v 1.3 2003/08/15 01:19:54 dillon Exp $ + */ + +/* + * List of known USB vendors + * + * Adding an ID and its string description for a device to the usbdevs file, + * enables the USB stack to print a useful description of the device that was + * connected. + * + * The ID should be added in usbdevs and then the files usbdevs.h and + * usbdevs_data.h need to be regenerated. + * + * # edit usbdevs + * make -f Makefile.usbdevs + * # test your change + * cd ../../modules/usb + * make + * # commit, if appropriate + * cvs -m "ID for device XYZ" commit usbdevs + * # commit the derived files after the $ FreeBSD $ has been updated. + * cvs commit usbdevs.h usbdevs_data.h + * + * Please note that these IDs do not do anything. Adding an ID here and + * regenerating the usbdevs.h and usbdevs_data.h only makes a symbolic name + * available to the source code and does not change any functionality, nor + * does it make your device available to a specific driver. + * It will however make the descriptive string available if a device does not + * provide the string itself. + * + * After adding a vendor ID VNDR and a product ID PRDCT you will have the + * following extra defines: + * #define USB_VENDOR_VNDR 0x???? + * #define USB_PRODUCT_VNDR_PRDCT 0x???? + * + * You may have to add these defines to the respective probe routines to + * make the device recognised by the appropriate device driver. */ struct usb_knowndev usb_knowndevs[] = { -- 2.41.0