Date: Sun, 30 Jun 2002 14:57:15 -0400 From: W Gerald Hicks <gehicks@gehicks.dyndns.org> To: freebsd-small@freebsd.org Subject: Fwd: [patch] use ld(1) to build kernel with linked-in md(4) filesys Message-ID: <31B4E519-8C5B-11D6-BBF1-0030657B5F1E@gehicks.dyndns.org>
next in thread | raw e-mail | index | archive | help
Had a problem on first reply to small@: Begin forwarded message: > On Sunday, June 30, 2002, at 11:49 AM, Bruce R. Montague wrote: > >> >> >> Hi, Jerry, I think I may have lost some context >> on your recent message, subject "[patch] use ld(1) >> ... linked-in md(4) filesys", that starts "> The >> patch seems to remove". Perhaps there was a leading >> paragraph that didn't get pasted or somesuch. >> > > No, you didn't lose context. I didn't supply enough. Sorry about that. > >> * If I understand, you have a patch that involves >> relinking the kernel image (effectively an image >> copy with alterations, brought by the goodness of >> ELF?). >> > > Well, actually it uses 'ld -r' and objcopy which have been available > for both ELF and COFF for some time now. Weak symbols are better > supported by ELF however and those are used in the update for md.c > >> * During this relink, the size of the md filesystem >> in the image (is this a segment or section?) can >> be changed. >> > > Previously it was a fixed-size character array. Now there are weak > symbols > defining the variables. If they haven't been backed up by any "real" > variables during final link they end up being zero and are avoided by > a runtime check. The new scheme allows the filesystem to be sized > flexibly > without need for a predefined fixed region within the kernel. > >> * The relink can be controlled by a "picobsd" script >> command, which will support new "relink" options... >> or is another script intended? What is "it's" in >> "Yes, it's intended to replace the MD_ROOT_SIZE" >> option? >> > > Sorry, I meant to say that my intention is to replace MD_ROOT_SIZE > with the functionality provided by the MD_ROOT_IMAGE scheme. > > In actuality, a one-pass link with a prebuilt md(4) filesystem object > works fine. The 'RLINK' functionality was to answer the need for > subsequent relinks with modified filesystem images (requested by phk). > > >> * During a relink, a compile/build cycle must be >> done in conjunction with having the old image to >> be relinked available (?). Additional control >> files such as (/usr/locl/src/picobsd/conf) can >> steer" the relink process. > > Bingo! > > Note that with the new scheme it won't be necessary > to build picobsd or its kernel within src/ > > Personally, I'd like to see src/release/picobsd removed > and maybe built with ports/picobsd/VARIANT or something. > > This would open up access to allow ports committers to > administer non-committer updates, hopefully leading > to a better and more maintained picobsd. > > >> The kernel build makefile has been modified with >> additional targets so that it can link what it's >> got at the time (might not be all you need), and >> also attempt to link to produce a final bootable >> kernel. > > Yes, basically the same as what VxWorks does for their kernel. > >> >> * Basically, going in the direction of a kernel >> binary linkage editor.... >> >> * The PR 40017 adds options to config so that >> locations of the the source tree and config file >> tree can be explicitly provided. > > Yes. Although much work has been done for > the src/Makefile 'kernel' target there was not much > done with config(8) to facilitate deviant or OEM builds. > >> Is this basically right? >> > > Thanks for having the patience to correctly decipher my > intentions. > > I was basically trying to stir up small@ for some discussion > on the issues. Looks like that much worked anyway :-) > >> Sorry to seem so thick this morning, I'm asking >> because this sounds like very interesting good >> stuff that would make picobsd more tractable... >> and I did enjoy relinking with IEWL... > > I think it was more a matter of me being thick when I cc'd > freebsd-small a bit prematurely. I'll have some more bits > to add to this soon. > > Meanwhile, your ideas and criticisms are solicited. > > Cheers, > > Jerry Hicks > gehixz@bellsouth.net > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31B4E519-8C5B-11D6-BBF1-0030657B5F1E>