Vikas N Kumar | 23 Oct 01:16 2006
Picon
Picon

building image

Hi
How does one build a fresh image of movitz using CLISP ?
Based on the earlier emails from last year, I tried
(load "load.lisp")
(movitz:create-image)

After ignoring some errors and not compiling pci.lisp and ip4.lisp and
los0-gc.lisp, in the end i see SYMBOLIC-IMAGE followed by a number .
But all that is created is .lib and .fas files.

How does one create the final .img file ?

Thanks and regards,
Vikas

--

-- 
http://www.vikaskumar.org/
Frode Vatvedt Fjeld | 23 Oct 08:37 2006
Picon

Re: building image

Hi Vikas,

"Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:

> How does one create the final .img file ?

Use the function dump-image, which takes as arguments the pathname of
the image file (default "los0-image"), and the (symbolic) image you
want to dump, which is typically the thingy that was just returned
from create-image.

Create-image will by default set the variable movitz:*image* to the
same value as it returns. Many movitz functions subsequently use this
variable as the (default) image to manipulate, including dump-image.

There are functions that do useful manipulations of an existing
image. Most notable of these is movitz-compile-file, which compiles
the contents of a file pretty much the way you expect. That is, if the
file contains "(defun foo (x) (1+ x))", then the current *image*'s
function definition for foo will be updated to reflect this. Then,
the next image generated by dump-image will contain the new foo.

The typical task, then, of the Movitz "IDE" (in whatever form, there
are I believe two variants of Emacs integration in CVS) is to have a
keybinding M-C-x or C-c C-c that places the current top-level form in
a temporary file and applies movitz-compile-file to that file.

Regards,
--

-- 
Frode Vatvedt Fjeld
(Continue reading)

Vikas N Kumar | 23 Oct 15:28 2006
Picon
Picon

Re: Re: building image

Thanks Frode.
But am I doing the right thing by ignoring the errors that are
occuring while compiling los0-gc.lisp ?

Regards,
Vikas

On 23 Oct 2006 08:37:44 +0200, Frode Vatvedt Fjeld
<ffjeld <at> common-lisp.net> wrote:
> Hi Vikas,
>
> "Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:
>
> > How does one create the final .img file ?
>
> Use the function dump-image, which takes as arguments the pathname of
> the image file (default "los0-image"), and the (symbolic) image you
> want to dump, which is typically the thingy that was just returned
> from create-image.
>
> Create-image will by default set the variable movitz:*image* to the
> same value as it returns. Many movitz functions subsequently use this
> variable as the (default) image to manipulate, including dump-image.
>
> There are functions that do useful manipulations of an existing
> image. Most notable of these is movitz-compile-file, which compiles
> the contents of a file pretty much the way you expect. That is, if the
> file contains "(defun foo (x) (1+ x))", then the current *image*'s
> function definition for foo will be updated to reflect this. Then,
> the next image generated by dump-image will contain the new foo.
(Continue reading)

Frode Vatvedt Fjeld | 23 Oct 16:18 2006
Picon

Re: building image

"Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:

> But am I doing the right thing by ignoring the errors that are
> occuring while compiling los0-gc.lisp ?

Well, it is not the intention that there should be errors there. What
do they look like?

--

-- 
Frode Vatvedt Fjeld

Vikas N Kumar | 27 Oct 00:34 2006
Picon
Picon

Re: Re: building image

Hi Frode,
I have attached the error in a text file.
I ran Clisp 2.41 (latest stable version) on windows XP and tried
building the latest CVS version of movitz.  I tried copying all the
warnings as much as I could.
There is one part  in the text file with the string "<SNIP>" where I
missed the warning messages.
If you scroll down to the end of the file, you will see the errors in
los0-gc.lisp which I encountered. I typed "continue" and avoided
compiling los0-gc.lisp.

What is the error due to ?

Regards,
Vikas

On 23 Oct 2006 16:18:21 +0200, Frode Vatvedt Fjeld
<ffjeld <at> common-lisp.net> wrote:
> "Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:
>
> > But am I doing the right thing by ignoring the errors that are
> > occuring while compiling los0-gc.lisp ?
>
> Well, it is not the intention that there should be errors there. What
> do they look like?
>
> --
> Frode Vatvedt Fjeld
>
> _______________________________________________
(Continue reading)

Vikas N Kumar | 27 Oct 00:42 2006
Picon
Picon

Re: Re: building image

Hi Frode,
When I run dump-image i get the following error. What am I supposed to
do ? From the code in image.lisp, dump-image should be able to use all
the default values.

[21]> (movitz:dump-image )
;; Doing initiating dump..
*** - The value of (HASH-TABLE-TEST MOVITZ::LISP-HASH) must be one of EQ, EQL,
      EQUAL
      The value is: FASTHASH-EQ
The following restarts are available:
ABORT          :R1      ABORT
Break 1 [22]>

Regards,

Vikas

On 10/26/06, Vikas N Kumar <vikasnkumar <at> users.sourceforge.net> wrote:
> Hi Frode,
> I have attached the error in a text file.
> I ran Clisp 2.41 (latest stable version) on windows XP and tried
> building the latest CVS version of movitz.  I tried copying all the
> warnings as much as I could.
> There is one part  in the text file with the string "<SNIP>" where I
> missed the warning messages.
> If you scroll down to the end of the file, you will see the errors in
> los0-gc.lisp which I encountered. I typed "continue" and avoided
> compiling los0-gc.lisp.
>
(Continue reading)

Frode Vatvedt Fjeld | 27 Oct 08:23 2006
Picon

Re: building image

"Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:

> ** - Continuable Error
> COMMON-LISP:READ from
>       #<INPUT BUFFERED FILE-STREAM COMMON-LISP:CHARACTER #P"losp\\los0-gc.lisp"
>          <at> 339>
>      : must specify element of vector of length 250

This is in all likelihood because the CLisp reader doesn't accept the
syntax "#250()". I believe that CLisp will accept e.g. "#250(nil)", so
I checked in a fix like that just now.

--

-- 
Frode Vatvedt Fjeld

Frode Vatvedt Fjeld | 27 Oct 08:58 2006
Picon

Re: building image

"Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:

> Hi Frode,
> When I run dump-image i get the following error. What am I supposed to
> do ? From the code in image.lisp, dump-image should be able to use all
> the default values.
> 
> [21]> (movitz:dump-image )
> ;; Doing initiating dump..
> *** - The value of (HASH-TABLE-TEST MOVITZ::LISP-HASH) must be one of EQ, EQL,
>       EQUAL
>       The value is: FASTHASH-EQ
> The following restarts are available:
> ABORT          :R1      ABORT
> Break 1 [22]>

Hi Vikas, this issue occurs when Movitz tries to convert a native
(i.e. CLisp) hash-table object to its internal format. When it looks
up the hash-table's test function, the code expects it to be one of
eq, eql, or equal (there is an ecase statement about this in
storage-types.lisp). However, CLisp returns things like fasthash-eql,
which confuses Movitz. I have added code to deal with this now.

Also, I verified that after these two fixes, CLisp will build Movitz
Ok, at least on two systems I have access to (windows/cygwin and
FreeBSD).

--

-- 
Frode Vatvedt Fjeld

(Continue reading)

Vikas N Kumar | 27 Oct 17:08 2006
Picon
Picon

Re: Re: building image

Hi Frode
Thanks. I was able to build the image fine and dump it
But now i get this error when i load that image with Bochs.
Any ideas on debugging this issue ?

Plex86/Bochs VGABios 0.5c 07 Jul 2005
This VGA/VBE Bios is released under the GNU LGPL

Please visit :
 . http://bochs.sourceforge.net
 . http://www.nongnu.org/vgabios

Bochs VBE Display Adapter enabled

Bochs BIOS, 1 cpu, $Revision: 1.138.2.1 $ $Date: 2005/07/06 19:30:36 $

ata0 master: Generic 1234 ATA-2 Hard-Disk (499 MBytes)
ata0  slave: Generic 1234 ATAPI-4 CD-Rom/DVD-Rom

Booting from Hard Disk...
Loading Movitz 2..

                  (Failed!)

On 27 Oct 2006 08:58:37 +0200, Frode Vatvedt Fjeld
<ffjeld <at> common-lisp.net> wrote:
> "Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:
>
> > Hi Frode,
> > When I run dump-image i get the following error. What am I supposed to
(Continue reading)

Frode Vatvedt Fjeld | 27 Oct 19:46 2006
Picon

Re: building image

"Vikas N Kumar" <vikasnkumar <at> users.sourceforge.net> writes:

> Hi Frode
> Thanks. I was able to build the image fine and dump it
> But now i get this error when i load that image with Bochs.
> Any ideas on debugging this issue ?

> [..]
> Booting from Hard Disk...
> Loading Movitz 2..

Hi Vikas,

The image produced by dump-image includes a 512-byte bootloader that
is only able to load from floppy. Apparently you are trying to use it
as a hard-drive image. If you configure Bochs to use the image as
floppya, it should work. Since this way you can use the output of
dump-image directly, this is most convenient. It is also possible to
use GRUB to construct a hard-drive or CDROM-compatible image, etc.

--

-- 
Frode Vatvedt Fjeld


Gmane