About loader(8) forth

Oliver Fromme olli at lurza.secnetix.de
Tue Aug 22 12:39:20 UTC 2006


Matteo Riondato <matteo at freebsd.org> wrote:
 >         I'm trying to understand how the loader forth works to see if it's
 > possible to develop something similar to knoppix boot menu and use it
 > for FreeSBIE. 
 > Just to have a try, I replaced /boot/beastie.4th with file a
 > containing only: 
 > 
 > ." Welcome to FreeSBIE"
 > exit
 > 
 > then I deleted the line mentioning beastie-start from /boot/loader.rc
 > and rebooted my machine.
 > 
 > I wanted the machine to print "Welcome to FreeSBIE" and then escape to
 > loader prompt.
 > 
 > Saying it didn't work is probably not enough. I got an error message
 > saying "Compile failed" followed by some codes I didn't had the time
 > to copy because my machine auto-rebooted.

I've modified FreeBSD's standard beastie.4th in the past to
implement various things, although I'm not that much of a
FICL expert either ...   But since nobody else replied, I
give it a try.

I think putting "exit" directly into beastie.4th (which is
included by loader.rc) is not a good idea.  You should use
"exit" only within a function that you define in beastie.4th
and then call that function from loader.rc, just like the
standard files do.

By the way:  When experimenting with the boot loader and
FICL, it is a good idea to run the whole thing under qemu.
It boots a lot faster than a physical machine, even without
qemu-kmod it only takes two or three seconds.  You can
easily mount the image, modify the /boot/* stuff, umount,
start qemu on it, test, stop qemu, mount the image again
and fix things -- all within a few seconds.

If you're looking for documentation, please have a look at
http://ficl.sf.net/ which also has links to several FORTH
primers and tutorials.  Indeed the first of the links points
to a tutorial by J.V.Noble which is easy to read and quite
good.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"C is quirky, flawed, and an enormous success."
        -- Dennis M. Ritchie.


More information about the freebsd-hackers mailing list