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.
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
Author: blueswirl
Date: Sat Mar 27 14:20:54 2010
New Revision: 716
URL: http://tracker.coreboot.org/trac/openbios/changeset/716
Log:
Fix linker warning
There were two global symbols named 'entry':
LINK openbios-builtin.elf
libsparc32.a(entry.o): warning: definition of `entry' overriding common
libsparc32.a(boot.o): warning: common is here
Add 'static' to hide the boot.c one.
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/arch/sparc32/boot.c
Modified: trunk/openbios-devel/arch/sparc32/boot.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/boot.c Sat Mar 27 14:20:52 2010 (r715)
+++ trunk/openbios-devel/arch/sparc32/boot.c Sat Mar 27 14:20:54 2010 (r716)
@@ -20,7 +20,7 @@
uint32_t qemu_cmdline;
uint32_t cmdline_size;
char boot_device;
-int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5);
+static int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5);
static int try_path(const char *path, char *param, const void *romvec)
{
Author: blueswirl
Date: Sat Mar 27 14:20:52 2010
New Revision: 715
URL: http://tracker.coreboot.org/trac/openbios/changeset/715
Log:
Add missing newlines
Fixes build:
In file included from ../arch/sparc64/boot.c:12:
../include/libopenbios/aout_load.h:24:27: error: no newline at end of file
In file included from ../arch/sparc64/boot.c:13:
../include/libopenbios/fcode_load.h:22:28: error: no newline at end of file
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/include/libopenbios/aout_load.h
trunk/openbios-devel/include/libopenbios/fcode_load.h
Modified: trunk/openbios-devel/include/libopenbios/aout_load.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/aout_load.h Sat Mar 27 13:09:16 2010 (r714)
+++ trunk/openbios-devel/include/libopenbios/aout_load.h Sat Mar 27 14:20:52 2010 (r715)
@@ -21,4 +21,4 @@
extern int aout_load(struct sys_info *info, const char *filename);
-#endif /* _H_AOUTLOAD */
\ No newline at end of file
+#endif /* _H_AOUTLOAD */
Modified: trunk/openbios-devel/include/libopenbios/fcode_load.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/fcode_load.h Sat Mar 27 13:09:16 2010 (r714)
+++ trunk/openbios-devel/include/libopenbios/fcode_load.h Sat Mar 27 14:20:52 2010 (r715)
@@ -19,4 +19,4 @@
extern int fcode_load(const char *filename);
-#endif /* _H_FCODELOAD */
\ No newline at end of file
+#endif /* _H_FCODELOAD */