⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 linux下建立JAVA虚拟机的源码KAFFE
💻
字号:
This is the i386/oskit specific configuration directory.This version of Kaffe has been ported to the September, 2000 OSKitsnapshot: oskit-20000904.  It probably won't work with any otherversion of the OSKit.  Please upgrade if you're behind.  See the OSKitweb page:	http://www.cs.utah.edu/flux/oskit/Support for future OSKit releases will be provided in the Kaffe CVSrepository.We will keep the OSKit in synch with Kaffe as best we can.  Visit theOSKit web pages for more information:	http://www.cs.utah.edu/flux/oskit/Feel free to send comments or questions (or requests for patches) tous at aoskit-users@flux.cs.utah.edu.****************************************************************************KNOWN PROBLEMS:Threads waiting on conditions cannot be interrupted.Currently the only GUI display support for Kaffe/OSKit kernelsis to use the OSKit's xclient support to display on another machinethat runs an X server.****************************************************************************SCRIPTS:There are three scripts in this directory to aid in the build process.These scripts assume that you already have the OSKit built and*installed*, and that you know the path to the install directory.(*) oskit-configureThis script will configure Kaffe to be built on the OSKit (or onOSKit/Unix). It is just a front end script to the Kaffe configurescript, adding a few configuration options that are required whenbuilding on the OSKit. There are some environment specific optionsthat need to be changed, either by copying the script and editing it,or by passing them in as command line options.  'oskit-configure--help' will give you a short summary of the options.  Please look atthe script itself for more documentation.  Note that the OSKit isbuilt using ELF tools, so you need to make sure that you unsetOBJFORMAT, or make sure that elf tools are your default.(*) ld-oskit.sh: This script is used to link against the appropriate OSKit libraries.You shouldn't have to look at this file at all, unless you want to use a different boot loader (The bootloader glue is linked into the kernel).Look at the comments in the script for more information.(*) mkimage.sh:This script is used for building a bootable image from the Kaffeexecutable.  'mkimage.sh --help' See the comments in the script.****************************************************************************CLASSPATH:Another important consideration is the default CLASSPATH. Since thereis no "easy" way to pass a long environment string to an OSKit kernel,the OSKit/kaffe startup code will read a file from /etc (in the bootimage) that contains the default classpath. This file is called/etc/kaffe_classpath, and is the usual colon separated list of jarfiles and directory names.  mkimage.sh will create a default classpath file (calleddefault_classpath_file) in the local filesystem which will be mappedto /etc/kaffe_classpath in the boot module filesystema.  This defaultfile contains all of the .jar files found in Kaffe's<installdir>/share/kaffe/ directory, plus "." (Which will be the rootdirectory in the Kaffe/OSKIT file system.)If you want to build any non-trivial kernels, you should either placeyour .jar file in the Kaffe directory, or add your .jar to the image(via --explicitfile) and manually add it to a classpath file.  Use the --classpathfile=<foo> argument to mkimage.sh to use your new classpath file.****************************************************************************Command line arguments:When you start the OSKit, you can change the name of file to be loadedto any other file in the multiboot image by using the environment variablecommand line option. That is, you can add CLASSPATHFILE=some_file_name tothe OSKit the command line, and that becomes an environment variable thatthe OSKit/kaffe startup code will look for before opening the defaultfile /etc/kaffe_classpath.The command line for a Kaffe kernel can be specified in three ways:(1) if your bootloader supports it, the bootloader arguments are    passed to the Kaffe kernel as command line arguments.(2) If no arguments are passed to kaffe, then the file    /etc/kaffe_cmdline is used as the command line.  (You can specify    a different cmdline file thorugh the environment variable    KAFFE_CMDLINE.)(3) If both of the above fail, kaffe will interactively prompt for a    command line.  (That is it will print "> " and wait for you to    type a command line on the console.)In all cases the command line is an OSKitSuperCommandline (tm).  AnOSKitSuperCommandline contains environment variable settings inaddition to traditional Kaffe command line arguments.  The format ofan OSKitSuperCommandline is:	[<VAR>=<VALUE>.. --] [ <regular Kaffe args> ]The magic '--' separates environment variables from command linearguments.Here's an example.  Assume the image contains a file called/etc/regression_classpath which contains our classpath,"/install/share/kaffe/Klasses.jar:/classes/utah.jar/classes/regresssion:".And, we want to run the class utah.kaffe.regression.OSKitTest with theoptions '-repeat 2' and '-threads 10' and, we want to pass '-vmdebugNATIVENET' to kaffe.  The following command line will do that:CLASSPATHFILE=/etc/regression_classpath -- -vmdebug NATIVENET utah.kaffe.regression.OSKitTest -repeat 2 -threads 10****************************************************************************PUTTING IT ALL TOGETHER:1) Build and install the OSKit.  We'll refer to the install directory   as /opt/oskit from now on.2) You will need a local (build machine) install of Kaffe as the build   process requires running kaffeh.  Note that this kaffeh should be   built from the same sources.  You don't want to be "caught"   generating header files in an old format.3) Configure Kaffe for running on the oskit.  Use the oskit-configure   script from the config/i386/oskit directory to configure Kaffe.   Look at the script source for a description of its parameters.   Here is an example:	$ cd /home/tullmann/obj/kaffe/	$ /home/tullmann/kaffe/config/i386/oskit/oskit-configure \		--srcdir=/home/tullmann/kaffe \		--oskitdir=/opt/oskit \		--oskitcc=i386-oskit-gcc \		--localkaffeh=/opt/kaffe/bin/kaffeh \		--enable-debug \		--prefix=/opt/kaffe/ 		(Note that '--enable-debug and --prefix' are just passed	directly to the Kaffe configure script by oskit-configure, as	are any other arguments not explicitly understood by the	oskit-configure script.)		4) Compile Kaffe with 'make all' in the kaffe directory.5) Install Kaffe with 'make install'.  (This is required for the	mkimage.sh script to find all of the libraries).	6) Build a boot image.  (If you're building Kaffe for OSKit/UNIX, you   don't need to do this step.  Just run the regular 'kaffe' script.)   Use the script mkimage.sh in the config/i386/oskit directory to   create useful bootable kernels.  Look at the script source for a   description of its arguments.  Example:	$ /home/tullmann/kaffe/config/i386/oskit/mkimage.sh \		--kerneldir=/home/tullmann/kernels/ \		--kaffedir=/opt/kaffe/ \		--oskitdir=/opt/oskit/ \		--classpathfile=/home/tullmann/kaffe-classpath \		-dir /home/tullmann/classes \		--explicitfile=/home/tullmann/hosts-hack:/etc/hosts \		--explicitfile=/home/tullmann/commandline:/etc/kaffe_cmdline \		--explicitfile=/home/tullmann/java/HelloWorld.class:/HelloWorld.class   This will generate a file 'Image' in the directory given by --kerneldir.7) Boot the image.  This is dependent upon your bootloader syntax.Hope that helps.If you have any questions about the OSKit or Kaffe on the OSKit,please contact us via the OSKit mailing list: oskit-users@cs.utah.edu.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -