Coffeehouse Thread

19 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How Windows is build ?

Back to Forum: Coffeehouse
  • User profile image
    L_Park1

    A ... basic question: how Windows is build? What programs are used? Details, details ... Of course, what is public, not internal stories. Smiley We don't want trouble. Smiley How the team is structured? How many Labs etc. etc. Thanks

  • User profile image
    Manip

    Windows, just like any modern operating system isn't built in one large chunk. Windows its self might have thousands or tens of thousands of isolated modules that all work together (and layer on top of one another).

    The kernel can't, for example, call into comdlg32.dll because comdlg32.dll would have to make calls back to the kernel and you'd get a infinite loop situation.

    For most things they use standard Visual Studio 2005 Enterprise Edition. They however have to have special building environments for the big stuff (e.g. Windows Kernel). These things can't be build on the developer's machines, but are instead build overnight on servers who's soul purpose is to build releases.

    If you want a more accurate or details overview then I'm afraid your have to walk to a Microsoftee in the Windows group.

  • User profile image
    L_Park1

    Yeah - I forgot about the fact about modules. Vista can we tell that is more modular than ever? (modular - not sure about the term - I'm from Romania - sorry about bad EN). Smiley I also forgot about the servers which compile a new version of Windows Vista every night. Smiley That's a lot of versioning. Question: they test every build they have every day? Not sure about this... details please.

  • User profile image
    ben2004uk

    guessing they have a lot (LOT!) of automated test build scripts which are run everytime / weekly on the new build. Think I read it somewhere...

  • User profile image
    Sampy

    Devdiv builds using MSBuild now but most things as Microsoft are built using the "NT Build environment" known as razzle. It uses super uniquely named tool build.exe.

    Devdiv still uses Razzle but it's just calling into msbuild undernieth. There's a file out there called Microsoft.VisualStudio.Publish.vbproj that's used to build the VS you'll install once Orcas CTPs start coming out.

    Actually, it's called Microsoft.VisualStudio.Publish2.vbproj but that's because I was a bit of an early adopter of the conversion to MSBuild and when the conversion team came thru they were kind and left my project file alone Smiley

  • User profile image
    Xaero_​Vincent

    Oh... I always wanted to know this:

    What compiler options do they use? What is the target architecture for the x86-32 version? Is it compiled for i386 or i686? What about Windows Vista? Do they use special compiler options that support older architectures yet optimized for new processors, like GCC's "-mcpu" option?


    Regards,
    Vincent

  • User profile image
    IRenderable

    Manip wrote:

    Windows, just like any modern operating system isn't built in one large chunk. 



    The BSDs are all built with one make. Though I think that is seriously hindering them.

  • User profile image
    ScanIAm

    IRenderable wrote:
    
    Manip wrote:

    Windows, just like any modern operating system isn't built in one large chunk. 



    The BSDs are all built with one make. Though I think that is seriously hindering them.


    So, only one .bin (or whatever) is spit out when it is done?

  • User profile image
    IRenderable

    ScanIAm wrote:
    IRenderable wrote:
    Manip wrote:

    Windows, just like any modern operating system isn't built in one large chunk. 



    The BSDs are all built with one make. Though I think that is seriously hindering them.


    So, only one .bin (or whatever) is spit out when it is done?


    You type in make and it builds all the packages, the kernel, drivers, everything.

  • User profile image
    Sven Groot

    IRenderable wrote:
    You type in make and it builds all the packages, the kernel, drivers, everything.

    I seriously doubt they have one makefile for the whole thing. Probably they just have one master makefile that recursively calls all other makefiles to build the whole system. Nothing wrong with that.

  • User profile image
    Manip

    Sven Groot wrote:
    
    IRenderable wrote:
    You type in make and it builds all the packages, the kernel, drivers, everything.

    I seriously doubt they have one makefile for the whole thing. Probably they just have one master makefile that recursively calls all other makefiles to build the whole system. Nothing wrong with that.


    Your right they do.

    If you want to learn more I suggest download the "leaked source." I'd imagine that you could view the makefiles in that *cough*

  • User profile image
    L_Park1

    Smiley good idea with the "leaked source". Ups, we don't want trouble. How can you find it? How to search for it. Smiley A clue or something. Smiley

  • User profile image
    stevewo

    L_Park1 wrote:
    A ... basic question: how Windows is build? What programs are used? Details, details ... Of course, what is public, not internal stories. We don't want trouble. How the team is structured? How many Labs etc. etc. Thanks


    Yes indeed - how is Windows (NT/2000/.NET) built ?

    I do not believe there is anything confidential about how it is built - just the source itself is what is trade secret - not how to build it.

    This is my understanding based on www.tinykrnl.org which elaborates on Razzle.

    1) Get Windows Driver Kit - Vista release or 2003 DDK or Windows 2000 DDK - not sure which will work (someone please advise ?) - but I think the WDK should work because it has both the HAL, IFS, and normal DDK systems to build whereas other versions (to my understanding) split these systems.

    2) Once you have such - open a command prompt - now I suppose you could do this with the tinykrnl.org "Dazzle" build environment which works by building TinyKrnl - which is designed just like the NT source tree - using the WDK from the command line with a special command - dazzle.cmd

    3) Does anyone know:

    A) - Which DDK or Environment will work to use as a base to build NT be it leaked source or real source and/or NT 4.0 or 2000 or even DOS and regardless of processor ?

    B) - What machine and operating system should be used - Server, 2000, or NT4.0 itself - it seems weird making 2000 on 2000 and even weirder making NT4.0 in the Windows 2000 DDK which would not have been invented when NT4.0 was not even invented seeing you are using the NT4.0 source !!! So what operating system and setup (for each and every permutation - mainly for NT 4.0 and 2000 x86) ?

    C) - What is the entire batch file contents of Razzle.CMD - can someone please show me this or send it to me ?

    D) - Can the TinyKRNL environment be used to build any NT (say leaked soruce) ? AND/OR can the dazzle.cmd script be changed TO build NT AND/OR TINYKRNL ?

    E) - Speaking of Tinykrnl - does any know of anyway to EASILY get up a Native Command Line Interface around the AUTOCHK.EXE execution point - I mean a command prompt that runs in place of SMSS.EXE or CSRSS.EXE ??? A real NTDLL.DLL based program. I think a lot of people forget "WINDOWS" is really a "program" that runs on the NT "operating system". But yes, can we get up a command prompt before "WINDOWS" and if so how ?

    F) - Can ANY of the leaked source be built at all - even ntoskrnl.exe or hal.dll or osloader.exe or ntldr or kernel32.dll or explorer.exe or iexplore.exe or anything at all whatsoever and if so how ?

    I just want to know how to bulid something from this leaked source - anything at all - succesfully.

    This is not for public release or commercial use and just my own private use - I want to see if I can build/create/make my own operating system.

    I would really like to be able to create a NT kernel that can talk to other NT kernels direct and the boot process stops there - like BIOS starts POST etc etc then MBR then NTLDR/OSLOADER and HAL and Boot Drivers - just the absolute basics - then the Kernel comes up (I haven't forotten the registry and hives) - and then SMSS.EXE, CSRSS.EXE and WINLOGON.EXE - then SERVICES.EXE just enough to "logon" by starting a service like seclogon - thus officially completing the boot process - then having a MPI (message passing interface) system run that links (over infiniband or ethernet or hypertransport or FPGAs or whatever !!!) executable run and just run - like the system idle process - waiting for more information to be processed - to come from other machines.

    Any thoughts ?

    Obviously there would need to be a cluster controlling kernel that monitors all these and assigns different node identifiers etc etc but that is the basic idea - there could be a server version of this kernel - one single system image could also be created by a Virtual HAL spread over all machines - so all CPUs and RAM and HDDs merge together into one final system that is completely unified.

    Possible ?

    But keeping it simple for now - no Windows no Nothing - just a OS that uses the base NT core - up to end of boot which is defined as someone (including the computer itself) logging on to the computer system - so NT AUTHORITY\SYSTEM can "logon" - and the machine can act as a cluster slave box...
     
    I know that can be done easy..

    And maybe even earlier than end of boot - like at Phase 0 or Phase 1 completion or in place of the actual system idle process ???

    Please email me at colesexmyer@gmail.com if anyone has any information or thoughts.

    I also have DOS source (as well as NT 4.0 and WIN2K) and on top of that have Award and Phoenix source and am not just creating my own Operating System - I am creating my own BIOS and - probably by using FPGAs - I am creating my own actual processor - all from leaked source (to use as samples and not to steal) and pretty much a lot of red bull and no sleep - i mean NO sleep - nothing !!!

  • User profile image
    PaoloM

    Brilliant Expressionless

  • User profile image
    Royal​Schrubber

    So that's what crazy nut professors do when not at university? Perplexed

  • User profile image
    Izariath

    stevewo said:
    L_Park1 wrote:
    A ... basic question: how Windows is build? What programs are used? Details, details ... Of course, what is public, not internal stories. We don't want trouble. How the team is structured? How many Labs etc. etc. Thanks


    Yes indeed - how is Windows (NT/2000/.NET) built ?

    I do not believe there is anything confidential about how it is built - just the source itself is what is trade secret - not how to build it.

    This is my understanding based on www.tinykrnl.org which elaborates on Razzle.

    1) Get Windows Driver Kit - Vista release or 2003 DDK or Windows 2000 DDK - not sure which will work (someone please advise ?) - but I think the WDK should work because it has both the HAL, IFS, and normal DDK systems to build whereas other versions (to my understanding) split these systems.

    2) Once you have such - open a command prompt - now I suppose you could do this with the tinykrnl.org "Dazzle" build environment which works by building TinyKrnl - which is designed just like the NT source tree - using the WDK from the command line with a special command - dazzle.cmd

    3) Does anyone know:

    A) - Which DDK or Environment will work to use as a base to build NT be it leaked source or real source and/or NT 4.0 or 2000 or even DOS and regardless of processor ?

    B) - What machine and operating system should be used - Server, 2000, or NT4.0 itself - it seems weird making 2000 on 2000 and even weirder making NT4.0 in the Windows 2000 DDK which would not have been invented when NT4.0 was not even invented seeing you are using the NT4.0 source !!! So what operating system and setup (for each and every permutation - mainly for NT 4.0 and 2000 x86) ?

    C) - What is the entire batch file contents of Razzle.CMD - can someone please show me this or send it to me ?

    D) - Can the TinyKRNL environment be used to build any NT (say leaked soruce) ? AND/OR can the dazzle.cmd script be changed TO build NT AND/OR TINYKRNL ?

    E) - Speaking of Tinykrnl - does any know of anyway to EASILY get up a Native Command Line Interface around the AUTOCHK.EXE execution point - I mean a command prompt that runs in place of SMSS.EXE or CSRSS.EXE ??? A real NTDLL.DLL based program. I think a lot of people forget "WINDOWS" is really a "program" that runs on the NT "operating system". But yes, can we get up a command prompt before "WINDOWS" and if so how ?

    F) - Can ANY of the leaked source be built at all - even ntoskrnl.exe or hal.dll or osloader.exe or ntldr or kernel32.dll or explorer.exe or iexplore.exe or anything at all whatsoever and if so how ?

    I just want to know how to bulid something from this leaked source - anything at all - succesfully.

    This is not for public release or commercial use and just my own private use - I want to see if I can build/create/make my own operating system.

    I would really like to be able to create a NT kernel that can talk to other NT kernels direct and the boot process stops there - like BIOS starts POST etc etc then MBR then NTLDR/OSLOADER and HAL and Boot Drivers - just the absolute basics - then the Kernel comes up (I haven't forotten the registry and hives) - and then SMSS.EXE, CSRSS.EXE and WINLOGON.EXE - then SERVICES.EXE just enough to "logon" by starting a service like seclogon - thus officially completing the boot process - then having a MPI (message passing interface) system run that links (over infiniband or ethernet or hypertransport or FPGAs or whatever !!!) executable run and just run - like the system idle process - waiting for more information to be processed - to come from other machines.

    Any thoughts ?

    Obviously there would need to be a cluster controlling kernel that monitors all these and assigns different node identifiers etc etc but that is the basic idea - there could be a server version of this kernel - one single system image could also be created by a Virtual HAL spread over all machines - so all CPUs and RAM and HDDs merge together into one final system that is completely unified.

    Possible ?

    But keeping it simple for now - no Windows no Nothing - just a OS that uses the base NT core - up to end of boot which is defined as someone (including the computer itself) logging on to the computer system - so NT AUTHORITY\SYSTEM can "logon" - and the machine can act as a cluster slave box...
     
    I know that can be done easy..

    And maybe even earlier than end of boot - like at Phase 0 or Phase 1 completion or in place of the actual system idle process ???

    Please email me at colesexmyer@gmail.com if anyone has any information or thoughts.

    I also have DOS source (as well as NT 4.0 and WIN2K) and on top of that have Award and Phoenix source and am not just creating my own Operating System - I am creating my own BIOS and - probably by using FPGAs - I am creating my own actual processor - all from leaked source (to use as samples and not to steal) and pretty much a lot of red bull and no sleep - i mean NO sleep - nothing !!!

    A) You need to use DDK for Windows 2003 Server, plus the IFS DDK, for build only kernel, is posible that you need to modify the sources, due to lack the original modified libc library for kernel sources...

     

    B) The original Windows NT was targered as a new OS/2 operanting system independent from PC architecture, was built for a Microsoft internal architecture machine called Dazzle, that comes with the Intel i860 CPU, later ported to Microsoft MIPS featured architecture called Jazz, and only later ported to i386 architecture... The original build system y source control tool, called SLM runs in Xenix powered servers with a special version of Microsoft commandline compiler & some third party tools from various vendors, like Intel, DEC, IBM, Insignia Software, Motorola, etc...later Windows Versions (98, NT4 , 2000 , XP, 2003) were build using Windows NT servers, & the dependence on third party source creation tools ceased with Windows XP & the new versions of Microsoft commandline C compilers...

     

    You need the newest DDK & IFS kit for build both Windows NT & 2000 sources because it comes with technologies for sustitute these early and confidential tools, but you need modify the sources in order to build with these new tools correctly...

     

    C) The Razzle build system is not only "Razzle.cmd", is a real build system, composed by makefiles, source tools, compilers and miscelaneous... Razzle first build the "Enviroment", constructs the libraries and various microsoft internal tools that comes in a source code form, and only then, constructs an entire operanting system... Razzle.cmd is only a simple "launcher"...

     

    D) No, Dazzle can't be used for build  an entire NT OS, only Kernel (NTOSKRNL.EXE)...

     

    E) No, doesn't exists a command line from Microsoft that can run in a AUTOCHECK point, TinyKrnl comes with a Alex  Ionescu custom made

    SMSS.EXE that features a little interpreter, but is very limited, you can't execute a external program, only works the commands bundled with it...

     

    F) No... the Windows NT leaked source is at 95% lacks the RTL LibC, and third party tools and sources, but with it and a Software enginer programmer experience, you can build at least the Kernel, Loader, and a Basic Win32 System, the windows 2000 is at 35%, you can't build anything with it, but you can port the NTOS modules to WRK sources & complete a fullfeatured Windows 2003 kernel...

     

    You can find a detailed Howtos for build at least a NT kernel using these leaked sources at http://www.betaarchive.co.uk

  • User profile image
    Larry Osterman

    Sven Groot said:
    IRenderable wrote:
    You type in make and it builds all the packages, the kernel, drivers, everything.

    I seriously doubt they have one makefile for the whole thing. Probably they just have one master makefile that recursively calls all other makefiles to build the whole system. Nothing wrong with that.

    Windows is built in two phases.  The first (called "build") is done by running build.exe from the root of the tree.  The second (called surprisingly "post-build") takes the binaries built during the first phase and assembles them into a structure on disk which fairly accurately matches the actual DVD formats.

     

    The rules for actually performing the build are kept in a number of global makefiles. 

     

    Windows is built using a drop of the VC compiler and tools and a number of custom tools (most of which are in the DDK).

  • User profile image
    spivonious

    Larry Osterman said:
    Sven Groot said:
    *snip*

    Windows is built in two phases.  The first (called "build") is done by running build.exe from the root of the tree.  The second (called surprisingly "post-build") takes the binaries built during the first phase and assembles them into a structure on disk which fairly accurately matches the actual DVD formats.

     

    The rules for actually performing the build are kept in a number of global makefiles. 

     

    Windows is built using a drop of the VC compiler and tools and a number of custom tools (most of which are in the DDK).

    I'm curious as to the size of things. Larry, since you're familiar with the audio system, can you give any details on it? Number of libraries, lines of code, languages used? Is there still code in there from NT 3?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.