problem with cygwin

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.
Post Reply
User avatar
ahmedhalawa
Member
Member
Posts: 28
Joined: Wed Jul 02, 2008 9:28 am

problem with cygwin

Post 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
User avatar
Nick Carlson
Posts: 18
Joined: Fri Feb 29, 2008 6:08 pm

Re: problem with cygwin

Post 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/
User avatar
ahmedhalawa
Member
Member
Posts: 28
Joined: Wed Jul 02, 2008 9:28 am

Re: problem with cygwin

Post by ahmedhalawa »

Peace for all (Greeting of Islam)
thank you very much i'll try your Suggested after i download it
Peace for all
Post Reply