Kernel loading from cd
Re: Kernel loading from cd
Read this wiki page. It discourages use of mingw. It even mentions the error that you are getting. I've not used mingw or Cygwin so cannot say anything about them. However, my advice is to move away from Mingw so that you can follow the tutorials more closely.
If a trainstation is where trains stop, what is a workstation ?
Re: Kernel loading from cd
All tutorials were created using linux. I'm using windows 7 x64 and there are no tools for building the os but mingw.
If someone can recommend me some good tutorials under windows i will be grateful.
If someone can recommend me some good tutorials under windows i will be grateful.
Re: Kernel loading from cd
Actually many of the tutorials were created under Cygwin. Does Cygwin work under windows 7 ?
I'm sure Linux has the best tools but not everyone uses it. I use Mac.
I'm sure Linux has the best tools but not everyone uses it. I use Mac.
If a trainstation is where trains stop, what is a workstation ?
Re: Kernel loading from cd
Lies.Payn3 wrote:All tutorials were created using linux. I'm using windows 7 x64 and there are no tools for building the os but mingw.
I've used Cygwin before on Windows 7 x64 and had no problems with it. I've used MinGW to build a cross-compiler as well, which gave me no problems either (that was some time ago, though).gerryg400 wrote:Actually many of the tutorials were created under Cygwin. Does Cygwin work under windows 7 ?
I'm sure Linux has the best tools but not everyone uses it. I use Mac.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Kernel loading from cd
Ok, i have a virtualized ubuntu. I've rebuilded all the stuff and i get no errors or warnings. The entry point is the same and the format of the kernel was set to flat binary.
But the kernel is freezeing at the same point.
But the kernel is freezeing at the same point.
Re: Kernel loading from cd
That's a very good start.Ok, i have a virtualized ubuntu.
You don't say but is your entry point still 0x100000 ?The entry point is the same and the format of the kernel was set to flat binary.
If it is you need to do a few things, including at least the following.
1. Enable A20
2. Load your kernel to 0x100000. This is actually quiet difficult in real mode because addresses above 1MB are not normally available. You either need to switch to big real mode (un-real mode) or load the kernel below 1MB in real mode and copy to 1MB after switching to 32 bit mode. Actually there is another way but those 2 are easiest.
3. Make sure that the very first byte of your binary file is the entry point.
If a trainstation is where trains stop, what is a workstation ?
Re: Kernel loading from cd
What's wrong with..
BTW, can anyone explain me the linker.ld file?
How i load the kernel below 1 mb? I suppose that the memory copy will be made with a custom memcpy.
First i'll try to load an asm kernel in real mode, if someone explains me ^.
?You don't say but is your entry point still 0x100000 ?
BTW, can anyone explain me the linker.ld file?
How i load the kernel below 1 mb? I suppose that the memory copy will be made with a custom memcpy.
First i'll try to load an asm kernel in real mode, if someone explains me ^.
Re: Kernel loading from cd
I've used cygwin for the first four iterations of my current rewrite (about a month long). The only real downside is that it's slow. I switched because the Cygwin e2fsimage doesn't support 4k blocks.Creature wrote:I've used Cygwin before on Windows 7 x64 and had no problems with it.gerryg400 wrote:Actually many of the tutorials were created under Cygwin. Does Cygwin work under windows 7 ?
A full compile on one core in Windows takes about 30 seconds; 3 of those are reading the make file and 6 are building the filesystem image. That same full build takes 6.3 seconds on a virtualized Linux (that's running on the very same Windows). Make -j 16 used to cut it down to 13 seconds on Windows, on Linux (and I don't know if it's actually getting all 4 cores!) it cuts it down to 4.32 seconds.
Functionally speaking though, no problem with anything in Windows.
Re: Kernel loading from cd
Not necessarily - it depends on what platform your compiler targets. Another good reason to use a cross-compiler targeted for *your OS* or generic elf - it doesn't make assumptions that don't hold.berkus wrote:If you're compiling C code, the compiler would by default prepend "_" (underscore) to C symbols. This is what is the problem here. So either use _kernel_main in linker script or tell the compiler the equivalent of gcc's -fno-underscore option.