Subject: Re: CVS commit: pkgsrc
To: None <christos@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: source-changes
Date: 12/18/1999 15:50:29
christos@netbsd.org said:
> - Make doscmd_loader use loadfile() [Tested only with ELF] 

Is this really necessary? I don't know details of "doscmd", but
I'd guess this can be done easier and more portable if the
binary to load is prepared by "objcopy --output-target=binary".

I was somehow hoping that the i386 "installboot" doesn't need
"loadfile" anymore once the bootstrap gets another stage, so
this "#ifdef _STANDALONE" mess could be nuked one day. It's
just too much black magic for my taste.
(Even now it could use "objcopy", but this wouldn't be nice
for install floppies.)

I'd propose a slight interface change to loadfile anyway:
the md code should get its hands at the file and the marks[]
array before the final load is done. As things are now,
the way load addresses are calculated doesn't work too well
on i386, in particular if we thing of kernels with different
KERNBASE and/or different load addresses -- that's too much
for a single macro in loadfile_machdep.h. Besides this, the
kernel identification should be md. (Our loader will happily
try to boot a Linux kernel - unsuccessfully of course.)

best regards
Matthias