This does not belong here. We'll have to find somewhere else to
[newos.git] / docs / building.html
blob6f080b1f4b19fce41a78545fd2fd11e0f9309da9
1 <html>
2 <head>
3 <title>The NewOS Operating System: Docs</title>
4 </head>
5 <body BGCOLOR="#FFFFFF">
7 <h1 align="center">Building NewOS</h1>
9 <hr>
11 <hr>
13 <table border="0" width="100%" bgcolor="#E8E8E8">
14 <tr>
15 <td width="100%" height="100%" valign="top" align="left">
16 <ul>
17 <h4>You'll Need:</h4>
18 <li>GNU C</li>
19 <li>GNU gmake</li>
20 </ul>
21 Building the x86 version of the OS should be relatively easy if you have
22 a x86 host running the GNU C toolchain <b>that builds elf binaries</b>.
23 This means the default cygwin installation will not build NewOS correctly,
24 since the default toolchain makes windows binaries. I've managed to manually
25 build gcc and binutils for cygwin, though, and you can get it
26 <a href="http://www.newos.org/snapshots/cygwin_toolchain-i386-linux.tar.gz">here</a>,
27 though it may or may not work on your cygwin setup. I've personally built it
28 on Cywgin, BeOS, FreeBSD, Linux, and Solaris 8 (SPARC).
29 <br><br>
31 To make a floppy image (pretty much what you'll always want to do):<br>
32 type <b>make floppy</b>. It will put the final disk image in <b>boot/i386/final</b>.
33 This is the file you want to write to a floppy to boot.
34 <br><br>
36 NOTE: you need to be running the GNU make. On some systems (FreeBSD), GNU make is
37 called gmake. So, if you get a bunch of make errors and it bails really quickly,
38 try <b>gmake</b> instead of <b>make</b>.
39 <br><br>
41 The first time you run it may spit out a ton of warnings about missing .d files,
42 this is normal. The make system hasn't built all of the dependency files yet.
43 When it sees one is missing, it'll build it.
44 <br><br>
46 Sometimes the make system will get confused if it has a bad .d file or something
47 along those lines. In that case try running <b>make allclean</b>, this will take the
48 system back to it's default state. <b>make clean</b> removes all the compiled code
49 and targets, but not the .d files.
50 <br><br>
52 Building non-native ports are a bit more involved. To build them, you need a
53 GNU C toolchain compiled for the target processor. I compiled them all as arch-elf,
54 where arch is defined as the target architecture. For example, on my Sparc Solaris box,
55 I have a toolchain installed at /usr/local/i386-elf/, /usr/local/sh-elf/, etc. I placed
56 /usr/local/arch-elf/bin in the path and set the environment variable ARCH to be the
57 architecture. Valid ones are 'i386','sh'. Hopefully should work. The build system
58 will be looking for files like sh-elf-gcc and sh-elf-ld. It may be confused for
59 whatever reason and not find the proper target, in which case please email me at
60 <a href="mailto:geist@newos.org">geist@newos.org</a> and I'll try to fix the make
61 system to recognize your case.
62 </td>
63 </tr>
64 </table>
66 <hr>
68 <table border="1" width="100%" bgcolor="#D9D5FF">
69 <tr>
70 <td width="100%" height="49" valign="top" align="center"><small><font color="#000000">This
71 page copyright 2002 </font></small><font size="2">© <a href="mailto:geist@newos.org">Travis
72 Geiselbrecht</a><br>
73 Any questions, comments, gripes, whatever:
74 <a href="mailto:geist@newos.org">geist@newos.org</a></font>
75 </td>
76 </tr>
77 </table>
79 </body>
80 </html>