Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Mar 2010 23:54:09 GMT
From:      Alexander Best <alexbestms@wwu.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   usb/144751: [ukbd] [usb8] kernel without keyboard support won't compile
Message-ID:  <201003142354.o2ENs9Pq080899@www.freebsd.org>
Resent-Message-ID: <201003150000.o2F00JTW016713@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003142354.o2ENs9Pq080899>