Oberon Community Platform

Edit Page
Printable View


IMPORTANT: This documentation refers to the most current version of the release build tool (Release.Mod). For a more detailed description of the commands and options available, please refer to the comment in the file Release.Mod.

Build WinAOS within WinAOS

You need to do two steps:

  • Compile all modules
  • Link the Aos.exe file (not always necessary)

Open the file Release.Tool under AOS (PET.Open Release.Tool ~). Read the comments at the top of the file.

There are two different versions of WinAOS. The internal version starts the Oberon application as WinAOS window whereas the external version starts the Oberon application as MS Windows window.

To compile all modules, execute the command

  • Release.Build --build WinAos ~ for the internal WinAOS version
  • Release.Build --build eWinAos ~ for the external WinAOS version

Note: The default build options for the object files are defined in the BUILDS section of Release.Tool. The defaults can be overriden using options of the Release.Build command (see Release.Mod for a description of available command line options).

To link the boot file (Aos.exe), execute the command (found in Relesae.Tool)

  • PELinker.Link --path=../ObjI/ Win32.Aos.Link ~ for the internal WinAOS version
  • PELinker.Link --path=../ObjE/ Win32.Aos.Link ~ for the external WinAOS version

The newly created boot file will be located in the /Work/ folder.

Now copy the file ./Work/Aos.exe to the /WinAos/ directory where the old Aos.exe is located.


Note: The folder where object files are loaded from (e.g. /ObjI/) is specified in the configuration file aos.ini.

Hint: It's a good idea to don't overwrite to (working) object files in the directories ../ObjI/ respectively ../ObjE/ and also keep a copy of the old Aos.exe file. This makes sure that you always have a running copy of WinAOS. You can compile the object files into a different directory. To make WinAOS use that object files, you have to adapt the object file path in /WinAos/aos.ini accordingly.

Step-by-Step Guide

This guide assumes that WinAOS is located in the folder /WinAos/. It uses only relative paths, so it does not matter where exactly this folder is located.

1. Create the folder where the object files will be stored in (/WinAos/ObjT/ in this example)

2. Start WinAOS

3. Execute the command Release.Build --path="../ObjT/" -b WinAos ~. This means that the object files for the internal WinAOS build (WinAos) should be created (-b) in the folder ../ObjT/ (path=../ObjT/). Note: The working directory when running WinAOS is /WinAos/Work, so ../ObjT/ means /WinAos/ObjT. The folder must exist (created in step 1)

IMPORTANT: The /WinAos/Work/ folder is per default the first folder in the search path. If you have source code files (.Mod) in this folder, the Release.Build command will prefer these over files with the same name in the source code folder (default: ../../source)

Note: If you prefer the external WinAOS version where Oberon starts in an own window, replace WinAos by eWinAos in the Release.Build command above.

4. Create the WinAOS executable Aos.Exe. This is achieve by executing the command PELinker.Link --path=../ObjT/ Win32.Aos.Link ~. It means that the files described in Win32.Aos.Link should be linked. The object files used for this are located in ../ObjT/ and their file extension is .Obw The aos.exe file will be stored in the /WinAos/Work/ directory

5. Close WinAOS

6. Copy the file /WinAos/Work/aos.exe to /WinAos/aos.exe (preferrably don't overwrite the existing aos.exe. The WinAOS executable may have an arbitrary name, e.g. aos2.exe)

7. Adapt the search path in aos.ini. In the line

[Configuration] Paths.Search = Work;ObjE;../source;../UnixAos;vy.ants/source;Aos;vy.ants/documents

replace the object file folder (here: ObjE) by the new one (in this example: ObjT). The folders in this list are relative to the folder /WinAos/ so ObjT means /WinAos/ObjT/.

8. Be aware that the work folder appears in front of the object file folder in the search path. This means that object files located in the work folder (default: /WinAos/Work/) have preference over object files in the object file folder.

9. Start WinAOS. Note: The names of the executable and the object file folder are only relevant in means of the executable should be compatible with the object files

Create WinAosMini.zip

Open file file Win32.BuildMini.Tool and execute the SystemTools.DoCommands command. This will create the file WinAosMini.zip in the work directory. WinAosMini.zip is a mini WinAOS (no Oberon application, excludes some packages).

Build A2 within WinAOS


To start WinAOS as it is present in the SVN repository, you need at least a processor supporting SSE2 instructions (Pentium 4 or Athlon 64/Opteron and later models).

Object Files and Bootimage

Open the file Build.Tool (PET.Open Build.Tool ~). Building A2 in WinAOS requires a working directory Test located in the WinAOS folder. If does not exist, create a new directory in the WinAOS folder (e.g. /WinAOS/Test/). If it exists, it is sometimes necessary to make it empty before compiling.

To compile all modules of the A2 build, execute

 Release.Build --path="../Test/" A2 ~

In the case you created the directory with a different name, replace Test with the name of the directory you used in the previous step. Release.Build ... creates a file CompileCommand.Tool in directory Test and executes the commands in this file.

To link a boot image (e.g. IDE.Bin), execute

 Linker.Link \P../Test/ \.Obx ../Test/IDE.Bin  0100000H 1000H Kernel Traps 
ATADisks DiskVolumes DiskFS BootConsole ~

Note: The commands for linking the IDE/USB boot images can be found in Release.Tool and in Build.Tool

Creating A2 CD Image

Open the file Build.Tool (PET.Open Build.Tool ~). Follow the instructions there.

Build A2 in A2 (self contained build)

According to the following post in the forum Self contained build of A2 it should be possible to build A2 from within A2 by replacing in Build.Tool all occurences of the path prefix "../Test" with the prefix of a mounted device, e.g.: new: (of course after having mounted a partition with that name).

For mounting a different partition, see Partition.Tool (e.g., in André Fischer's guide).

Build UnixAOS within UnixAOS on Linux



For simplicity, we'll refer to current UnixAOS installation as <UnixAOS>, A2 sources directory as <A2> and your build directory as <Build>.

  • Create <Build>, then cd to it
  • Create symlinks for <A2>/source (as source), <A2>/UnixAOS (as Unix) and Unix/buildtools (as Tools), e.g.:
    • ln -s <A2>/source source
    • ln -s <A2>/UnixAOS Unix
    • ln -s Unix/buildtools Tools
  • Start previously installed UnixAOS
    • Open terminal
    • Type aos
  • Execute ReleaseBuild.Tool LinuxAOS ~, a CompileCommand.Tool will be generated and opened
  • Execute SystemTools.DoCommands (first command) in CompileCommand.Tool, wait until all modules are compiled correctly (watch the log)
  • If everything goes well, you can now execute:
     BootLinker.Link LinuxAOSCore :=
Trace Glue Unix Machine Heaps Modules Objects Kernel
Reals KernelLog Streams Commands TrapWriters Reflection
StdIO Traps Files UnixFiles Loader BootConsole ~
  • If everything goes well, restart aos to test the newly built system
  • If you're sure, copy the new LinuxAOSCore and .Obj files to your UnixAOS installation directory:
   cp LinuxAOSCore *.Obj <UnixAOS>/obj
  • In case you need a new bootloader, execute the following:
    • cd Unix/boot
    • make -f Makefile.linux
    • cp aos.linux <UnixAOS>
  • Now start aos normally and you will have the new system

Build an Image for VMware, VirtualBox or Bochs

Open Build.VMWare.Tool in PET and follow the steps outlined there.

If you are creating the image within WinAos, the requirements are the same as mentioned above in Build A2 within WinAOS.

Copyright © 2007 ETH Zürich
Page last modified on June 10, 2013, at 12:53 PM