C, linkers, bootloaders, assembly
C, linkers, bootloaders, assembly
Hi I am Jackson, and I a beginner on Operating system development and I know this site said that it was not for beginners but, I understand a lot of the basic stuff except one tutorial the making a simple c kernel. The thing I don't understand is the linker or about the GRUB boot loader. So am asking if any of you know of a better place for beginner Operating system design or if you could give me a simpler way or explain the tutorial.
Thanks
Thanks
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: C, linkers, bootloaders, assembly
Actually, the requirements are about not being a beginner developer. Everybody is elegible for some help in OS development, but it will be really frustrating if you are not professional and self-sufficient enough to write big programs and make them bug-free, then the complex task of OS development is not suited for you. For instance: a tutorial. You should be able to run through it without necessarily understanding it. Yet you get stuck in there.
My recommendation is that you start on something complex for your standards, like a 3D game from scratch (a pong clone, maybe). The skills you improve from that will later help you doing the more complex task of writing an OS.
My recommendation is that you start on something complex for your standards, like a 3D game from scratch (a pong clone, maybe). The skills you improve from that will later help you doing the more complex task of writing an OS.
Re: C, linkers, bootloaders, assembly
LD - the linker takes all the code you've compiled and links it together. Pretty much glues all the parts, because when you compiled the code for assembly it has no idea about kmain, but a mere name. And vice versa.
Now GRUB (Grand Unified Boot Loader) is a program that loads your OS - it's like your OS is a child and needs a safe environment (Protected Mode) to live in. And GRUB does all that for you. And the rest of that tutorial is on creating a floppy and copying GRUB and your OS on it.
A tutorial, that I found rather simple, would be Bran's Kernel Development Tutorial
Now GRUB (Grand Unified Boot Loader) is a program that loads your OS - it's like your OS is a child and needs a safe environment (Protected Mode) to live in. And GRUB does all that for you. And the rest of that tutorial is on creating a floppy and copying GRUB and your OS on it.
A tutorial, that I found rather simple, would be Bran's Kernel Development Tutorial
Re: C, linkers, bootloaders, assembly
Hi, its me again and I have already been in game, and web devepment and I found them rather boring and when I finally came across to OS development it was a challenge. So I not a beginner programmer just a beginner operating system designer. I understand assembly and c but I don't understand GRUB. I know what it is and all, but all the "equ 0>>1" and the "ALIGN" doesn't make sense to me so I figured if any of you could give me a link to a website or just give me a better understanding of how GRUB works it would help me a lot.
And on the last post thank you for the info but I understand that but I don't understand Bran's Kernel Development very well because it uses GRUB and doesn't explain it very well in my propective
And on the last post thank you for the info but I understand that but I don't understand Bran's Kernel Development very well because it uses GRUB and doesn't explain it very well in my propective
Re: C, linkers, bootloaders, assembly
Just tell us what exactly you don't understand,
all the "equ 1<<0" and "equ 1<<1" is just setting flags for GRUB. equ stands for equals "<<" are shifts.
ALING ensures that your "sections" are multiples of ALING, ex. if my code is 985 bytes of code and ALING is set to 1024 my code will take up 1024 bytes.
all the "equ 1<<0" and "equ 1<<1" is just setting flags for GRUB. equ stands for equals "<<" are shifts.
ALING ensures that your "sections" are multiples of ALING, ex. if my code is 985 bytes of code and ALING is set to 1024 my code will take up 1024 bytes.
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: C, linkers, bootloaders, assembly
I'm assuming your talking about the multiboot header with the 'equ 1<<1' stuff. If your a beginner to os developing, then you don't have to worry about it or understand it. Just don't worry about it until later.
P.S: Nessphoro's explanation is right about equ 1<<1 stuff.
P.S: Nessphoro's explanation is right about equ 1<<1 stuff.
Re: C, linkers, bootloaders, assembly
I just have 2 questions for you.
1. What book would be good on OS development for me, if there is a one for me.
2. Second is there any OS that I could mabye study the source code (ex. MINIX).
Thanks for your help.
1. What book would be good on OS development for me, if there is a one for me.
2. Second is there any OS that I could mabye study the source code (ex. MINIX).
Thanks for your help.
Re: C, linkers, bootloaders, assembly
1. http://wiki.osdev.org/Bookssds2017 wrote:I just have 2 questions for you.
1. What book would be good on OS development for me, if there is a one for me.
2. Second is there any OS that I could mabye study the source code (ex. MINIX).
Thanks for your help.
2. Linux
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: C, linkers, bootloaders, assembly
+1. Steal Linux's driver code if you have to but ignore it's design.
Re: C, linkers, bootloaders, assembly
http://prex.sourceforge.net/ is also a fairly nicely laid out and well documented operating system.
I sympathise about Grub. Usability is just f***ing awful, however fortunately you don't need it to develop an OS, you can just use the -kernel option of Qemu to boot your Multiboot binaries directly. When you have your kernel working perfectly (cough...), then you can come back to the forum and ask about Grub .
Berkus: I believe him. I can remember a friend in the gaming business porting a game from the PC to the PS1. There was no assembler, all the graphics programming was done via C libraries supplied by Sony. I imagine that >10 years on anything that needs optimizing is either bought as a library or has already been developed by any software house worth it's salt, so I can believe the majority of gaming coders just concentrate on the gaming logic rather than performance issues.
regards,
Biff.
I sympathise about Grub. Usability is just f***ing awful, however fortunately you don't need it to develop an OS, you can just use the -kernel option of Qemu to boot your Multiboot binaries directly. When you have your kernel working perfectly (cough...), then you can come back to the forum and ask about Grub .
Berkus: I believe him. I can remember a friend in the gaming business porting a game from the PC to the PS1. There was no assembler, all the graphics programming was done via C libraries supplied by Sony. I imagine that >10 years on anything that needs optimizing is either bought as a library or has already been developed by any software house worth it's salt, so I can believe the majority of gaming coders just concentrate on the gaming logic rather than performance issues.
regards,
Biff.
Re: C, linkers, bootloaders, assembly
Thanks again for the info. Along with the recommendations would Operating Systems: Design and Implementation(3rd Edition) be a good book to learn basic theory and understand MINIX.