New to OS Dev.
New to OS Dev.
Hello, you coding gurus you.
Anywho, Im just putting a post here to say Hi, im a new OS Dever and that if possible, I would like it if someone could take me under their wing and teach me a few things about OS Dev.
Ive written a basic bootloader and such before, but whenever I Called a function in the kernel, it would jump to that function and then crash on the return.
Im not sure why, I figure it must have been a stack problem.
That was a year ago and Im keen to retry OS Development.
I run GCC on Linux, NASM is my Assembler.
Ive read the OSDev Wiki and Ive read through many of the tutorials on Bonafide OS Dev.
Im a decent C++ Programmer and Im just ahead of being a total newb to Assembler. I can code in Assembler aslong as I have a lot of references and Ralf Browns INterrupt list open.
So yeah, If anyone is willing to help me out and teach me, Itd be great.
Thanks!
~Kyretzn
Anywho, Im just putting a post here to say Hi, im a new OS Dever and that if possible, I would like it if someone could take me under their wing and teach me a few things about OS Dev.
Ive written a basic bootloader and such before, but whenever I Called a function in the kernel, it would jump to that function and then crash on the return.
Im not sure why, I figure it must have been a stack problem.
That was a year ago and Im keen to retry OS Development.
I run GCC on Linux, NASM is my Assembler.
Ive read the OSDev Wiki and Ive read through many of the tutorials on Bonafide OS Dev.
Im a decent C++ Programmer and Im just ahead of being a total newb to Assembler. I can code in Assembler aslong as I have a lot of references and Ralf Browns INterrupt list open.
So yeah, If anyone is willing to help me out and teach me, Itd be great.
Thanks!
~Kyretzn
Re:New to OS Dev.
welcome to the (as I'm aware of) most visited osdev forum. If you need any teachings, then I guess the only good way would be to ask questions on this forum.
Re:New to OS Dev.
Well, First lesson is that I need to make a bootloader.
Personally, Id like the bootloader to use FAT12. So, I can just drag and drop the Kernel from say, linux or windows onto the Diskette.
But... Im completely unsure how to implement the FAT12 filesystem, I know how to just ... READ the Kernel's code into memory via BIOS I/O functions...
scratch it, I need major help writing a bootloader.
Its silly I know, its just, I learn better with someone kind of teaching me.
Ive been reading for the psat 2 hours on the OSFAQ and scanning through websites about Bootloaders and FAT12.
Quick question though, Can I use GCC on Linux + NASM to make a Bootloader and Kernel? Im sure I can, im just not entirely sure. I mean, I can compile normal applications and such I built myself in GCC easy enough.
~Kyretzn
Personally, Id like the bootloader to use FAT12. So, I can just drag and drop the Kernel from say, linux or windows onto the Diskette.
But... Im completely unsure how to implement the FAT12 filesystem, I know how to just ... READ the Kernel's code into memory via BIOS I/O functions...
scratch it, I need major help writing a bootloader.
Its silly I know, its just, I learn better with someone kind of teaching me.
Ive been reading for the psat 2 hours on the OSFAQ and scanning through websites about Bootloaders and FAT12.
Quick question though, Can I use GCC on Linux + NASM to make a Bootloader and Kernel? Im sure I can, im just not entirely sure. I mean, I can compile normal applications and such I built myself in GCC easy enough.
~Kyretzn
Re:New to OS Dev.
Yes, you can use GCC and NASM. There are just some flags you'll need to pass to the compiler.
And why do you need to make your own bootloader? There are plenty of good ones out there already!
And why do you need to make your own bootloader? There are plenty of good ones out there already!
Re:New to OS Dev.
Because I want to be able to put my little OS Diskette in most x86s and be able to run it.
Besides, I want to learn how to do bootloaders.
Most of the Assembler in examples I see, I dont understand.
~Kyretzn
Besides, I want to learn how to do bootloaders.
Most of the Assembler in examples I see, I dont understand.
~Kyretzn
Re:New to OS Dev.
For your first reason: Standard bootloaders like GRUB can pretty much boot a hard disk, floppy or sometimes even CD-ROM for any architecture they support.
For your second reason: That's a good reason.
For your final statement: You've got a hell of a lot of learning to do. Get cracking.
For your second reason: That's a good reason.
For your final statement: You've got a hell of a lot of learning to do. Get cracking.
Re:New to OS Dev.
Crazed, Do you use MSN? itd be handy if I could ask you questions in realtime. Id learn faster.
Im reading NASM docs now.
Interesting.
anddd.. Ive coded a basic little bootloader.
It just starts up.
Jumps to 0000:7C00h
then proceeds to load a sector of data from the disk
then jumps to that sector that it loaded in memory.
Im not sure, but when should I set SS / DS or whatever?
Also, What role to SS and DS play?
Thanks!
~Kyretzn
Im reading NASM docs now.
Interesting.
anddd.. Ive coded a basic little bootloader.
It just starts up.
Jumps to 0000:7C00h
then proceeds to load a sector of data from the disk
then jumps to that sector that it loaded in memory.
Im not sure, but when should I set SS / DS or whatever?
Also, What role to SS and DS play?
Thanks!
~Kyretzn
Re:New to OS Dev.
1. I use GAIM, very occasionally.
2. I don't know all the answers.
3. I just answered your other thread.
4. OS called: sleep("Crazed123");
5. Good luck, my best advice is to RTFM, STFW and Read The FAQ. They help loads, in addition to the Intel Manuals.
2. I don't know all the answers.
3. I just answered your other thread.
4. OS called: sleep("Crazed123");
5. Good luck, my best advice is to RTFM, STFW and Read The FAQ. They help loads, in addition to the Intel Manuals.
Re:New to OS Dev.
STFW?
Thanks for answering the other thread, im reading through that part of the FAQ now
~Kyretzn
Thanks for answering the other thread, im reading through that part of the FAQ now
~Kyretzn
Re:New to OS Dev.
The simple answer to "What is STFW?", is, quite simply, to STFW.
http://www.google.com/search?q=STFW
http://www.google.com/search?q=STFW
Re:New to OS Dev.
It might seem like trying to hide from the problems of coding your own bootloader, but it is really better to just use grub.
And i think grub can boot a kernel from a fat fs too...
It is also rather easy to use.
I also tried to use my own loader (which seemed to work) but my everytime my kernel became bigger then a certain size noting would work anymore. This was because of some problem with the bootloader.
I think it is just more secure to use grub - then you can focus on fixing the n bugs that you will definitely encounter inside your kernel, without having to wonder if it is your kernel's fault or the boot loader's and so on.
And i think grub can boot a kernel from a fat fs too...
It is also rather easy to use.
I also tried to use my own loader (which seemed to work) but my everytime my kernel became bigger then a certain size noting would work anymore. This was because of some problem with the bootloader.
I think it is just more secure to use grub - then you can focus on fixing the n bugs that you will definitely encounter inside your kernel, without having to wonder if it is your kernel's fault or the boot loader's and so on.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:New to OS Dev.
First, welcome to the realms of debug sessions darker than night!Kyretzn wrote: Well, First lesson is that I need to make a bootloader.
Personally, Id like the bootloader to use FAT12. So, I can just drag and drop the Kernel from say, linux or windows onto the Diskette.
scratch it, I need major help writing a bootloader.
Its silly I know, its just, I learn better with someone kind of teaching me.
Ive been reading for the psat 2 hours on the OSFAQ and scanning through websites about Bootloaders and FAT12.
~Kyretzn
You will of course need more than average coding knowledge. You'll need inspiration and dedication to get it done .
Anyway. You wanna write your own boot loader? Good so, just go ahead. It's a nice experience and a fine entry to development without any supporting libraries. Just keep in mind: There are very good boot loaders outta there, GRUB among them. They do most of that startup and loading work for you and come along with fs interpreters. You might want to use one of them after some time spent with your own one.
For reference, just Search the Fcuking Web for John Fine's website. Also, Christopher Giese's website offers quite some interresting stuff. You may want to check the quick-linkz topic in the osdev forum for further references. Or just search the forum for "boot loaders"
Just be patient. Most of us don't want to explain these basic things over and over again. Keep in mind, that some of us (I f. ex. ) are busy with gaining their lifes coz nothing comes for free, eh? - or studying in the evening, after work.
@freanan: That's most prolly been because you haven't fetched all blocks of the Kernel into memory.
NOw letz finish it Just go ahead, do oyur homework and if there's some problem, ask us.
Stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:New to OS Dev.
I'd say you need some book like L'Assembleur Facile. I don't know the pending of that book in other languages, but i guess they exists (If some of you have a good reference - i mean a pocket book covering stuff like "binary arithmetic", "using the stack", "coding a loop in assembly", "how repmovsb works", "BIOS interrupts", etc. , would you mind posting it in the "books" thread ?)Im not sure, but when should I set SS / DS or whatever?
Also, What role to SS and DS play?
If i might do an advice for an OS dever newbie, it would be "go ahead: write your bootsector and try to load a "hello world" kernel with it. Don't spend more 2 weeks on it. After two weeks, make sure you're ready to do the big jump and go to grub".It might seem like trying to hide from the problems of coding your own bootloader, but it is really better to just use grub.
And i think grub can boot a kernel from a fat fs too...
See "boot" in the FAQ and http://www.osdev.org/osfaq2/index.php/BabyStep for locally-owned material.
or even doing both (i guess that's why clicker is progressing so sloowly these last monthes)Most of us don't want to explain these basic things over and over again. Keep in mind, that some of us (I f. ex. ) are busy with gaining their lifes coz nothing comes for free, eh? - or studying in the evening, after work.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:New to OS Dev.
@pype: me too. 've taken the plunge finally and am starting to dive into the world of academia. And maths. again maths. *rofl*
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:New to OS Dev.
Hi,
Go ahead: write your bootsector and try to load a "hello world" kernel with it. Don't spend more 2 weeks on it. After two weeks, make sure you're ready to do the big jump and go to grub". Then, after playing with GRUB and your toy/hobby OS for years you may eventually reach the point where you're ready to start working on a serious OS. If/when you reach this point, work out an OS design based on everything you've learnt, and then you'll probably realise that you need to dump GRUB (and FAT) and go back to writing your own boot loader.
Cheers,
Brendan
I completely agree, but I'd look a little more into the future. Something like:Pype.Clicker wrote:If i might do an advice for an OS dever newbie, it would be "go ahead: write your bootsector and try to load a "hello world" kernel with it. Don't spend more 2 weeks on it. After two weeks, make sure you're ready to do the big jump and go to grub".
Go ahead: write your bootsector and try to load a "hello world" kernel with it. Don't spend more 2 weeks on it. After two weeks, make sure you're ready to do the big jump and go to grub". Then, after playing with GRUB and your toy/hobby OS for years you may eventually reach the point where you're ready to start working on a serious OS. If/when you reach this point, work out an OS design based on everything you've learnt, and then you'll probably realise that you need to dump GRUB (and FAT) and go back to writing your own boot loader.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.