From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 22 12:39:20 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5952D16A4DD; Tue, 22 Aug 2006 12:39:20 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB0843D68; Tue, 22 Aug 2006 12:39:17 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (yjsbap@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k7MCdA7F098540; Tue, 22 Aug 2006 14:39:16 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k7MCdAxk098539; Tue, 22 Aug 2006 14:39:10 +0200 (CEST) (envelope-from olli) Date: Tue, 22 Aug 2006 14:39:10 +0200 (CEST) Message-Id: <200608221239.k7MCdAxk098539@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, matteo@FreeBSD.ORG In-Reply-To: <20060820161708.GA984@krapfengeist> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 22 Aug 2006 14:39:16 +0200 (CEST) Cc: Subject: Re: About loader(8) forth X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, matteo@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2006 12:39:20 -0000 Matteo Riondato 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.