> > Along these lines it would seem that there should be some sort of
> > naming convention to differentiate a server that is linked against
> > crt0srv.o and one linked against crt0.o. That way it is obvious where
> > something got loaded, and you don't try to put the wrong thing in
> > boot.lst and create an unbootable system.
>
> > [ sensible naming ideas omitted ]
>
> It's probably better to try and remove the need for a separate
> crt0srv.o and crt0.o. Having said that I'm sure if I can think of
> a good way of passing arguments to the boot tasks. (Hmmm, if we
> were using ELF we could maybe have the boot loader attach a note
> section or segment to the executable ... not really sure).
The way information is passed to a child with the exec library
calls is hard (if not impossible) to do with the boot process.
It maps a shared memory area and copies a bunch of data there.
It also needs to pass more than just the argv/argc.
There probably is a way that boot programs can be compatible with
non-boot programs though. If the arguments to boot programs were
stored seperately from the boot images themselves the system
initialization could push them on the stack of each boot process.
It could then push a magic number on the stack of the process.
Regular (non-boot programs) run through exec library calls could
have a different magic number pushed on the new processes stack.
The _start code could then detect which method was used and read
argv/argc from stack or from the shared memory region. It might
even be possible to pass the boot args as an address to the
memory where the args are stored which is more similar to the
way normal processes get their args. In that case the start
code would be nearly identical except less information would be
grabbed from the memory region, and it wouldnt be munmapped when
_start finished.
I'm not sure its worth the effort though.
> As an aside, how does the waiting for boot servers to initialise
> themselves currently work? I remember someone mentioning this on the
> list a little while ago but can't remember the outcome ... Does it
> mean boot servers have to coded differently to ordinary servers?
> I can't find an instances of this in the server code I've looked
> at so far ...
In my boot servers that want to do i/o to stdio I have special
startup code to keep trying to open cons and kbd once a second for
about 10 seconds.
> Christopher.
Received on Mon Dec 19 19:28:54 1994
This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:11 PDT