[OpenBIOS] Next stage of planned loader work
mark.cave-ayland at siriusit.co.uk
Sat Mar 27 20:27:05 CET 2010
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:
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.
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the OpenBIOS