Page 1 of 1

problem with cygwin

Posted: Sat Jul 05, 2008 11:41 pm
by ahmedhalawa
i have problem with cygwin when i go to make elf file
it send some error msg
kernel file is created but grub cann't boot from it :?
i don't know why that do with me
1.jpeg
make file

Code: Select all

CPPFLAGS = -c -fno-builtin -fno-rtti -fno-exceptions

.PHONY:  clean

OBJS = boot.o main.o system.o video.o


all: kernel.elf

kernel.elf: $(OBJS) link.ld
	ld -T link.ld $(OBJS) -o kernel.tmp
	objcopy -O elf32-i386 kernel.tmp a:/kernel.exe
	objdump -D kernel.tmp > debug.o
	f:/cygwin/mboot a:/kernel.bin
	$(RM) kernel.tmp
	 $(RM) $(OBJS)

clean:
	$(RM) $(OBJS)


%.o: ../src/%.cpp
	g++ $(CPPFLAGS)  $< -o $@

%.o: ../src/%.asm
	nasm -f elf $< -o $@

link file

Code: Select all

ENTRY(start)
SECTIONS
{

    .text 0x100000 :
    {
        code = .; _code = .; __code = .;
        *(.text)
        . = ALIGN(4096);
    }

    .data :
    {
        data = .; _data = .; __data = .;
        *(.data)
        *(.rodata)
        . = ALIGN(4096);
    }

    .bss :
    {
        bss = .; _bss = .; __bss = .;
        *(.bss)
        . = ALIGN(4096);
    }

    end = .; _end = .; __end = .;
}

pleas help i cant resume in tutorail :cry:
*********************************
i'm so sorry for my english beacuse english is my 3 language

Re: problem with cygwin

Posted: Sun Jul 06, 2008 12:07 am
by Nick Carlson
I'm using andLinux instead of cygwin. This allows you to have a real linux installation running within windows (with access to the windows file system.)

http://www.andlinux.org/

Re: problem with cygwin

Posted: Sun Jul 06, 2008 1:21 am
by ahmedhalawa
Peace for all (Greeting of Islam)
thank you very much i'll try your Suggested after i download it
Peace for all