-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
71 lines (47 loc) · 2.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FORGE: a new operating system
===============================
System Requirements
===================
FORGE on x86 requires a reasonably modern (Pentium4+) system to run.
You may run FORGE in as little as 16 MB of RAM.
Compile Requirements
====================
You'll need to have a cross-compiler capable of targeting ELF available to build
FORGE. Host triples that can be used for reference include:
* i586-none-elf
* arm-none-eabi (don't use arm-none-elf)
You will also need to install `clang' and `cppcheck' for static analysis.
If you wish to use clang/LLVM to compile FORGE, you will need a version of LLVM available, including llvm-gcc. It is recommended that you build one from source,
ideally from the Subversion repository, as this helps reduce a variety of issues
that can come up during the compilation process.
For x86, you will need `mkisofs'.
For ARM, you will need u-boot's mkImage program to be available.
Building FORGE
==============
If one does not exist, create a 'make.config' file with the following contents:
XCOMPILER_PATH := /path/to/your/cross/compiler/bin
XCOMPILER_PREFIX := {i[3456]86, arm}
To build for alternative targets such as ARM, you will also need to add and set:
* ARCH_TARGET - x86, arm
* ARCH_SUBTARGET - x86, x86_64 (not supported yet), arm
* PLATFORM_TARGET - pc, omap3
This just makes sure the build system knows where everything is on your
particular system.
Once everything's set up, just type:
make
The compilation will begin.
Running - x86
=============
Just boot the 'forge.iso' disc image in the 'build' directory.
For your convenience, a script to run QEMU is provided in the 'scripts'
directory.
Compiling with LLVM + clang
===========================
If you would like to compile FORGE with clang and use the LLVM backend instead
of GCC, this is currently supported for the kernel (but not KBoot for x86).
Simply add `USE_CLANG = yes' to your make.config and set the LLVM_PATH variable
to the location of your LLVM installation. For example, /home/user/llvm/bin.
It is highly recommended that you build LLVM from scratch, including compiler-rt
and llvm-gcc-4.2, in order to get the best results. Please note that to build
compiler-rt, you will need cmake 2.8.8+, and you should use ccmake instead of
autoconf to configure the LLVM+clang build.