[OpenBIOS] Next stage of planned loader work

Blue Swirl blauwirbel at gmail.com
Sun Mar 28 09:40:27 CEST 2010

On 3/27/10, Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk> wrote:
> Hi all,
>  Now that I've finished moving the various loaders into libopenbios, I'd
> like to set out my plans for the next stage of work. My ultimate aim is to
> enable various loaders to be enabled as defined within the main
> configuration XML files and to have these work automatically with the load
> and go words.
>  I've broken down my plan into a number of steps below:
>  i) Define configuration variables for each of the loaders, e.g.
>  CONFIG_LOADER_ELF, CONFIG_LOADER_AOUT etc. and use these within the
> configuration files for the relevant platforms. Note: I see there is already
> a CONFIG_IMAGE_ELF option available - should I be using this instead or is
> strictly for embedding ELF kernels?
>  ii) Refactor the existing loaders so that they contain a is_foo(addr)
> function for determining whether the specified address contains an image in
> the correct format.
>  iii) Add a foo_init_program() function to each of the loader files that can
> be called by init-program to relocate the executable image.
>  iv) Remove the majority of the Forth code in forth/debugging/client.fs so
> that the is_foo(addr) series of functions can be reused from C instead.
> Hence write a C version of init-program called (init-program) that can be
> called from Forth to do the majority of the work.
>  v) Rework the boot word so it looks something like:
>  :boot <path>
>    load <path>
>    go
>  In other words, move the existing platform-boot code into an implementation
> of go (or (go)) so that it can be re-used. Oh, and with all this in place I
> can try booting a Milax Solaris kernel ;)
>  Does this sound like a reasonable plan to everyone? If so, I'd like to
> start work on the next set of changes.

Yes, should be a nice cleanup.

More information about the OpenBIOS mailing list