This document is pretty much obsolete, since I haven't tried to build an OSKIT image in ages, especially not with pthreads (Jewel, May 2001)
--------------------------------------------------------------------------------


Some notes on building an OSKit bootable image

Make sure you specify -DUSEOSKIT in the top level makefile. Also make sure you don't have USE_DISTRIBUTED_STORE defined.

Do 'make -f oskit-Makefile' in the top-level directory. This should build a file called plava in the linux/obj directory.

To build the multiboot image we need all the class files from src/minclass.

First get a list of class files (change to src/minclass):

[jewel@svetlana minclass]$ find . -name '*\.class'

Put this in a file called stage1 

Then we need to create a file with each entry duplicated and separated by a colon:
(dostage2.sh)
#!/bin/sh
for i in $@; do echo \"$i:$i\"; done

And we do:

[jewel@svetlana kissme-0.01]$ ./dostage2.sh $(cat stage1) > stage2

from the toplevel directory

Then we need to remove the ./'s, we use this little strip program

--->

import java.io.*;
import java.lang.*;

public class strip
{
    public static void main(String[] argv) throws IOException
    {
	DataInputStream in = new DataInputStream(new BufferedInputStream(System.in)); 
	DataOutputStream out = new DataOutputStream(new BufferedOutputStream(System.out)); 
	
	byte previous = 0;
	byte current = 0;
	while(in.available() > 0)
	    {
		current = in.readByte();
		if((current == '/') && (previous == '.'))
		   {
		       
		   }
		else if(current == '/')
		{
		 out.writeByte(  current);
		}
		else if((current == '.') && (previous == ':'))
		{
		}
		else if((current == '.') && ((previous == 0) || (previous == '\n')))
		{
		}
		else
		 out.writeByte(  current);

		previous = current;
	    }
	out.flush();
	
    }

}

<----------

So we do:

/home/jewel/jdk/bin/java -classpath $CLASSPATH:. strip < stage2 > stage3

to generate stage3.

Then we call mkmb2 to make the multiboot image. We do this from inside src/minclass

$(eval mkmb2 ../../oskit/obj/kissmeimage $(cat ../../stage3))




