Page 1 of 1

Demo5 build problem msvc++ help please?????

Posted: Wed May 19, 2010 3:17 pm
by usman_the_great
I am a begginer in os dev and also in msvc++ the problem is that i don't know that how to build the demo 5 or any kernel in msvc++ please explain the build setting and also that in demo5 you also give stage 2 and stage 1 stage 1 is a bootloader but what is the stage 2 the KRNLDR.SYS how i can use it with the msvc++ and also what type of format i use to build it
.exe, .dll or .sys and i am using microsoft visual c++ 2010 express edition help please this is a big problem for me???????????????????? :cry:

Re: Demo5 build problem msvc++ help please?????

Posted: Wed May 19, 2010 9:16 pm
by Mike
Hello,

"Stage 1" (The bootstrap code) is part of the bootloader, not the entire bootloader. "Stage2" (Krnldr.sys) is the core part of the bootloader and is responsible for loading the operating system kernel in the series.

The series kernel is built as a PE-executable (EXE or DLL file output from MSVC, both will work as they are both the same format.)

Please see the Stage 2 chapters, Chapters 7-11, for detailed information on what Krnldr.sys does. Also, please see this chapter for detail information on how Stage2 loads and executes your MSVC kernel, and how to properly set up MSVC.

Re: Demo5 build problem msvc++ help please?????

Posted: Wed May 19, 2010 9:30 pm
by usman_the_great
i see this page already but when i try to boot it it on virtual box or virtual machine it says that kernel is missing or corrupted and also in demo 5 or 6 it is important that in build setting in linker system driver is has to be enable or we can disable it when i debug it it gives error that A:\KRNL32.EXE : fatal error LNK1295: '/DYNAMICBASE' not compatible with '/DRIVER' specification; link without '/DYNAMICBASE' and if i disable it hen it works right but it not work in emulator it says kernel is missing or corrupted help please and thanks for information about stage 2

Re: Demo5 build problem msvc++ help please?????

Posted: Wed May 19, 2010 10:22 pm
by usman_the_great
these are the screenshots

Re: Demo5 build problem msvc++ help please?????

Posted: Wed May 19, 2010 10:23 pm
by usman_the_great
and these

Re: Demo5 build problem msvc++ help please?????

Posted: Thu May 27, 2010 11:23 pm
by halofreak1990
Hi,

From what I can see in your screen shots, and based on my own settings in VS2005 Pro,
you should disable the Randomized Base Address option under the Advanced Linker Options, as the bootloader requires a fixed base address.
And you should disable the Driver setting under the System Linker Options, since the kernel is NOT a windows system driver.