Page 1 of 1
Cannot compile kernel in Bran's Kernel Development Tutorial
Posted: Thu Jan 24, 2008 2:25 am
by crasher
Has anyone tried the small kernel developed in Bran's Kernel Development Tutorial. I tried it in Cygwin,using the downloaded bran's kernel package.
When I used the build.bat inside this package, I got
"start.o file not recognized". I thought this was because
nasm file format flag is "-f aout", so I changed it to "-f elf".
This time I got "cannot perform PE operation on non-PE file format". Other file formats were tried out but failed.
Did anyone experience this issue?
Posted: Thu Jan 24, 2008 2:31 am
by JamesM
Posted: Thu Jan 24, 2008 9:16 pm
by pcmattman
Build a
GCC_Cross_Compiler in Cygwin
.
Posted: Wed Jan 30, 2008 7:57 pm
by tigerfish
Use MinGW, leave nasm's output format as elf, and change LD's output to pei-i386.
ex. in link.ld
Code: Select all
OUTPUT_FORMAT("pei-i386") <---
ENTRY(_Init_Start)
_Data_Physical_Addr_Load = 0x00100000;
It works for me.
Posted: Wed Apr 02, 2008 7:22 pm
by shadow00
tigerfish wrote:Use MinGW, leave nasm's output format as elf, and change LD's output to pei-i386.
ex. in link.ld
Code: Select all
OUTPUT_FORMAT("pei-i386") <---
ENTRY(_Init_Start)
_Data_Physical_Addr_Load = 0x00100000;
It works for me.
On Vista it crashes ld.exe
(I'm starting to think god just doesn't want me to program an OS.)
Posted: Wed Apr 02, 2008 10:13 pm
by karloathian
If you're using windows xp I personally recommand DJGPP as your compiler, LD supports the "binary" output format , and I think elf-i386 too , but you really only need the flat binary format that GRUB can understand directly.
Posted: Wed Apr 02, 2008 10:28 pm
by piranha
(I'm starting to think god just doesn't want me to program an OS.)
This is normal.
Hang in there
-JL
Posted: Thu Apr 03, 2008 2:21 am
by Combuster
Stick with cygwin and the cross compiler then