Diff markup
001 001
002 SOS: A Simple Operating Sy 002 SOS: A Simple Operating System
003 003
004 Compilation/Installation/Test i 004 Compilation/Installation/Test instructions
005 005
006 006
007 Compilation 007 Compilation
008 =========== 008 ===========
009 009
010 IMPORTANT 010 IMPORTANT
011 --------- 011 ---------
012 012
013 Don't forget to run 'make clean' before 'make' 013 Don't forget to run 'make clean' before 'make' after you have modified
014 any source or header file(s). 014 any source or header file(s).
015 015
016 016
017 On a x86 host where grub is correctly installe 017 On a x86 host where grub is correctly installed
018 ---------------------------------------------- 018 -----------------------------------------------
019 019
020 Simply run 'make' 020 Simply run 'make'
021 021
022 022
023 On a non-x86 host (without grub of course !) 023 On a non-x86 host (without grub of course !)
024 -------------------------------------------- 024 --------------------------------------------
025 025
026 See extra/README 026 See extra/README
027 027
028 028
029 On an x86 host without Grub, or with a buggy G 029 On an x86 host without Grub, or with a buggy Grub
030 ---------------------------------------------- 030 -------------------------------------------------
031 031
032 See extra/README 032 See extra/README
033 033
034 How do I know I have a buggy grub installation 034 How do I know I have a buggy grub installation ? Answer: in the qemu
035 PC emulator, Grub hangs while loading the kern 035 PC emulator, Grub hangs while loading the kernel
036 036
037 037
038 Installation 038 Installation
039 ============ 039 ============
040 040
041 Nothing special to do besides compiling 041 Nothing special to do besides compiling
042 042
043 043
044 Test the SOS Kernel 044 Test the SOS Kernel
045 =================== 045 ===================
046 046
047 On a x86 real machine with Grub installed 047 On a x86 real machine with Grub installed
048 ----------------------------------------- 048 -----------------------------------------
049 049
050 1st method 050 1st method
051 => Boot the sos.elf file (append 'kernel=<p 051 => Boot the sos.elf file (append 'kernel=<path_to>sos.elf' in the
052 menu.lst or type it on Grub's command li 052 menu.lst or type it on Grub's command line) from a hard disk, a
053 floppy, or from the network 053 floppy, or from the network
054 054
055 2nd method 055 2nd method
056 => Copy the file 'fd.img' to a floppy and b 056 => Copy the file 'fd.img' to a floppy and boot from it
057 057
058 058
059 On a x86 real machine without Grub installed 059 On a x86 real machine without Grub installed
060 -------------------------------------------- 060 --------------------------------------------
061 061
062 1st method 062 1st method
063 => see extra/README to compile with the gru 063 => see extra/README to compile with the grub floppy image we provide,
064 copy the file 'fd.img' to a floppy, and 064 copy the file 'fd.img' to a floppy, and boot from it
065 065
066 2nd method 066 2nd method
067 => see extra/README to compile with the boo 067 => see extra/README to compile with the boot sector we provide,
068 copy the file 'extra/sos_bsect.img' to a 068 copy the file 'extra/sos_bsect.img' to a floppy, and boot from
069 it 069 it
070 070
071 071
072 Inside a PC emulator (x86 and non-x86 hosts) 072 Inside a PC emulator (x86 and non-x86 hosts)
073 -------------------------------------------- 073 --------------------------------------------
074 074
075 Tested on both the bochs emulator (x86/linux, 075 Tested on both the bochs emulator (x86/linux, sparc/solaris and
076 ppc/linux hosts, 'apt-get install bochs-x vgab 076 ppc/linux hosts, 'apt-get install bochs-x vgabios' on debian
077 testing/unstable), and the qemu system emulato 077 testing/unstable), and the qemu system emulator (with libsdl
078 installed: 'apt-get install libsdl1.2-dev' on 078 installed: 'apt-get install libsdl1.2-dev' on debian
079 testing/unstable). 079 testing/unstable).
080 080
081 081
082 1/ Grub is installed on the host (x86 hosts o 082 1/ Grub is installed on the host (x86 hosts only)
083 - - - - - - - - - - - - - - - - - - - - - - - 083 - - - - - - - - - - - - - - - - - - - - - - - - -
084 084
085 bochs: boot from the file 'fd.img'. Example 085 bochs: boot from the file 'fd.img'. Example of a ~/.bochsrc:
086 floppya: 1_44=/home/d2/sos/fd.img, st 086 floppya: 1_44=/home/d2/sos/fd.img, status=inserted
087 romimage: file=/usr/share/bochs/BIOS-b 087 romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
088 vgaromimage: /usr/share/vgabios/vgabios.b 088 vgaromimage: /usr/share/vgabios/vgabios.bin
089 megs:63 # 63 Mo de RAM 089 megs:63 # 63 Mo de RAM
090 090
091 qemu: run 'qemu -fda fd.img' 091 qemu: run 'qemu -fda fd.img'
092 If grub hangs while loading the kernel, p 092 If grub hangs while loading the kernel, please go to method 2/
093 093
094 094
095 2/ Grub is not installed (all hosts) 095 2/ Grub is not installed (all hosts)
096 - - - - - - - - - - - - - - - - - - 096 - - - - - - - - - - - - - - - - - -
097 097
098 See extra/README to generate a floppy image 098 See extra/README to generate a floppy image with the Grub floppy
099 image we provide, and: 099 image we provide, and:
100 100
101 bochs: boot from the file 'fd.img' 101 bochs: boot from the file 'fd.img'
102 102
103 qemu: run 'qemu -fda fd.img' 103 qemu: run 'qemu -fda fd.img'
104 104
105 105
106 3/ Bonus: boot with the bootsector we provide 106 3/ Bonus: boot with the bootsector we provide (all hosts)
107 - - - - - - - - - - - - - - - - - - - - - - - 107 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
108 108
109 See extra/README to generate a floppy image 109 See extra/README to generate a floppy image with the boot sector we
110 provide, and: 110 provide, and:
111 111
112 bochs: boot from the file 'extra/sos_bsect. 112 bochs: boot from the file 'extra/sos_bsect.img'
113 113
114 qemu: run 'qemu -fda extra/sos_qemu.img' 114 qemu: run 'qemu -fda extra/sos_qemu.img'
115 115
116 NOTE: This technique assumes that INT 15H is 116 NOTE: This technique assumes that INT 15H is supported by the
117 machine's BIOS. This should be OK for the va 117 machine's BIOS. This should be OK for the vast majority of targets
118 (bochs, qemu, recent machines), but we do no 118 (bochs, qemu, recent machines), but we do not guarantee it. In case
119 of doubt, please use Grub. 119 of doubt, please use Grub.
120 120
121 121
122 NOTE : recommended versions of the tools 122 NOTE : recommended versions of the tools
123 ---------------------------------------- 123 ----------------------------------------
124 124
125 Release development platform: 125 Release development platform:
126 126
127 - OS : Linux 2.6.14.3 x86_64 127 - OS : Linux 2.6.14.3 x86_64
128 - gcc : i586-pc-elf-gcc-4.0.2 (GCC) 128 - gcc : i586-pc-elf-gcc-4.0.2 (GCC) 4.0.2
129 - GNU binutils : GNU ld version 2.16 129 - GNU binutils : GNU ld version 2.16
130 - GNU make : GNU Make 3.80 130 - GNU make : GNU Make 3.80
131 131
132 Usual development platforms known to work: 132 Usual development platforms known to work:
133 133
134 + amd64 (x86_64)/debian sarge: 134 + amd64 (x86_64)/debian sarge:
135 - OS : Linux 2.6.14.3 x86_64 135 - OS : Linux 2.6.14.3 x86_64
136 - gcc : i586-pc-elf-gcc-4.0.2 (GCC 136 - gcc : i586-pc-elf-gcc-4.0.2 (GCC) 4.0.2
137 - GNU binutils : GNU ld version 2.16 137 - GNU binutils : GNU ld version 2.16
138 138
139 + x86/debian sarge: 139 + x86/debian sarge:
140 - OS : Linux 2.6.11.7-d2-1 i686 140 - OS : Linux 2.6.11.7-d2-1 i686
141 - gcc : gcc (GCC) 3.3.6 (Debian 1: 141 - gcc : gcc (GCC) 3.3.6 (Debian 1:3.3.6-5)
142 - GNU binutils : GNU ld version 2.15 142 - GNU binutils : GNU ld version 2.15
143 143
144 + ppc/debian sarge: 144 + ppc/debian sarge:
145 - OS : Linux 2.6.10-powerpc ppc 145 - OS : Linux 2.6.10-powerpc ppc
146 - gcc : gcc (GCC) 3.2.2 146 - gcc : gcc (GCC) 3.2.2
147 - GNU binutils : GNU ld version 2.13.2 147 - GNU binutils : GNU ld version 2.13.2
148 148
149 + x86/windows with cygwin (http://sos.enix.or 149 + x86/windows with cygwin (http://sos.enix.org/SOSFaq#TOC_0_2_1):
150 - OS : MS Windows XP Pro SP2 / Cy 150 - OS : MS Windows XP Pro SP2 / Cygwin
151 - gcc : gcc 3.4.4 151 - gcc : gcc 3.4.4
152 - GNU binutils : GNU ld version 2.16 152 - GNU binutils : GNU ld version 2.16
153 - GNU make : GNU Make 3.80 153 - GNU make : GNU Make 3.80
154 154
155 -- 155 --
156 David Decotigny 156 David Decotigny