001
002 Contents of the extra/ directory
003 ================================
004
005 Data and configuration files to support generation of sos on non-x86
006 and/or grub-less hosts:
007 - dot.mkvars: file to copy as .mkvars in the root directory to
008 compile on a non-x86 host, and to generate the grub floppy image on
009 a grub-less host
010 - grub.img.gz: compressed image of a Grub floppy (without any
011 kernel). Used by dot.mkvars.
012 - mtoolsrc: file needed by .mkvars to compile a the floppy image
013
014 Support of a sos-specific boot sector:
015 - Makefile: rules to compile sos_bsect.img, the floppy image with the
016 boot sector and the Sos
017 - bootsect.S: x86 Sos boot sector (GNU as). Depends on sos_bsect.lds
018 - sos_bsect.lds: ld script to bind the boot sector with the remaining
019 of the kernel
020
021 Misc:
022 - qemu-port-e9.diff: patch over qemu to support the bochs "port 0xe9 hack"
023
024
025 What you can do with these files
026 ================================
027
028
029 *** Compile SOS from another architecture:
030 ------------------------------------------
031 - compile a cross-compiler for the i586-gnu target. This involves
032 compiling the binutils and gcc. Here are example configuration
033 options for them:
034 binutils (replace sparc-cun-solaris with your arch):
035 ../binutils-2.13/configure --prefix=/udd/ddecotig/temp_dd/xgcc/host-sparc-solaris7/stow/binutils-2.11 --host=sparc-sun-solaris2.7 i586-gnu
036 make && make install
037 gcc (ditto):
038 CFLAGS="-O2 -Dinhibit_libc" ../gcc-3.2/configure --target=i586-gnu --prefix=/udd/ddecotig/temp_dd/xgcc/host-sparc-solaris7/stow/gcc-3.2 --with-as=/udd/ddecotig/temp_dd/xgcc/host-sparc-solaris7/bin/as --with-ld=/udd/ddecotig/temp_dd/xgcc/host-sparc-solaris7/bin/ld --with-gnu-as --with-gnu-ld --enable-languages=c --disable-shared --disable-multilib --disable-nls --enable-threads=single
039 make && make install
040 - compile the mtools
041 - copy dot.mkvars to the root directory of SOS, as ".mkvars"
042 - customize the CC/LD/... variables to suit your cross-compiler
043 installatioon
044 - now you may run make from the SOS root directory, it should
045 generate the Grub boot floppy image. The following warning is
046 normal:
047 .mkvars:16: attention : écrasement des commandes pour la cible « grub-sos.img »
048 Makefile:92: attention : anciennes commandes ignorées pour la cible « grub-sos.img »
049
050
051 *** To compile SOS from an x86 where grub is not or incorrectly installed:
052 --------------------------------------------------------------------------
053 - copy dot.mkvars to the root directory of SOS, as ".mkvars"
054 - customize the CC/LD/... variables to suit your cross-compiler
055 installatioon
056 - now you may run make from the SOS root directory, it should
057 generate the Grub boot floppy image. The following warning is
058 normal:
059 .mkvars:16: attention : écrasement des commandes pour la cible « grub-sos.img »
060 Makefile:92: attention : anciennes commandes ignorées pour la cible « grub-sos.img »
061
062
063 *** To compile SOS with its own bootloader:
064 -------------------------------------------
065 - for cross-architecture compilation: see above
066 - cd to this extra/ directory
067 - run 'make'
068 - the floppy image is: sos_bsect.img for use with bochs or on a real
069 floppy disk
070 to use the image under qemu: use sos_qemu.img
071
072 NOTE : From article 2 onward, be warned that using this bootsect
073 might lead to system crashes. This would be because the
074 solution we use to retrieve the RAM size might not work
075 properly on some systems (BIOS buggy or more than 1G RAM). THE
076 best way to boot SOS is always to use Grub.
077
078
079 --
080 David Decotigny