From owner-cvs-all@FreeBSD.ORG Tue Nov 30 14:59:04 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A24EE16A4CE; Tue, 30 Nov 2004 14:59:04 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22A3543D46; Tue, 30 Nov 2004 14:59:04 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id iAUF2Xjt007387; Tue, 30 Nov 2004 08:02:33 -0700 (MST) (envelope-from scottl@freebsd.org) Message-ID: <41AC8AD0.3080502@freebsd.org> Date: Tue, 30 Nov 2004 07:59:28 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040929 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <200411301135.iAUBZUet084394@repoman.freebsd.org> In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/boot/ficl ficl.h loader.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 14:59:04 -0000 Dag-Erling Smørgrav wrote: > Scott Long 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