Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Oct 1998 20:18:53 +0100 (CET)
From:      Andrzej Bialecki <abial@nask.pl>
To:        Mike Smith <mike@smith.net.au>
Cc:        "Jordan K. Hubbard" <jkh@time.cdrom.com>, current@FreeBSD.ORG
Subject:   Re: New boot loader and alternate kernels 
Message-ID:  <Pine.BSF.4.02A.9810302004200.25812-100000@korin.warman.org.pl>
In-Reply-To: <199810301848.KAA01266@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Oct 1998, Mike Smith wrote:

> > > How many people would be interested in labels and conditional branches,
> > > for example?
> > 
> > Probably quite a few, but then you get into the predictable debate
> > of "why not just add atlast to the loader?  It's only 7K!" :-)
> 
> Actually, it's about 45k.  I've been looking at all sorts of small 
> script interpreters; there doesn't seem to be much in the "useful" 
> category under about 40k, and that's too big for the Alpha at the 
> moment.

There are Forth implementations for x86 which take around 8kB. These
implement the subset of CORE words only, but you can have a
/boot/core-ext.4th, /boot/menus.4th, etc, etc... - all these would be
added to dictionary at run-time. This includes also all sorts of
conditionals, loops, help screens etc, etc... Imagine something like that:

/boot/boot.config:
-----------------------------
include /boot/help.4th
\ Here I define words "run_tests" and "load_tests"
include /boot/my_loading_and_unloading_test.4th
include /boot/menus.4th

run_tests
0= if	\ All tests are ok, boot experimental set of modules
	load_tests
	boot
then
." The tests failed. Booting last known good kernel..." cr
boot /kernel.good
-------------------------

This idea has a nice touch about it - "Forth? The Suns and FreeBSD's use
it as their boot monitor.." :-)

Andrzej Bialecki

--------------------   ++-------++  -------------------------------------
 <abial@nask.pl>       ||PicoBSD||   FreeBSD in your pocket? Go and see:
 Research & Academic   |+-------+|       "Small & Embedded FreeBSD"
 Network in Poland     | |TT~~~| |    http://www.freebsd.org/~picobsd/
--------------------   ~-+==---+-+  -------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810302004200.25812-100000>