From owner-cvs-all Tue Jul 16 14:58:31 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0756B37B400 for ; Tue, 16 Jul 2002 14:58:28 -0700 (PDT) Received: from gehicks.dyndns.org (adsl-35-49-18.asm.bellsouth.net [67.35.49.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EAD543E58 for ; Tue, 16 Jul 2002 14:58:27 -0700 (PDT) (envelope-from gehicks@gehicks.dyndns.org) Received: from mac (mac [10.0.0.13]) by gehicks.dyndns.org (8.12.5/8.12.5) with ESMTP id g6GM5oVH003635; Tue, 16 Jul 2002 22:05:50 GMT (envelope-from gehicks@gehicks.dyndns.org) Date: Tue, 16 Jul 2002 17:58:24 -0400 Subject: Re: cvs commit: src/release/picobsd/build write_mfs_in_kernel.c Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) Cc: cvs-all@FreeBSD.org To: Peter Wemm From: W Gerald Hicks In-Reply-To: <20020716181501.C69CB3910@overcee.wemm.org> Message-Id: <267C26FC-9907-11D6-99DB-0030657B5F1E@gehicks.dyndns.org> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.482) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tuesday, July 16, 2002, at 02:15 PM, Peter Wemm wrote: [snips] > Whatever works. :-) > Yeah :-) > I like the --add-section approach personally because it adapts > automatically to the file format being used and seems to need less > comamnd > line args. > Heh, I'm doing it your way now. My fingers thank you. > However, it requires doing things a bit differently. I used to use it > as a > final pre-link stage on one file, but I suppose creating the .o file > directly makes it easier from a Makefile perspective. > I've got this hack here where I've modified config(8) to allow a alternate set of sys/conf files where I've created a makeoption RLINK_KERNEL="foo" to illustrate how to do it without a statically reserved area. I've dropped option MD_ROOT_SIZE in favor of a new makeoption MD_ROOT_IMAGE="mdimage.o" which gets linked on a 'make final' to replace weak symbols in my patched md.c ('make prelim' builds a partially linked kernel in this scheme) > I used to do things like this: > mdroot.o: mdroot.dd mdroot_driver.o > objcopy --add_section mdroot=mdroot.dd .... > > mdroot_driver.o: md.c > ... etc > > And the build used the resulting mdroot.o with the binary embedded in > it. > yeah, that's pretty much what we do here. > Anyway, it is good to know that there is more than one way to do it and > that > the evil write_mfs_in_kernel can finally be laid to rest for good. > Amen! Cheers, Jerry Hicks gehicks@gehicks.dyndns.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message