mounting usb stick

Ja'far Railton ibn.richard at gmail.com
Sat Nov 18 23:20:29 PST 2006


I have now updated to HEAD and tried to apply the usb.diff8 patch and
build a new kernel. I did 'patch <usb.diff8' in the ../bus/usb src file,
newly cvsup-ed. Well, the patch had a problem, generating this
Oops.rej file:


@@ -216,6 +216,11 @@
 	usbd_status err;
 	int conf;
 
+	if (bootverbose) {
+		device_printf(self, "vendor: 0x%04x, product: 0x%04x\n",
+			      uaa->vendor, uaa->product);
+	}
+
 	usbd_devinfo(uaa->device, 0, devinfo);
 	USB_ATTACH_SETUP;
 	printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
@@ -1350,12 +1355,16 @@
 		return (error);
 	}
 	case USB_GET_STRING_DESC:
+	{
+		int size;
+
 		si = (struct usb_string_desc *)addr;
 		err = usbd_get_string_desc(sc->sc_udev, si->usd_string_index,
-			  si->usd_language_id, &si->usd_desc);
+			  si->usd_language_id, &si->usd_desc, &size);
 		if (err)
 			return (EINVAL);
 		break;
+	}
 	case USB_DO_REQUEST:
 	{
 		struct usb_ctl_request *ur = (void *)addr;

So, when I 'make buildkernel' I get this error (unsurprisingly):


awk -f /usr/src/sys/tools/makeobjops.awk -- -c /usr/src/sys/bus/usb/usb_if.m;  cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline
-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  usb_if.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/uhci.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/uhci_pci.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/ohci.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/ohci_pci.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usb.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usbdi.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usbdi_util.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usb_ethersubr.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usb_mem.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usb_subr.c
cc -c -O -pipe -mtune=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -ansi -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20050309/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -
fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/bus/usb/usb_quirks.c
/usr/src/sys/bus/usb/usb_quirks.c:108: error: `USB_PRODUCT_MGE_UPS1' undeclared here (not in a function)
/usr/src/sys/bus/usb/usb_quirks.c:108: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:108: error: (near initialization for `usb_quirks[30].idProduct')
/usr/src/sys/bus/usb/usb_quirks.c:109: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:109: error: (near initialization for `usb_quirks[30].quirks')
/usr/src/sys/bus/usb/usb_quirks.c:109: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:109: error: (near initialization for `usb_quirks[30]')
/usr/src/sys/bus/usb/usb_quirks.c:110: error: `USB_PRODUCT_MGE_UPS2' undeclared here (not in a function)
/usr/src/sys/bus/usb/usb_quirks.c:110: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:110: error: (near initialization for `usb_quirks[31].idProduct')
/usr/src/sys/bus/usb/usb_quirks.c:111: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:111: error: (near initialization for `usb_quirks[31].quirks')
/usr/src/sys/bus/usb/usb_quirks.c:111: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:111: error: (near initialization for `usb_quirks[31]')
/usr/src/sys/bus/usb/usb_quirks.c:112: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:112: error: (near initialization for `usb_quirks[32].quirks')
/usr/src/sys/bus/usb/usb_quirks.c:112: error: initializer element is not constant
/usr/src/sys/bus/usb/usb_quirks.c:112: error: (near initialization for `usb_quirks[32]')
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

Can someone please help with getting the patch working and trying again
to mount this usb stick? TIA

	-jr





More information about the Users mailing list