From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 22 19:40:03 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9545CEB6 for ; Fri, 22 Nov 2013 19:40:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73DB029D4 for ; Fri, 22 Nov 2013 19:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rAMJe3jV091036 for ; Fri, 22 Nov 2013 19:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rAMJe3BU091035; Fri, 22 Nov 2013 19:40:03 GMT (envelope-from gnats) Resent-Date: Fri, 22 Nov 2013 19:40:03 GMT Resent-Message-Id: <201311221940.rAMJe3BU091035@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, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F3FCDC0 for ; Fri, 22 Nov 2013 19:38:47 +0000 (UTC) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7D5029C1 for ; Fri, 22 Nov 2013 19:38:46 +0000 (UTC) Received: from grosbein.net (188-123-32-240.rdtc.ru [188.123.32.240] (may be forged)) by eg.sd.rdtc.ru (8.14.7/8.14.7) with ESMTP id rAMJc8iF067947 for ; Sat, 23 Nov 2013 02:38:33 +0700 (NOVT) (envelope-from eugen@grosbein.net) Received: from grosbein.net (localhost [127.0.0.1]) by grosbein.net (8.14.7/8.14.7) with ESMTP id rAMJc8KI002635; Sat, 23 Nov 2013 02:38:08 +0700 (NOVT) (envelope-from eugen@grosbein.net) Received: (from eugen@localhost) by grosbein.net (8.14.7/8.14.7/Submit) id rAMJc7jI002634; Sat, 23 Nov 2013 02:38:07 +0700 (NOVT) (envelope-from eugen) Message-Id: <201311221938.rAMJc7jI002634@grosbein.net> Date: Sat, 23 Nov 2013 02:38:07 +0700 (NOVT) From: Eugene Grosbein To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: kern/184176: [patch] [vimage] [kern] introduce new src.conf knob WITH_VIMAGE X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list Reply-To: Eugene Grosbein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2013 19:40:03 -0000 >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 + +.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 + +.if !defined(KERNBUILDDIR) +.if ${MK_VIMAGE} != "no" +CFLAGS+= -DVIMAGE +.endif +.endif >Release-Note: >Audit-Trail: >Unformatted: