LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Understanding the boot process? (https://www.linuxquestions.org/questions/programming-9/understanding-the-boot-process-191060/)

rene.dd 06-08-2004 07:21 AM

Understanding the boot process?
 
Hi,

I'm trying to develop my own OS (call me crazy, but it's challenging and I want to do that).
I wrote a boot loader and the code that initializes my (not yet existing) kernel in assembly language. Now I'm trying to write my kernel in C. And here my first real problem occurs. Ok, I've not come far but anyway:

Can anybody explain to me how kernel sources have to be linked? I checked the linux sources and makefiles for help, but I don't really understand it.
If I compile my stuff the way the linux kernel is compiled, ld always assumes that my main function starts at something like 0x08048090, but I actually load it at somewhere about 0x6000 (0x0008:0x6xxx in 32bit pm).

Does anybody know how I can tell gcc or ld to organize the memory the way I want it or how the linux kernel linking process really works?

(Linux 0.0.0.1 is first loaded at 0x1000:0 and then copied down to 0x0000 (real mode), so there should have been the same problem).

Thank you.
René

320mb 06-09-2004 10:36 AM

have you read this:
From Power Up To Bash Prompt


All times are GMT -5. The time now is 04:02 PM.