next up previous
Next: Compiling and Using Up: Introduction Previous: Introduction

Library Structure

OSLib is composed of some libraries, that can be compiled using the standard GNU tools (gcc, GNU binutils and GNU make) either under MSDOS or Linux (DJGPP for DOS and gcc for Linux have been successfully tested; gcc for other Unix systems or Cygnus gcc for Windows have not been tested yet, but will probably work too). The resulting GNUCoff or ELF MultiBoot compliant images can be loaded using a custom provided DOS eXtender (X) or using the GNU Grand Unified Boot Loader (GRUB).

The code is organized in three parts:

The hardware support library contains the boot code for starting up the system when a MultiBoot compliant loader is used, the code to access hardware structures such as the GDT, IDT, the interrupt controller, the code to detect the CPU, and some data structures containing informations about the system.

The OS independent part of the C library provides all the functions from libc that can be implemented without invoking system calls (typically the string management functions, the memory copy/move/compare, the math functions and similar). An important exception to this rule is represented by the cprintf function: it is similar to the standard printf function (with the difference that cprintf directly writes to the screen), and, since it needs to access the video memory, it depends by the OS (in particular, cprintf depends on how the OS remaps the video memory). In any case, since the OS code needs to output some informations for debugging or other purposes, this function is provided by libc1. libc1 does not provide any input function.

The Kernel support library provides:


next up previous
Next: Compiling and Using Up: Introduction Previous: Introduction
Luca Abeni 2001-01-18