background preloader

Expanded Main Page

Expanded Main Page

MenuetOS Writing device drivers in Linux: A brief tutorial How to develop your own Boot Loader HoH Download bootloader - 1.92 MB Table of content 1. Who may be interested Most of all I’ve written this article for those who have been always interested in the way the different things work. We will describe what is going after you turn on a computer; how the system is loading. What is Boot Loader Boot loader is a program situated at the first sector of the hard drive; and it is the sector where the boot starts from. Be ready to go deeper In this section I will tell about knowledge and tools you need to develop your own boot loader and also remind some useful information about system boot. So what language you should know to develop Boot Loader On the first stage on the computer work the control of hardware is performed mainly by means of BIOS functions known as interrupts. In this article the main development languages is C++. If you know Java or C# well unfortunately it won’t help for our task. What compiler you need Now let’s talk about some special moments. How system boots Let’s code . . .

How statically linked programs run on Linux In this article I want to explore what happens when a statically linked program gets executed on Linux. By statically linked I mean a program that does not require any shared objects to run, even the ubiquitous libc. In reality, most programs one encounters on Linux aren’t statically linked, and do require one or more shared objects to run. However, the running sequence of such programs is more involved, which is why I want to present statically linked programs first. The Linux kernel Program execution begins in the Linux kernel. sys_execve does a lot of work to prepare the new program for execution. As part of its job, the kernel must read the program’s executable file from disk into memory and prepare it for execution. The kernel reads the ELF header of the program, and looks for a PT_INTERP segment to see if an interpreter was specified. The kernel then goes on mapping the program’s segments into memory, according to the information contained in the ELF program headers. It works.

Wiki maintained by as group of operating system developers. Contains good information by kaspervandenberg Jan 24

Related: