Still trying to start

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.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Still trying to start

Post by suthers »

I've been trying to start OSdeving for some time but I still can't because I can never get a tutorial that works with the compiler/assembler I use.
Could anybody tell me were I could find a tutorial that uses the GNU c++ compiler for windows and NASM?
Also that doesn't use GRUB.
If there isn't any i'll just probably try using DJGPP.
Thanks in advance,

Jules
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Re: Still trying to start

Post by t0xic »

suthers wrote:If there isn't any i'll just probably try using DJGPP.
I would suggest switching over to Cygwin or MinGW. Grub is also very useful for loading ELF binaries. I have a link to pre-compiled i586-elf toolset for Cygwin there. I used to use DJGPP too, but I like Cygwin much better.

--Michael
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Sorry I didn't mean the GNU c++ compiler i actually meant Cygwin :oops:
Thanks,

Jules
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post by Pyrofan1 »

GNU c++ compiler i actually meant Cygwin
Cygwin is not a compiler.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Ok let me get this right im using dev-c++ that does use the GNU C compiler
(ok sorry im totally confussed)
Thanks,

Jules
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post by Pyrofan1 »

Dev-C++ uses MinGW, which is the windows port of GCC
Also that doesn't use GRUB.
if you're not using GRUB then you'll have to write your own bootloader.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

thanks so that should allow me to link ELF binaries right?
(Thats been my main problem)
I'll try it and see if I can get it to work.
Thanks,

Jukes
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post by Pyrofan1 »

thanks so that should allow me to link ELF binaries right?
no, to link elf files in windows you'll need to build a cross compiler.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Ok and were can I get a cross compiler from?
Thanks,

Jules
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Post by Pyrofan1 »

I believe that you have to compile GCC with the right options under Cygwin. Look on the wiki, there's more info there.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Thanks, but I was thinking isn't there another format I could use that supports externals (This is on the ASM), can be linked by LD and can be linked to whatever dev-c++ takes as a default format?
Thanks,

Jules
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

Also, I gave you a link to my already compiled i586-elf cross compiler.
Here it is again: (Cygwin only)
http://code.google.com/p/onyxkernel/dow ... 2&can=2&q=
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

You may want to check out http://www.brokenthorn.com/Resources/OSDevIndex.html
I my oppinion a fantastic recourse and it works with nasm.
This was supposed to be a cool signature...
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

OK, suthers, I think you are confused about a few things:

1) As stated, cygwin is not a compiler, it is a virtual UNIX environment (which happens to come with a compiler installed).

2) If you don't want to use GRUB (or a similar compatible multiboot loader) then there's no point in even looking at ELF as all your binaries will have to be in raw format anyway!

3) If you ARE looking at GRUB or similar, and want to look at tutorials, then make yourself a cross compiler in cygwin (see Wiki:GCC Cross Compiler), it's a very good article written by Solar, which I am in fact now following to make an i686 compiler at this moment...

So, if you're looking to make your own bootloader, I reccommend Neon's tutorials at http://www.brokenthorn.com.

If you're looking to make your own kernel (and skip the bootloader for the moment), I reccommend you look at either Bran's kernel development tutorial, or these, which were written by someone here, but I can't remember who... :roll:
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

JamesM wrote:2) If you don't want to use GRUB (or a similar compatible multiboot loader) then there's no point in even looking at ELF as all your binaries will have to be in raw format anyway!
I do not see why, as he could write an ELF bootloader himself? Or am I missing something here...


JAL
Post Reply