Date: Thu, 27 Apr 2006 21:24:26 +0200 From: Robert Millan <rmh@aybabtu.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/96429: kern_linker.c hardcodes "/boot/kernel" instead of using KODIR Message-ID: <E1FZC6E-0002QD-KA@io.debian.net> Resent-Message-ID: <200604271930.k3RJUBTB072931@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1FZC6E-0002QD-KA>
