New to OS development

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Troy
Posts: 5
Joined: Fri Apr 03, 2015 12:58 pm

New to OS development

Post by Troy »

Hi my name is Troy, I'm 14 years old and have been trying to make my own os. Its been quite difficult, but so far its going well. We have a kernel that compiles, but, my issue is, how do I get it to boot? i know it will work, but we would like to use grub. And every time I compile, it turns into a obj file. I am using Bloodshed dev-c++. How do I correct this problem? I would like a different format. I also tried the one on osdev.org with the linker.ld but that didnt work because i have a 64bit PC. All help would be appreicated.

-troy


kanagawa-os.com/project.
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: znew to OS development

Post by BrightLight »

It's nice to see other OS developer who is also 14 years old. :D
To get your kernel to boot with GRUB, you need to create the multiboot header somewhere in the first 8 KB of your kernel. Which compiler you're using doesn't matter. GRUB can boot any file with a valid multiboot header.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: New to OS development

Post by sortie »

Follow http://wiki.osdev.org/Bare_Bones. It's our standard tutorial.
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: znew to OS development

Post by Roman »

omarrx024 wrote:Which compiler you're using doesn't matter.
A cross-compiler is recommended, and I don't think, that GRUB can load anything with just a header, because some file formats need specific setup.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
TheLittleWho
Member
Member
Posts: 51
Joined: Sun Mar 01, 2015 7:58 am

Re: New to OS development

Post by TheLittleWho »

Follow Bare Bones from wiki and you will get a boot-able kernel... Don't forget to configure a cross compiler... If you have a problem, you can here, there is a lot of people that can help you... But before post anything here, a Google Search can be magical :))
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: znew to OS development

Post by BrightLight »

Roman wrote:A cross-compiler is recommended, and I don't think, that GRUB can load anything with just a header, because some file formats need specific setup.
Yes we should use a cross-compiler. Oh, and from the Wiki:
GRUB ... can load kernels in various binary formats, including "generic" ELF, FreeBSD a.out, flat binary, and "generic" executables (any file with a valid Multiboot header). - GRUB
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: znew to OS development

Post by Roman »

omarrx024 wrote:Oh, and from the Wiki:
GRUB ... can load kernels in various binary formats, including "generic" ELF, FreeBSD a.out, flat binary, and "generic" executables (any file with a valid Multiboot header). - GRUB
Load, but not prepare. GRUB won't magically do relocation for an unknown format, I guess.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: znew to OS development

Post by BrightLight »

Roman wrote:Load, but not prepare. GRUB won't magically do relocation for an unknown format, I guess.
It won't relocate, but it will execute. Anyways, most kernels will start at 0x100000.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: New to OS development

Post by mac »

Hehe, I'm 23, I am not experienced enough for OsDev yet, but seeing two 14 year olds being able to OsDev gives me hope.

I wanted to program since I was your age, but I was making up excuses back then, until the internet was able to give me free resources (thanks :)
TheLittleWho
Member
Member
Posts: 51
Joined: Sun Mar 01, 2015 7:58 am

Re: New to OS development

Post by TheLittleWho »

Hey, there are three 14 years old kids, I am 14 years old too :))
Troy
Posts: 5
Joined: Fri Apr 03, 2015 12:58 pm

Re: New to OS development

Post by Troy »

Thank you very much :-)
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: New to OS development

Post by Roman »

TheLittleWho wrote:Hey, there are three 14 years old kids, I am 14 years old too :))
There are four.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: New to OS development

Post by Muazzam »

Roman wrote: There are four.
Now, five.
User avatar
bace
Member
Member
Posts: 34
Joined: Fri Jan 16, 2015 10:41 am
Location: United Kingdom

Re: New to OS development

Post by bace »

muazzam wrote: Now, five.
Six. :D
"for example, turning off the system’s power through the movement of a large red switch" - the Advanced Configuration and Power Interface Specification
Coomer69
Member
Member
Posts: 31
Joined: Thu Feb 20, 2014 4:49 am

Re: New to OS development

Post by Coomer69 »

I'm 15 now. Why did I have to age? Oh, right; because I'm not Ash from pokemon.
Post Reply