cvs commit: src/sys/boot/ficl ficl.h loader.c

Scott Long scottl at freebsd.org
Tue Nov 30 06:59:04 PST 2004


Dag-Erling Smørgrav wrote:
> Scott Long <scottl at FreeBSD.org> writes:
> 
>>  Log:
>>  Instead of just not defining a bunch of words when TESTMAIN is set, provide
>>  stubs that at least handle the stack correctly.  This makes it much easier to
>>  experiment with loader scripts from userland.
> 
> 
> How do you do that?
> 
> DES

Go to /sys/boot/ficl and do 'make testmain'.  That will give you the 
interpreter in the form of the ./testmain binary.  There are still some
pieces missing that prevent support.4th from loading, so you won't
have the 'include', 'boot', or 'reboot' keywords.  I make up for this
by doing the following:

init.4th:

: boot drop exit ;
: reboot drop exit ;

load screen.4th
load frames.4th
load beastie.4th

This also means that you need to comment out the 'include' lines in 
beastie.4th.

Again, it's not perfect, but it's enough to do useful prototyping and
experimentation.  The 'getenv' word will also always return -1 (meaning
the requested variable was not found) since it's just stubbed out.

Scott


More information about the cvs-src mailing list