Date: Sat, 23 Nov 2013 02:38:07 +0700 (NOVT) From: Eugene Grosbein <eugen@grosbein.net> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/184176: [patch] [vimage] [kern] introduce new src.conf knob WITH_VIMAGE Message-ID: <201311221938.rAMJc7jI002634@grosbein.net> Resent-Message-ID: <201311221940.rAMJe3BU091035@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184176 >Category: kern >Synopsis: [patch] [vimage] [kern] introduce new src.conf knob WITH_VIMAGE >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: Fri Nov 22 19:40:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 9.2-STABLE amd64 >Organization: RDTC JSC >Environment: System: FreeBSD grosbein.net 9.2-STABLE FreeBSD 9.2-STABLE #8 r256953M: Sat Nov 23 01:01:28 NOVT 2013 root@grosbein.net:/usr/obj/usr/local/src/sys/DADV amd64 >Description: Kernel modules ng_ether.ko and ng_gif.ko cannot be loaded if kernel is built with options VIMAGE and modules are built outside of kernel build enviroment (e.g. nanobsd & MODULES_WITH_WORLD): # kldload ng_ether kldload: can't load ng_ether: Exec format error kernel: link_elf_obj: symbol ifnet undefined kernel: linker_load_file: Unsupported file type >How-To-Repeat: See above. >Fix: Introduce new src.conf knob WITH_VIMAGE so modules can be built for such kernel and loaded successfully. --- tools/build/options/WITH_VIMAGE.orig 2013-11-23 01:35:41.000000000 +0700 +++ tools/build/options/WITH_VIMAGE 2013-11-23 01:35:14.000000000 +0700 @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build with the VIMAGE support. --- share/mk/bsd.own.mk.orig 2013-10-21 21:02:06.000000000 +0700 +++ share/mk/bsd.own.mk 2013-11-23 02:08:02.000000000 +0700 @@ -450,7 +450,8 @@ NMTREE \ OFED \ OPENSSH_NONE_CIPHER \ - SHARED_TOOLCHAIN + SHARED_TOOLCHAIN \ + VIMAGE # # Default behaviour of some options depends on the architecture. Unfortunately --- sys/modules/netgraph/ether/Makefile.orig 2013-11-23 01:22:58.000000000 +0700 +++ sys/modules/netgraph/ether/Makefile 2013-11-23 02:18:37.000000000 +0700 @@ -4,3 +4,9 @@ SRCS= ng_ether.c .include <bsd.kmod.mk> + +.if !defined(KERNBUILDDIR) +.if ${MK_VIMAGE} != "no" +CFLAGS+= -DVIMAGE +.endif +.endif --- modules/netgraph/gif/Makefile.orig 2013-04-07 01:07:05.000000000 +0700 +++ modules/netgraph/gif/Makefile 2013-11-23 02:30:26.000000000 +0700 @@ -12,3 +12,9 @@ .endif .include <bsd.kmod.mk> + +.if !defined(KERNBUILDDIR) +.if ${MK_VIMAGE} != "no" +CFLAGS+= -DVIMAGE +.endif +.endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311221938.rAMJc7jI002634>