I've tried to build the cross-compiler, but I've got four compilation errors when I run 'make all-gcc'. They are as follows:
configargs.h: lines 2 and 3: missing terminating " character
configargs.h: line 4: parse error before 'static'
gcc.c: line 6281: thread_model undeclared
The commands I used are the same as the ones used in the GCC Cross-Compiler. I've attached configargs.h to my message, and I'll link to gcc.c if that would help
Booting my kernel [Fixed]
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Re: Booting my kernel
- Attachments
-
- configargs.h
- (353 Bytes) Downloaded 124 times
Re: Booting my kernel
i advise DJGPP. just because i have had the exact same experience as you, and DJGPP is a hell of alot easier than building a cross compiler. (although the download has become a bit confusing whenit starts getting late...)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Booting my kernel
Have you set cygwin to unix line endings and binary format during installation?
Re: Booting my kernel
how do you do that? i neevr knew you had to do that in order to compile it. no wonder i've been going wrong :O
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Re: Booting my kernel
Thanks; my cross-compiler's working now. But now, my source files won't even compile. My new build script is below
I've add the location of the cross-compiler's location to my path variable, but the files don't get found. I've changed to the correct directory, but get several errors:
asm: fatal: unable to open input file
No such file or directory
The strange thing is, I can actually see the files in Windows Explorer. The paths are correct, and if I run the nasm and g++ commands in the usual Cygwin shell, they work correctly. This approach doesn't work with the linker, though. What's going wrong?
Code: Select all
#!/bin/csh
nasm -f elf -o Boot.o Assembly/Boot.s
nasm -f elf -o Interrupts.o Assembly/Interrupts.s
nasm -f elf -o DescriptorTables.o Kernel/DTables.s
i586-elf-g++ -c Kernel/Boot.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o Main.o
i586-elf-g++ -c Kernel/Common.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o Common.o
i586-elf-g++ -c Kernel/Console.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o Console.o
i586-elf-g++ -c Kernel/DTables.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o CDescriptorTables.o
i586-elf-g++ -c Kernel/ISR.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o ISR.o
i586-elf-g++ -c Kernel/Timer.cpp -nostdlib -fno-builtin -fno-rtti -fno-exceptions -o Timer.o
i586-elf-ld -T Link.ld -o Output/kernel Boot.o Interrupts.o DescriptorTables.o Main.o Common.o Console.o CDescriptorTables.o ISR.o Timer.o
rm *.o
asm: fatal: unable to open input file
No such file or directory
The strange thing is, I can actually see the files in Windows Explorer. The paths are correct, and if I run the nasm and g++ commands in the usual Cygwin shell, they work correctly. This approach doesn't work with the linker, though. What's going wrong?
Re: Booting my kernel
put a "./" in front of each path. this makes it relative to the current directory (or atleast enforces it).
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Re: Booting my kernel
I've just done that. Nothing has changed apart from the files which aren't found, but still exist, now have a ./ in front. Incidentally, Cygwin can definitely 'see' the files on its own
Edit: After a little poking around, I've found the problem. I was coding the script file in Notepad, a Windows application. This means that it's saving the script with a \r\n delimiting the lines. Cygwin was expecting a different delimiter. I changed the installation to Windows/Text mode in the install program, and everything started working! Thanks to anyone who posted in the thread
Edit: After a little poking around, I've found the problem. I was coding the script file in Notepad, a Windows application. This means that it's saving the script with a \r\n delimiting the lines. Cygwin was expecting a different delimiter. I changed the installation to Windows/Text mode in the install program, and everything started working! Thanks to anyone who posted in the thread
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact: