wiki:FromNothingToImage
close Warning: Can't synchronize with repository "(default)" (/project/movitz/svn does not appear to be a Subversion repository.). Look in the Trac log for more information.

How to create a kernel image

These are instructions on the basic steps required to build a bootable kernel image file.

  1. You need a working implementation of ANSI Common Lisp, and basic knowledge of how to operate it. Implementations known to work well are SBCL, Allegro, and (less frequently tested) CMUCL and CLisp. But in theory any ANSI CL should suffice.
  1. Fetch the sources from CVS:
      % cd /path/to
      % cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/movitz/cvsroot co movitz
      % cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/movitz/cvsroot co binary-types
    

2.5 Don't you need infunix as well from http://www.cs.uit.no/~frodef/sw/? A: not really, infunix is a mostly obsolete debugging package.

  1. Load the Movitz (development) system into your lisp by loading the Movitz ASDF system defined in movitz.asd. With the movitz and binary-types asd files installed in the ASDF repository, a mere (require 'movitz) should load everything.

Alternatively, you can try the old/deprecated (load "/path/to/movitz/load.lisp")

  1. Create a SymbolicImage: (movitz:create-image :init-file "/path/to/movitz/losp/los0.lisp")

Note: Using SBCL some users have found that ":init-file" was not recognized. If in the movitz directory they found that (movitz:create-image) worked.

  1. Create a BootableFileImage: (movitz:dump-image :path "foo.img")

Now, if all goes well, "foo.img" should be a freshly minted bootable image. For example, you can dump it to a floppy and have your PC boot from that, or you can point your PC emulator to use it as a floppy image (e.g. "qemu -fda foo.img -boot a"). Furthermore, included in CVS is a GRUB image that will load a Movitz image concatenated to it (i.e "cat grub-bootloader/grub-bootloader.img foo.img > hda.img") to allow booting from any device supported by GRUB.

Last modified 17 years ago Last modified on 02/25/08 23:49:24