Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2004 07:59:28 -0700
From:      Scott Long <scottl@freebsd.org>
To:        =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/boot/ficl ficl.h loader.c
Message-ID:  <41AC8AD0.3080502@freebsd.org>
In-Reply-To: <xzpu0r7fm42.fsf@dwp.des.no>
References:  <200411301135.iAUBZUet084394@repoman.freebsd.org> <xzpu0r7fm42.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smørgrav wrote:
> Scott Long <scottl@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41AC8AD0.3080502>