|
UP
EROS Web Developer Documentation Cross Development Guide |
The Cross EnvironmentThis document describes the programs used to generate an initial bootable EROS environment. It provides a brief description of the cross environment and system generation tools. 1. Host PlatformEROS currently builds on Intel-based machines running Linux. 1.1. HardwareWith patience, the current system builds on a 75Mhz 486 portable with 8 megabytes of memory, though we were surely happier after upgrading the memory to 20 megabytes. A 120 Mhz (or better) Pentium (or better) chip is recommended. Compatible chips are untested, but should build the system without difficulty. We have had no opportunity to test EROS itself on the Cyrix or AMD parts, and look forward to your feedback. We currently build on systems with as little as 16 megabytes of main memory. 32 megabytes cuts the time required to complete the build nearly in half. 64 megabytes makes it possible to do other things (such as run emacs) without unduly slowing the build. We have seen no appreciable benefit past 64 megabytes. At that point, it would seem that you are better off going for a faster chip. EROS itself presently supports only (E)IDE drives. The driver should in theory also support older drives, but this is untested. While we will adopt reasonable patches for supporting older drives, we will not put engineering effort into supporting them. SCSI support is planned. 1.2. Operating SystemThe EROS build environment is currently designed to run on Linux systems. Compatibility with various Linux releases is summarized below. Additions to this list are welcome, and should be sent to the eros-doc alias.
While we have not tried to do so, it should not be difficult to make this build environment operate from any UNIX derivative using ELF-based object files and GNU make. The development group is currently using the RedHat 4.2 and 5.0 releases. If you are running an earlier release of RedHat, it is very much worth upgrading for the sake of improved UNIX security. With some work the a.out file format could be accomodated, which would facilitate development from FreeBSD or NetBSD. It would be very difficult to facilitate building from Microsoft operating systems, and we have no plans to do so. Our recommendation, if your circumstances permit it, is to work from Linux, as a rehosted Linux environment will eventually be distributed for the EROS system. 2. The DistributionThe EROS distribution will be available as a gzipped tar image from the EROS Home Page. 2.1. Space RequirementsTo build the release, you will need approximately:
If necessary, the documentation source tree (eros/src/doc can be deleted before building, reducing the overall space requirements to 15.7 megabytes. 2.2. Build Tree OrganizationThe top level of the build tree is the eros/ directory. This directory may be placed anywhere that is convenient. All makefiles in the build tree locate this directory by referencing the variable EROS_ROOT. In my own case, the build tree sits in my home directory, and the EROS_ROOT variable is set to "/home/shap/eros". Once built, the next level down in the tree contains several further directories:
The source tree itself is organized by package:
The documentation tree can be navigated through your web browser. Some browsers do not work correctly unless the document is compacted. We therefore recommend that you install and navigate the eros/doc/www tree, and substitute eros/src/doc/www when you need to locate the corresponding source file. The base tree is organized as follows:
In most of the source tree, the build occurs directly in the relevant directory. In the kernel subtree, the build occurs in sys/arch/XXX/build/, where XXX varies according to the architecture name. Other packages, including a port of XFree86 and a Linux rehosting project, are currently underway. Each of these packages has an associated directory under eros/src, and has its own conventions for build tree structure. All of these packages depend on a successfully built base package. 3. Environment SetupBefore building the EROS distribution, two environment variables must be set:
At some point, this list will be expanded to include an environment variable describing the host environment for the build. At present, builds from non-i386 versions of Linux are not supported by the build environment. In my own build environment, the eros/ directory sits under my home directory. For Bourne shell and bash users, your login-time initialization file should contain:
EROS_TARGET=i486 EROS_CONFIG=DEFAULT export EROS_TARGET EROS_ROOT EROS_CONFIG Users of csh or tcsh should instead use:
setenv EROS_TARGET i486 setenv EROS_CONFIG DEFAULT I have found it useful not to set the EROS_ROOT variable in my .cshrc or .bashrc or equivalent. Once in a while I want to maintain two build trees, and this is rendered impossible if the per-shell configuration file overrides the value of EROS_ROOT. Removing this value from the per-shell configuration file, however, leads to two problems:
The first problem can be solved by making a small repair to your .xsession file. If you do not have one, it may be necessary to copy /usr/lib/X11/xdm/Xsession to $HOME/.xsession so you can apply this fix. Change the first line, which reads
To read:
This will cause your .login file to be read before the window manager is started, after which all of your .login environment variables will be inherited correctly by applications started from the window manager. The fact that the default .xsession file does not do this is a bug An alternative workaround is to have your .cshrc or .bashrc only set EROS_ROOT if it is not set already. This also solves the rsh/srsh problem. Both workarounds can safely be applied simultaneously. 3. Building the DistributionAt this point, you can build the distribution. To do so:
make -k install If you choose to rebuild the tree you may find some other make targets useful:
4. Generating the Installation ImageInstructions for producing new EROS images can be found in Building an EROS Disk Image. To build the generic installation image, you can now:
make -k floppy This command should be issued with a blank floppy in the floppy drive, and you must have write permission on the floppy drive. If you do not wish to actually write the floppy, you can use:
make -k sysvol This will produce the system volume image, which can be copied to a floppy or hard disk partition using the dd utility. Copyright 1998 by Jonathan Shapiro. All rights reserved. For terms of redistribution, see the EROS License Agreement |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||