Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2002 17:58:24 -0400
From:      W Gerald Hicks <gehicks@gehicks.dyndns.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/release/picobsd/build write_mfs_in_kernel.c 
Message-ID:  <267C26FC-9907-11D6-99DB-0030657B5F1E@gehicks.dyndns.org>
In-Reply-To: <20020716181501.C69CB3910@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?267C26FC-9907-11D6-99DB-0030657B5F1E>