From owner-freebsd-bugs@FreeBSD.ORG Thu Apr 27 19:30:14 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F71016A414 for ; Thu, 27 Apr 2006 19:30:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1331843D55 for ; Thu, 27 Apr 2006 19:30:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k3RJUBcP072935 for ; Thu, 27 Apr 2006 19:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k3RJUBTB072931; Thu, 27 Apr 2006 19:30:11 GMT (envelope-from gnats) Resent-Date: Thu, 27 Apr 2006 19:30:11 GMT Resent-Message-Id: <200604271930.k3RJUBTB072931@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Millan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C35AE16A403 for ; Thu, 27 Apr 2006 19:24:28 +0000 (UTC) (envelope-from rmh@io.debian.net) Received: from io.debian.net (io.ethz.ch [129.132.80.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 359B043D48 for ; Thu, 27 Apr 2006 19:24:28 +0000 (GMT) (envelope-from rmh@io.debian.net) Received: from rmh by io.debian.net with local (Exim 4.61) (envelope-from ) id 1FZC6E-0002QD-KA for FreeBSD-gnats-submit@freebsd.org; Thu, 27 Apr 2006 21:24:26 +0200 Message-Id: Date: Thu, 27 Apr 2006 21:24:26 +0200 From: Robert Millan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/96429: kern_linker.c hardcodes "/boot/kernel" instead of using KODIR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Robert Millan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 19:30:16 -0000 >Number: 96429 >Category: kern >Synopsis: kern_linker.c hardcodes "/boot/kernel" instead of using KODIR >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 27 19:30:11 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Robert Millan >Release: GNU/kFreeBSD 5.4-1-586 i586 >Organization: >Environment: System: GNU/kFreeBSD io.debian.net 5.4-1-586 #0 Mon Dec 5 19:45:10 CET 2005 i586 i386 AMD-K6(tm) 3D processor GNU/kFreeBSD Architecture: i586 >Description: KODIR can be used to override the directory in which modules are installed, but the kernel will always look for them in /boot/kernel/ no matter what. I think it should look in the same dir where they were installed. >How-To-Repeat: >Fix: diff -ur sys.old/conf/kern.pre.mk sys/conf/kern.pre.mk --- sys.old/conf/kern.pre.mk 2006-04-27 11:12:03.000000000 +0200 +++ sys/conf/kern.pre.mk 2006-04-27 13:04:47.000000000 +0200 @@ -68,7 +68,7 @@ INCLUDES+= -I$S/dev/twa CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} -CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h +CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -DKODIR=\"${KODIR}\" -include opt_global.h .if ${CC} != "icc" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 diff -ur sys.old/kern/kern_linker.c sys/kern/kern_linker.c --- sys.old/kern/kern_linker.c 2006-04-27 11:10:52.000000000 +0200 +++ sys/kern/kern_linker.c 2006-04-27 13:05:50.000000000 +0200 @@ -1383,7 +1383,7 @@ */ static char linker_hintfile[] = "linker.hints"; -static char linker_path[MAXPATHLEN] = "/boot/kernel;/boot/modules"; +static char linker_path[MAXPATHLEN] = KODIR ";/boot/modules"; SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path, sizeof(linker_path), "module load search path"); >Release-Note: >Audit-Trail: >Unformatted: