From gehicks@gehicks.dyndns.org  Sat Jun 29 19:40:48 2002
Return-Path: <gehicks@gehicks.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 478AB37B400; Sat, 29 Jun 2002 19:40:48 -0700 (PDT)
Received: from gehicks.dyndns.org (adsl-20-176-172.asm.bellsouth.net [66.20.176.172])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 9CEF343E0A; Sat, 29 Jun 2002 19:40:47 -0700 (PDT)
	(envelope-from gehicks@gehicks.dyndns.org)
Received: from gehicks.dyndns.org (gehicks@localhost [127.0.0.1])
	by gehicks.dyndns.org (8.12.5/8.12.5) with ESMTP id g5U2mCWf003155;
	Sun, 30 Jun 2002 02:48:12 GMT
	(envelope-from gehicks@gehicks.dyndns.org)
Message-Id: <3D1E716C.3E8DDC5F@gehicks.dyndns.org>
Date: Sun, 30 Jun 2002 02:48:12 +0000
From: W Gerald Hicks <gehicks@gehicks.dyndns.org>
Sender: gehicks@gehicks.dyndns.org
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: Ian Dowse <iedowse@maths.tcd.ie>, freebsd-small@FreeBSD.org
Subject: [patch] use ld(1) to build kernel with linked-in md(4) filesys

>Number:         40026
>Category:       kern
>Synopsis:       [patch] use ld(1) to build kernel with linked-in md(4) filesys
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 29 19:50:01 PDT 2002
>Closed-Date:    Mon Jul 01 08:29:38 PDT 2002
>Last-Modified:  Mon Jul 01 08:29:38 PDT 2002
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 > The patch seems to remove rather than deprecate the MD_ROOT_SIZE code.
 
 Oops, wrong choice of words.  Yes, it's intended to replace the
 MD_ROOT_SIZE
 feature and any need for a write_mfs_in_kernel program.  
 
 I wasn't clear about what this patch is for right now.  I don't want to
 ask to have it committed right away.  It is one of a few prerequisite
 patches I
 am preparing to do some work on PicoBSD and needed to post this so
 others
 will be able to get the subsequent patches to build.
 
 > Is there a good reason not just leave it there and add the new option.
 
 I suppose I could have set a -DMD_ROOT_IMAGE when 'makeoption
 MD_ROOT_IMAGE='
 is specified but otherwise it seems hard to relate 'options' with
 'makeoptions'.  
 
 > The new approach requires that you have the image available at the time
 that the kernel is compiled, so for some applications it is less
 flexible (...)
 
 Well, not exactly.  This patch is only the first piece of a scheme :-)
 
 kern/40017 is related to this effort.  It allows us to use modified
 kernel
 build metadata (sys/conf) for specialized applications.  Using this
 facility
 I am going to provide further patches which allow incremental linking.
 
 These changes are pretty far-reaching and I was afraid of taking them
 straight to src/sys/conf directly. kern/40017 allows us to use something
 like
 /usr/local/src/picobsd/conf to implement extra build steps from private
 specialized versions of the kern.pre.mk and kern.post.mk files.
 
 The picobsd/conf example will implement another couple of makeoptions:
 
 makeoptions RLINK_KERNEL="/mykernels/kernel-foo-v1.rel"
 makeoptions RLINK_KERNEL_OBJS="/tmp/foo.o"
 
 There are two new kernel build targets used for these options:
 
 make prelim   # build a partially linked-kernel
 make final    # produce a bootable kernel
 
 This has all been tested successfully in a src/conf patch.  I hesitated
 submitting them there in favor of an "outboard" approach using
 kern/40017
 
 I'd really rather avoid bringing the objcopy step into the kernel build
 process.
 
 Being able to build a kernel with a two-step process allows us to
 trivally
 wrap everything into a little shell script or other makefile fragment. 
 The
 'make final' step can be run as often as one requires while changing
 filesystem
 images.
 
 Cheers,
 
 Jerry Hicks
 gehicks@gehicks.dyndns.org
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Mon Jul 1 08:28:47 PDT 2002 
State-Changed-Why:  
This is not a new PR, 
but a followup to kern/40021 that gnats misfiled as a new PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40026 
>Unformatted:
