From owner-freebsd-usb@FreeBSD.ORG Mon Mar 15 00:00:20 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E3D0106564A for ; Mon, 15 Mar 2010 00:00:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DE6D58FC16 for ; Mon, 15 Mar 2010 00:00:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2F00JoF016714 for ; Mon, 15 Mar 2010 00:00:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2F00JTW016713; Mon, 15 Mar 2010 00:00:19 GMT (envelope-from gnats) Resent-Date: Mon, 15 Mar 2010 00:00:19 GMT Resent-Message-Id: <201003150000.o2F00JTW016713@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Best Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0D21065670 for ; Sun, 14 Mar 2010 23:54:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 7CB338FC17 for ; Sun, 14 Mar 2010 23:54:09 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ENs9ol080901 for ; Sun, 14 Mar 2010 23:54:09 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o2ENs9Pq080899; Sun, 14 Mar 2010 23:54:09 GMT (envelope-from nobody) Message-Id: <201003142354.o2ENs9Pq080899@www.freebsd.org> Date: Sun, 14 Mar 2010 23:54:09 GMT From: Alexander Best To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/144751: [ukbd] [usb8] kernel without keyboard support won't compile X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 00:00:20 -0000 >Number: 144751 >Category: usb >Synopsis: [ukbd] [usb8] kernel without keyboard support won't compile >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 15 00:00:19 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Alexander Best >Release: 9.0-CURRENT >Organization: >Environment: FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #8 r205019M: Thu Mar 11 21:03:33 CET 2010 root@otaku:/usr/obj/usr/src/sys/ARUNDEL amd64 >Description: trying to compile a kernel with no usb keyboard support results in the following error during kernel compilation: cc -c -O0 -pipe -fno-builtin -march=native -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector vnode_if.c :> hack.c cc -shared -nostdlib hack.c -o hack.So rm -f hack.c MAKE=make sh /usr/src/sys/conf/newvers.sh ARUNDEL cc -c -O0 -pipe -fno-builtin -march=native -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector vers.c linking kernel kbd.o(.text+0x59b): In function `kbd_register': : undefined reference to `__start_set_kbddriver_set' kbd.o(.text+0x686): In function `kbd_register': : undefined reference to `__stop_set_kbddriver_set' kbd.o(.text+0x842): In function `kbd_get_switch': : undefined reference to `__start_set_kbddriver_set' kbd.o(.text+0x87f): In function `kbd_get_switch': : undefined reference to `__stop_set_kbddriver_set' kbd.o(.text+0xdf8): In function `kbd_configure': : undefined reference to `__start_set_kbddriver_set' kbd.o(.text+0xe2c): In function `kbd_configure': : undefined reference to `__stop_set_kbddriver_set' *** Error code 1 Stop in /usr/obj/usr/src/sys/ARUNDEL. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. cheers. alex >How-To-Repeat: use the attached kernel conf to compile a new kernel. >Fix: since the atkbd driver cannot be compiled as a kernel module it's obvious that having no keyboard defined in the kernel conf should make the kernel rely on the ukbd module. if however the use of the ukb driver as module is unsupported this problem report should be considered a change request to the ukbd(4) manual to reflect the mandatory definition of ukbd in the kernel conf. Patch attached with submission follows: # debugger/ktrace/kernel.debug options KDB # Compile with kernel debugger related code. options DDB # Enable the ddb debugger backend. options KTRACE # ktrace(1) support makeoptions DEBUG="-g" # Build kernel with gdb(1) debug symbols # various debugging options #options KDB_TRACE # Print a stack trace of the current thread on the console for a panic. #options PREEMPTION # Allows the threads that are in the kernel to be preempted by higher priority [interrupt] threads. #options IPI_PREEMPTION # Instructs the kernel to preempt threads running on other CPUS if needed. Relies on the PREEMPTION option. #options BREAK_TO_DEBUGGER # A BREAK on a serial console goes to ddb, if available. #options INVARIANTS #options INVARIANT_SUPPORT #options WITNESS #options DEBUG_LOCKS #options DEBUG_VFS_LOCKS #options DIAGNOSTIC #options SW_WATCHDOG #options SOCKBUF_DEBUG #options DEBUG_MEMGUARD #options DEBUG_REDZONE #options STACK options DEADLKRES # Add the software deadlock resolver thread. cpu HAMMER ident ARUNDEL #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options LIBICONV # Kernel side iconv library options CD9660 # ISO 9660 filesystem options CD9660_ICONV options MSDOSFS # MS DOS File System (FAT, FAT32) options MSDOSFS_ICONV options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_DIRHASH # Improve performance on big directories options COMPAT_FREEBSD32 # Compatible with i386 binaries #options COMPAT_LINUX # Enable Linux ABI emulation #options COMPAT_FREEBSD7 #options LINPROCFS # Enable the linux-like proc filesystem support #options LINSYSFS # Enable the linux-like sys filesystem support options SC_HISTORY_SIZE=1000 # number of history buffer lines options MSGBUF_SIZE=65536 # Size of the kernel message buffer. Should be N * pagesize. options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX semaphores options P1003_1B_MQUEUE # POSIX message queue options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions #options KBD_INSTALL_CDEV # install a CDEV entry in /dev #options UKBD_DFLT_KEYMAP # specify the built-in keymap #makeoptions UKBD_DFLT_KEYMAP="german.iso" options SMP # Symmetric MultiProcessor Kernel options PRINTF_BUFR_SIZE=128 #device apic # I/O APIC #devices #device eisa device pci device acpi device atacore device ahci device atajmicron #device ataintel device atapci #device atadisk device atapicd #options ATA_STATIC_ID device vga device sc #usb device usb device uhci device ehci #device ukbd device ulpt #device ums #device uhid option USB_VERBOSE #network device wlan device ath device ath_hal options AH_SUPPORT_AR5416 device ath_rate_sample device wlan_wep device wlan_ccmp device wlan_tkip device bpf #options IEEE80211_DEBUG #options ATH_DEBUG #options ALTQ #options ALTQ_CBQ # Class Bases Queuing (CBQ) #options ALTQ_RED # Random Early Detection (RED) #options ALTQ_RIO # RED In/Out #options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) #options ALTQ_PRIQ # Priority Queuing (PRIQ) #options ALTQ_NOPCC # Wird von SMP benötigt #cpu device cpufreq device coretemp #pseudo devices device loop device ether device pty device md #misc #device ppc #device ppbus #device ppi device umass device scbus device cd device pass device da #device atapicam device sound device snd_hda device random #options DIRECTIO #GEOM options GEOM_LABEL options GEOM_PART_GPT #options GEOM_PART_MBR #device iicbus #device iic # VESA stuff #options VESA #options VGA_WIDTH90 #options SC_PIXEL_MODE # ATA to CAM options ATA_CAM #options CAMDEBUG #options CAM_DEBUG_BUS=2 #options CAM_DEBUG_TARGET=1 #options CAM_DEBUG_LUN=0 #options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_TRACE|CAM_DEBUG_CDB) >Release-Note: >Audit-Trail: >Unformatted: