Windows NT 4 Source Compiled! version 2

Discuss Windows 2000, NT, XP and Windows Server 2000, 2003, SBS 2003.
Locked
Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Windows NT 4 Source Compiled! version 2

Post by Stephanos »

OpenNT Project
redmine.stephanos.io


Redmine Project Website: http://redmine.stephanos.io

NTOSBE Repository
Project Website: http://redmine.stephanos.io/projects/ntosbe
SVN Repository: svn://svn.stephanos.io/ntosbe/trunk
SVN Repository (self-building NTOSBE): svn://svn.stephanos.io/ntosbe/branches/selfbld

WRKRazzle Repository
Project Website: http://redmine.stephanos.io/projects/wrkrazzle
SVN Repository: svn://svn.stephanos.io/wrkrazzle/trunk

Release sr687

Binary Release
x86fre: http://file.opennt.net/release/obsolete ... e-sr687.7z
x86tst: http://file.opennt.net/release/obsolete ... t-sr687.7z
x86chk: http://file.opennt.net/release/obsolete ... k-sr687.7z

CD Setup Release
x86fre: http://file.opennt.net/release/obsolete ... -sr687.iso
x86tst: http://file.opennt.net/release/obsolete ... -sr687.iso
x86chk: http://file.opennt.net/release/obsolete ... -sr687.iso

Source Code Release
old-src: http://file.opennt.net/release/obsolete ... c-sr687.7z
old-sdk: http://file.opennt.net/release/obsolete ... k-sr687.7z

======================= ORIGINAL POST =======================
It seems like the older post (Windows NT Source Compiled!) was locked, so I decided to start a new one- with the announcement of a significant progress from the previous post.

At this stage, all kernel and subsystem components (ntoskrnl.exe, ntdll.dll, win32k.sys, hal***.dll, csrss.exe, smss.exe, lsass.exe, ...., and even mvdm!) are compiled. The only missing component that prevents the full compilation of the source code is the implementation of DES/CBC cryptographic functions and rsa32.lib (rsa32.lib is only available in compiled form, no source is known to be available for it at this time).

All Win32 subsystem DLLs (kernel32.dll, user32.dll, ...) are also fully built and verified to be functional; however, the advapi32.dll cannot be built because it relies on the DES/CBC functions and rsa32.lib. The compilation proceeds with rsa32.foo (available in lsa) renamed to rsa32.lib, however its source is still missing.

Video - Building NTOS


Image

Image

Image

Image

Image

Image


======================= EDIT 2015-01-19 =======================
Image

Image

Image

Image

Image
Last edited by Stephanos on Sat Apr 30, 2016 6:16 am, edited 15 times in total.

voidp
User avatar
FTP Access
Posts: 358
Joined: Fri Jul 01, 2011 3:04 am

Re: Windows NT 4 Source Compiled! version 2

Post by voidp »

Nice.

You should publish your methods so others can reproduce your results.

TheCollector1988
User avatar
Donator
Posts: 3549
Joined: Wed Feb 23, 2011 12:11 am
Location: Italy
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by TheCollector1988 »

nice! This probably would come handy!

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

I'm planning to publish a full diff between my repository to the original source once I fix a few problems (for obvious reasons, I cannot link the full repository). At this time, the problems are:

1. nt\private\ntos\boot\startup, the compiled executable (STARTUP.COM) is of an invalid size, must manually pad it to the end of DGROUP (BSS section in this case) offset to get the OSLOADER.EXE to load.
2. nt\private\ntos\boot\detect, NTDETECT successfully builds and executes up to "Detecting Floppy Component ..." part. The floppy detection function is missing a return statement on one of its branches. If a return statement with an adequate value is provided for the other branch, it proceeds to the NTOSKRNL, but NTOSKRNL will report INACCESSIBLE_BOOT_DEVICE. An in-depth analysis on the process is required.
3. OLEAUTO needs to be built for all components that rely on OLE; otherwise, we are stuck with the public OLE components to complete the build.
4. NTRSA32 (rsa32.lib) source code is missing. We can use the rsa32.foo under lsa for now, but this makes the source tree incomplete.
5. des.c and cbc.c are missing. These are required by ADVAPI32 and a number of components under nt\private\net.

Meanwhile, if you are an experienced developer and interested in getting this source tree fully built, please let me know through PM.
Last edited by Stephanos on Sun Dec 28, 2014 10:44 am, edited 1 time in total.

voidp
User avatar
FTP Access
Posts: 358
Joined: Fri Jul 01, 2011 3:04 am

Re: Windows NT 4 Source Compiled! version 2

Post by voidp »

I wonder if looking at the 2K, Windows Research Kernel, or ReactOS sources would help?

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

voidp wrote:I wonder if looking at the 2K, Windows Research Kernel, or ReactOS sources would help?
Yes, I'm aware of other sources. Unfortunately, they won't be much of help as the leaked 2k source only contains a minor portion of the source tree that are not related to the issues I listed above, and Windows Research Kernel only contains the kernel (a small portion of nt\private\ntos). ReactOS is a completely different codebase.

louisw3
User avatar
FTP Access
Posts: 1462
Joined: Wed Dec 31, 2008 7:29 pm
Location: SE Asia

Re: Windows NT 4 Source Compiled! version 2

Post by louisw3 »

Wow looks awesome!! Have you tried a null object file for RSA to get the missing functions?

I suspect they may not be NT specific.
"Those who don't understand UNIX are condemned to reinvent it, poorly." – Henry Spencer

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

louisw3 wrote:Wow looks awesome!! Have you tried a null object file for RSA to get the missing functions?

I suspect they may not be NT specific.
I got a bit confused over the ADVAPI issue as the last time I worked on it was a month ago. The ADVAPI is missing cryptapi.c, not DES/CBC (iirc, net is missing those). With rsa32.foo from lsa and it can be compiled only if cryptapi.c is provided. I created a dummy (empty) cryptapi.c to see exactly what implementations are missing- the following is from \nt\private\windows\base\advapi build log (for full build log, see http://pastebin.com/NYWVRij5).

Code: Select all

advapi32.def : error LNK2001: unresolved external symbol CryptAcquireContextA
advapi32.def : error LNK2001: unresolved external symbol CryptAcquireContextW
advapi32.def : error LNK2001: unresolved external symbol CryptCreateHash
advapi32.def : error LNK2001: unresolved external symbol CryptDecrypt
advapi32.def : error LNK2001: unresolved external symbol CryptDeriveKey
advapi32.def : error LNK2001: unresolved external symbol CryptDestroyHash
advapi32.def : error LNK2001: unresolved external symbol CryptDestroyKey
advapi32.def : error LNK2001: unresolved external symbol CryptEncrypt
advapi32.def : error LNK2001: unresolved external symbol CryptExportKey
advapi32.def : error LNK2001: unresolved external symbol CryptGenKey
advapi32.def : error LNK2001: unresolved external symbol CryptGenRandom
advapi32.def : error LNK2001: unresolved external symbol CryptGetHashParam
advapi32.def : error LNK2001: unresolved external symbol CryptGetKeyParam
advapi32.def : error LNK2001: unresolved external symbol CryptGetProvParam
advapi32.def : error LNK2001: unresolved external symbol CryptGetUserKey
advapi32.def : error LNK2001: unresolved external symbol CryptHashData
advapi32.def : error LNK2001: unresolved external symbol CryptHashSessionKey
advapi32.def : error LNK2001: unresolved external symbol CryptImportKey
advapi32.def : error LNK2001: unresolved external symbol CryptReleaseContext
advapi32.def : error LNK2001: unresolved external symbol CryptSetHashParam
advapi32.def : error LNK2001: unresolved external symbol CryptSetKeyParam
advapi32.def : error LNK2001: unresolved external symbol CryptSetProvParam
advapi32.def : error LNK2001: unresolved external symbol CryptSetProviderA
advapi32.def : error LNK2001: unresolved external symbol CryptSetProviderW
advapi32.def : error LNK2001: unresolved external symbol CryptSignHashA
advapi32.def : error LNK2001: unresolved external symbol CryptSignHashW
advapi32.def : error LNK2001: unresolved external symbol CryptVerifySignatureA
advapi32.def : error LNK2001: unresolved external symbol CryptVerifySignatureW
W:\NT\public\sdk\lib\i386\advapi32.lib : fatal error LNK1120: 28 unresolved externals
The implementations of the functions listed above (supposed to be implemented in cryptapi.c, which is missing) are missing. Though, I think these functions will be relatively easy to re-implement. I'll be putting this for later as I work on the boot side issues (STARTUP.COM padding issue and NTDETECT INACCESSIBLE_BOOT_DEVICE issue).

On a side note, I have only re-implemented the RC4 functions (which were originally missing) for now on crypto side. I will post another reply soon with detailed status on the net or whatever else that relies on the missing crypto functions.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

==== ISSUE 0
The following is from \nt\private\lsa\crypt\engine\sources:

Code: Select all

SOURCES=md4c.c des.c cbc.c ecb.c rc4c.c
des.c, cbc.c, cbc.c and rc4c.c are missing from the repository. I re-implemented the rc4c.c in asm (based on rc4fast.asm in other libraries), but we are still missing the rest. For now, that line has been commented out and the following was used instead:

Code: Select all

SOURCES=md4c.c
The RC4 implementation was specified under i386 directory.

The lsass builds fine without them and is verified to be functional. The object files built from them are referenced throughout the entire source tree and are required by a number of different builds.

==== ISSUE 1

Code: Select all

Compiling w:\nt\private\windows\netdde\src\netdde directory ********************
'nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 NOPASS0=1 386=1'
NMAKE :  U1073: don't know how to make 'obj\i386\des.obj'
Stop.
BUILD: nmake.exe failed - rc = 2
netdde is supposed to contain des.c, but it's missing one. The following functions are exported from des.c.

Code: Select all

/*   Functions exported from des.c   */

void setkey(unsigned char *key);


void InitKey(const char FAR *Key);

void des(unsigned char *inbuf, unsigned char *outbuf, int crypt_mode);
void desf(unsigned char FAR *inbuf, unsigned char FAR *outbuf, int crypt_mode);
Note that this is a special case where des.c is locally provided in the local build source dir, rather than the lsa directory. This des.c implementation is identical to the des.c that is supposed to be under lsa.

==== ISSUE 2

Code: Select all

Linking w:\nt\private\inet\ohnt\ie\security\msnsspc directory ********************
'nmake.exe /c BUILDMSG=Stop. -i LINKONLY=1 NOPASS0=1 NTTEST= UMTEST= MAKEDLL=1 386=1'
NMAKE :  U1073: don't know how to make 'W:\NT\private\lsa\crypt\engine\obj\i386\des.obj'
Stop.
Yes, des.obj from lsa is required to complete the above build. As for net, rc4c.c was required from lsa and this has already been re-implemented.

==== NOTE
Missing implementation reference:

ecb.c

Code: Select all

unsigned FAR _CRTAPI1
DES_ECB(    unsigned            Option,
            const char FAR *    Key,
            unsigned char FAR * Src,
            unsigned char FAR * Dst);

unsigned FAR _CRTAPI1
DES_ECB_LM( unsigned            Option,
            const char FAR *    Key,
            unsigned char FAR * Src,
            unsigned char FAR * Dst);
cbc.c

Code: Select all

unsigned FAR _CRTAPI1
DES_CBC(    unsigned            Option,
            const char FAR *    Key,
            unsigned char FAR * IV,
            unsigned char FAR * Source,
            unsigned char FAR * Dest,
            unsigned            Size);


unsigned FAR _CRTAPI1
DES_CBC_LM( unsigned            Option,
            const char FAR *    Key,
            unsigned char FAR * IV,
            unsigned char FAR * Source,
            unsigned char FAR * Dest,
            unsigned            Size);

voidp
User avatar
FTP Access
Posts: 358
Joined: Fri Jul 01, 2011 3:04 am

Re: Windows NT 4 Source Compiled! version 2

Post by voidp »

I wonder if missing functions could be replaced by disassembling them from an NT4 RTM, then adding them to the build as inline assembly?

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

voidp wrote:I wonder if missing functions could be replaced by disassembling them from an NT4 RTM, then adding them to the build as inline assembly?
That would be the last resort. We can extract them from either known checked build images, or preferably from static libraries if available. Simply disassembling, however, would not be an option. The disassembled code will need to be de-compiled/reconstructed into C equivalent to allow the source tree to be built by all architectures (if not, we will have to provide assembly implementation of the missing functions for each arch and this would rather be tedious).

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

I have received a few questions about the build environment/tools used for this build, so I decided to post it.

Most of the build tools were built from \nt\private\sdktools. The compiler tools were mostly extracted from the 2000 source tree (it contains the compiler executables as well if you search through it carefully).

Internal Development Tools

Code: Select all

 Volume in drive W is NT4Src
 Volume Serial Number is 7852-865B

 Directory of W:\tools\idw

12/29/2014  12:15 AM    <DIR>          .
12/29/2014  12:15 AM    <DIR>          ..
11/08/2014  05:22 PM             9,760 accesori.grp
11/08/2014  05:21 PM            53,520 access.exe
11/08/2014  05:22 PM            11,536 acllist.exe
11/08/2014  05:22 PM             9,728 addfile.exe
11/08/2014  05:22 PM             9,728 addproj.exe
11/08/2014  05:21 PM             4,960 admin.grp
11/08/2014  05:22 PM            31,504 alias.exe
11/08/2014  05:21 PM            93,968 apidll.dll
11/08/2014  05:22 PM           207,120 apimon.exe
11/08/2014  05:22 PM            53,228 apimon.hlp
11/08/2014  05:22 PM             8,464 APPLYINF.exe
11/08/2014  05:21 PM            51,472 AutoWrap.exe
11/08/2014  05:21 PM            20,240 basewin.exe
11/08/2014  05:22 PM            20,752 beep.exe
11/08/2014  05:21 PM            28,944 bind.exe
11/08/2014  05:21 PM            70,928 binplace.exe
11/08/2014  05:21 PM               630 boxes.bmp
11/08/2014  05:21 PM           135,952 build.exe
11/08/2014  05:21 PM            10,000 cats.exe
11/08/2014  05:21 PM             9,728 catsrc.exe
11/08/2014  05:22 PM            25,872 cdp.exe
11/08/2014  05:21 PM            28,944 certify.exe
11/11/2014  06:27 AM            89,088 cfgmgr32.dll
11/08/2014  05:22 PM            26,896 checkfix.exe
11/08/2014  05:22 PM            45,328 checkrel.exe
11/08/2014  05:22 PM           153,718 chess.bmp
11/08/2014  05:22 PM            23,312 ChkAlive.exe
11/08/2014  05:22 PM            32,016 chksum.exe
11/08/2014  05:22 PM            37,136 chkverfy.exe
11/08/2014  05:22 PM            27,408 chmode.exe
11/08/2014  05:22 PM            21,264 compdir.exe
11/08/2014  05:21 PM            58,128 cookie.exe
11/08/2014  05:21 PM            39,696 cp.exe
11/08/2014  05:22 PM            80,656 crash.exe
11/08/2014  05:21 PM            19,216 cruel.exe
11/08/2014  05:22 PM            35,600 dbgdump.exe
11/08/2014  05:22 PM             5,904 dbmon.exe
11/08/2014  05:22 PM            11,024 dcomp.exe
11/08/2014  05:22 PM             9,728 defect.exe
11/08/2014  05:22 PM             9,728 delfile.exe
11/08/2014  05:21 PM            31,504 delnode.exe
11/08/2014  05:22 PM            34,064 delprof.exe
11/08/2014  05:22 PM             9,728 delproj.exe
11/08/2014  05:22 PM            52,496 dh.exe
11/08/2014  05:22 PM           149,776 diamond.exe
11/08/2014  05:21 PM            30,480 diamwrap.exe
11/08/2014  05:22 PM            48,912 diff.exe
11/08/2014  05:21 PM            62,736 diskmon.exe
11/08/2014  05:22 PM            23,312 dosdev.exe
11/08/2014  05:22 PM            46,864 dskbench.exe
11/08/2014  05:22 PM            37,648 dskimage.exe
11/08/2014  05:22 PM            25,360 ech.exe
11/08/2014  05:22 PM            32,528 echotime.exe
11/08/2014  05:22 PM            40,208 editreg.exe
11/08/2014  05:22 PM            29,456 editsym.exe
11/08/2014  05:21 PM             9,728 enlist.exe
11/08/2014  05:22 PM           240,118 enterp.bmp
11/08/2014  05:21 PM            14,096 ethstat.exe
11/08/2014  05:22 PM            45,328 exp.exe
11/08/2014  05:21 PM            37,648 fcom.exe
11/08/2014  05:21 PM            46,352 files.exe
11/08/2014  05:22 PM            11,024 filter.exe
11/08/2014  05:22 PM            31,504 fixdiff.exe
11/08/2014  05:22 PM            36,112 fixlinks.exe
11/08/2014  05:22 PM             2,500 games.grp
11/08/2014  05:21 PM            48,640 gensrv.exe
11/08/2014  05:22 PM            50,448 getbin.exe
11/08/2014  05:22 PM            28,944 gflags.exe
11/08/2014  05:22 PM            17,680 golf.exe
11/16/2014  04:23 PM            58,880 guidlib.exe
11/08/2014  05:22 PM            49,424 he.exe
11/08/2014  05:22 PM            34,576 heapmon.exe
11/08/2014  05:22 PM            45,056 hextract.exe
11/08/2014  05:21 PM            58,368 hsplit.exe
12/29/2014  12:15 AM                 0 idw.txt
11/08/2014  05:22 PM            43,792 imagecfg.exe
11/08/2014  05:22 PM            35,600 imagechk.exe
11/08/2014  05:22 PM             9,728 in.exe
11/08/2014  05:22 PM            12,048 infs.exe
11/08/2014  05:22 PM             7,952 infsize.exe
11/08/2014  05:21 PM            26,384 ini.exe
11/08/2014  05:22 PM            93,184 kbdtool.exe
11/08/2014  05:22 PM            15,120 kernprof.exe
11/08/2014  05:21 PM            22,800 kernrate.exe
11/08/2014  05:22 PM            39,696 KernTwk.exe
11/08/2014  05:21 PM            12,048 layout.exe
11/08/2014  05:22 PM            22,800 links.exe
11/08/2014  05:22 PM            79,632 list.exe
11/08/2014  05:22 PM            45,056 listmung.exe
11/08/2014  05:22 PM            25,360 lnkdump.exe
11/08/2014  05:22 PM            42,256 loc.exe
11/08/2014  05:22 PM             5,392 local.exe
11/08/2014  05:22 PM             9,728 log.exe
11/08/2014  05:21 PM            39,696 ls.exe
11/08/2014  05:22 PM             7,364 main.grp
11/08/2014  05:21 PM            14,096 makedisk.exe
11/16/2014  06:01 PM            31,504 mapmsg.exe
11/08/2014  05:22 PM            11,536 mbytes.exe
11/08/2014  05:22 PM            13,072 mcpyfile.exe
11/08/2014  05:22 PM            55,568 merge.exe
11/08/2014  05:22 PM            34,064 midleb.exe
11/08/2014  05:21 PM            34,576 midlpg.exe
11/08/2014  05:22 PM            66,832 midlyacc.exe
11/08/2014  05:22 PM            16,144 mlayout.exe
11/08/2014  05:22 PM            14,608 msize.exe
11/08/2014  05:22 PM             7,440 mtc.exe
11/08/2014  05:22 PM            55,568 munge.exe
11/08/2014  05:22 PM            42,768 mv.exe
11/08/2014  05:22 PM            23,824 netjoin.exe
11/08/2014  05:22 PM            19,216 netshare.exe
11/08/2014  05:22 PM           206,710 nt.bmp
11/08/2014  05:22 PM            23,312 nvram.exe
11/08/2014  05:22 PM            28,944 objdir.exe
11/08/2014  05:21 PM           100,112 objmon.exe
11/08/2014  05:21 PM             5,904 oeminf.exe
11/08/2014  05:22 PM             9,728 out.exe
11/08/2014  05:22 PM             9,662 paper.bmp
11/08/2014  05:22 PM            29,968 parcomp.exe
11/08/2014  05:21 PM            21,264 parsync.exe
11/08/2014  05:22 PM            38,518 party.bmp
11/08/2014  05:21 PM            29,968 pcmcmd.exe
11/08/2014  05:21 PM            22,288 pdump.exe
11/08/2014  05:22 PM            62,224 pperf.exe
11/08/2014  05:21 PM            82,192 ppr.exe
11/08/2014  05:22 PM            23,824 prodfilt.exe
11/08/2014  05:21 PM            14,096 psxhello.exe
11/08/2014  05:22 PM               630 pyramid.bmp
11/11/2014  06:27 AM            61,200 qgrep.exe
11/08/2014  05:22 PM            43,792 random.exe
11/08/2014  05:21 PM            24,336 rathole.exe
11/08/2014  05:21 PM             5,392 rcdump.exe
11/08/2014  05:22 PM            88,336 rcpp.exe
11/08/2014  05:22 PM            27,408 readline.exe
11/08/2014  05:21 PM            28,944 regback.exe
11/08/2014  05:22 PM            51,472 regdir.exe
11/08/2014  05:22 PM            51,984 regdmp.exe
11/08/2014  05:21 PM            63,760 regfind.exe
11/08/2014  05:22 PM            69,904 regini.exe
11/08/2014  05:21 PM            24,336 rescan.exe
11/08/2014  05:22 PM            94,992 resmon.exe
11/08/2014  05:22 PM            38,518 ribbons.bmp
11/08/2014  05:22 PM            10,000 rollback.exe
11/08/2014  05:21 PM            21,776 roshare.exe
11/08/2014  05:22 PM           227,600 sadmin.exe
11/08/2014  05:22 PM            38,400 sclist.exe
11/08/2014  05:22 PM             9,728 scomp.exe
11/08/2014  05:22 PM             3,344 SECEDIT.dll
11/08/2014  05:22 PM            38,160 SECEDIT.exe
11/11/2014  06:27 AM            19,575 sed.exe
11/11/2014  06:27 AM            67,072 sed.exe.NEW
11/08/2014  05:22 PM                43 setidw.bat
11/08/2014  05:22 PM             1,687 setidw.ini
11/08/2014  05:21 PM            21,264 setlink.exe
11/08/2014  05:22 PM               311 setnt351.cmd
11/08/2014  05:21 PM    <DIR>          setup
11/11/2014  06:27 AM           375,296 setupapi.dll
11/08/2014  05:21 PM               302 setwin95.cmd
11/08/2014  05:22 PM            18,192 shutdown.exe
11/08/2014  05:21 PM            34,064 simbad.exe
11/08/2014  05:22 PM            14,608 size.exe
11/08/2014  05:22 PM             2,038 slash.bmp
11/08/2014  05:22 PM            20,240 sleep.exe
11/08/2014  05:22 PM           251,664 slm.exe
11/08/2014  05:21 PM           168,208 slmck.exe
11/08/2014  05:22 PM            42,256 slmdiff.exe
11/08/2014  05:22 PM           153,872 slmed.exe
11/08/2014  05:22 PM            26,384 snake.exe
11/08/2014  05:22 PM             7,952 snmputil.exe
11/08/2014  05:22 PM            30,480 solidpp.exe
11/08/2014  05:22 PM            28,432 splitsym.exe
11/08/2014  05:22 PM             4,558 spots.bmp
11/08/2014  05:22 PM             9,728 ssync.exe
11/08/2014  05:21 PM                88 startup.grp
11/08/2014  05:22 PM             9,728 status.exe
11/08/2014  05:22 PM           141,558 std.bmp
11/08/2014  05:22 PM             7,174 steel.bmp
11/08/2014  05:22 PM            27,920 stripcv.exe
11/08/2014  05:22 PM             5,392 stripinf.exe
11/08/2014  05:21 PM            57,344 structo.exe
11/08/2014  05:22 PM            13,072 switcher.exe
11/08/2014  05:22 PM            21,264 sync.exe
11/08/2014  05:22 PM            25,360 takeown.exe
11/08/2014  05:21 PM            46,352 tc.exe
11/08/2014  05:22 PM            20,752 tictac.exe
11/08/2014  05:22 PM            33,040 timer.exe
11/08/2014  05:22 PM             6,540 tools.grp
11/08/2014  05:22 PM            90,384 topdesk.exe
11/08/2014  05:22 PM             5,392 tophook.dll
11/08/2014  05:22 PM            37,136 touch.exe
11/08/2014  05:22 PM            59,152 tpdiff.exe
11/08/2014  05:22 PM            56,080 trans.exe
11/08/2014  05:22 PM            27,408 tz.exe
11/16/2014  06:01 PM            33,552 uixport.exe
11/08/2014  05:22 PM            33,552 units.exe
11/08/2014  05:22 PM            42,768 unmerge.exe
11/08/2014  05:22 PM            48,400 upd.exe
11/08/2014  05:21 PM            31,504 upddbg.exe
11/08/2014  05:22 PM            40,720 updrn.exe
11/08/2014  05:21 PM            20,240 vdesk.exe
11/08/2014  05:22 PM           115,472 vi.exe
11/08/2014  05:22 PM            33,040 walk.exe
11/08/2014  05:22 PM            51,712 wcshdr.exe
11/08/2014  05:22 PM               190 weave.bmp
11/08/2014  05:21 PM            41,232 where.exe
11/08/2014  05:22 PM             9,856 winapps.grp
11/08/2014  05:21 PM            25,872 winsdrv.exe
11/08/2014  05:22 PM            70,416 winvtp.exe
11/08/2014  05:21 PM             5,328 wow.grp
11/08/2014  05:21 PM             7,036 wow16.grp
11/08/2014  05:22 PM             5,392 ws2hdr.exe
11/08/2014  05:21 PM            23,312 xdosnet.exe
11/08/2014  05:22 PM            31,504 xerox.exe
11/08/2014  05:21 PM            27,920 ync.exe
11/08/2014  05:22 PM           241,424 z.exe
             213 File(s)      8,843,304 bytes
               3 Dir(s)  30,450,954,240 bytes free
Public MSTOOLS

Code: Select all

 Volume in drive W is NT4Src
 Volume Serial Number is 7852-865B

 Directory of W:\tools\mstools

11/23/2014  02:44 PM    <DIR>          .
11/23/2014  02:44 PM    <DIR>          ..
11/08/2014  06:50 PM            27,920 afdkd.dll
11/08/2014  06:50 PM            33,552 apf32cvt.exe
11/08/2014  06:50 PM            26,384 apf32dmp.exe
11/08/2014  06:50 PM            71,440 cap.dll
11/08/2014  06:50 PM            28,432 capdump.exe
11/08/2014  06:50 PM            21,264 capsetup.exe
11/08/2014  06:50 PM            91,408 compress.exe
11/08/2014  06:50 PM            25,360 contents.exe
11/08/2014  06:50 PM             2,313 cvpack.err
11/08/2014  06:50 PM            79,360 cvpack.exe
11/08/2014  06:50 PM               939 cvtres.err
11/08/2014  06:50 PM            16,144 cvtres.exe
11/08/2014  06:50 PM            47,376 ddespy.exe
11/08/2014  06:50 PM            21,264 ddictl.exe
11/08/2014  06:50 PM            29,456 dflayout.dll
11/08/2014  06:50 PM            28,944 dflayout.exe
11/08/2014  06:50 PM             4,597 dhcp.mib
11/08/2014  06:50 PM            30,992 drivers.exe
11/08/2014  06:50 PM            72,464 emalp.dll
11/08/2014  06:50 PM            61,712 emmip.dll
11/08/2014  06:50 PM            65,808 emppc.dll
11/08/2014  06:50 PM           100,112 emx86.dll
11/08/2014  06:50 PM            72,976 fernel32.dll
11/08/2014  06:50 PM            79,632 fontedit.exe
11/08/2014  06:50 PM             6,179 ftp.mib
11/08/2014  06:50 PM           133,904 gdikdx.dll
11/08/2014  06:50 PM             7,001 gopherd.mib
11/08/2014  06:50 PM            58,128 gutils.dll
11/08/2014  06:50 PM            33,040 hdxdll.dll
11/08/2014  06:50 PM             4,368 hook.dll
11/08/2014  06:50 PM             8,490 http.mib
11/08/2014  06:50 PM           111,376 imagedit.exe
11/08/2014  06:50 PM               658 inetsrv.mib
11/08/2014  06:50 PM           204,048 kdextalp.dll
11/08/2014  06:50 PM           195,856 kdextmip.dll
11/08/2014  06:50 PM           195,856 kdextppc.dll
11/08/2014  06:50 PM           209,168 kdextx86.dll
11/08/2014  06:50 PM             5,392 lib.exe
11/08/2014  06:50 PM             5,392 link32.exe
11/08/2014  06:50 PM            26,100 lmmib2.mib
11/08/2014  06:50 PM            33,552 lookmon.exe
11/11/2014  06:27 AM            39,184 mapsym.exe
11/08/2014  06:50 PM           208,656 masm.exe
11/08/2014  06:50 PM           208,656 masm386.exe
11/08/2014  06:50 PM            30,480 mc.exe
11/08/2014  06:50 PM            25,872 mibcc.exe
11/08/2014  06:50 PM           107,882 mib_ii.mib
11/08/2014  06:50 PM           750,352 midl.exe
11/08/2014  06:50 PM           750,352 midlx86.exe
11/23/2014  02:44 PM            86,016 mktyplib.exe
11/08/2014  06:50 PM             9,461 ml.err
11/08/2014  06:50 PM           388,096 ml.exe
11/08/2014  06:50 PM           357,888 mspdb40.dll
11/08/2014  06:50 PM           275,216 mspdb41.dll
11/08/2014  06:50 PM            12,560 msvcbook.dll
11/08/2014  06:50 PM            23,824 mupkd.dll
11/08/2014  06:50 PM             5,056 nmake.err
11/08/2014  06:50 PM           109,056 nmake.exe
11/08/2014  06:50 PM            42,994 ntdetect.chk
11/08/2014  06:50 PM           501,248 OBSOLETE_link.exe
11/08/2014  06:50 PM            29,968 perfmtr.exe
11/08/2014  06:50 PM            29,968 pmon.exe
11/08/2014  06:50 PM            34,576 poolmon.exe
11/08/2014  06:50 PM            20,240 psapi.dll
11/08/2014  06:50 PM            64,272 pview.exe
11/08/2014  06:50 PM            55,568 pviewer.exe
11/08/2014  06:50 PM            20,752 rc.exe
11/08/2014  06:50 PM           142,608 rcdll.dll
11/08/2014  06:50 PM            21,264 rdrkd.dll
11/08/2014  06:50 PM            47,376 rebase.exe
11/08/2014  06:50 PM           118,544 rlman.exe
11/08/2014  06:50 PM            42,768 rm.exe
11/08/2014  06:50 PM            85,776 shcv.dll
11/08/2014  06:50 PM            32,016 smashlck.exe
11/08/2014  06:50 PM             4,332 smi.mib
11/08/2014  06:50 PM            57,104 spy.exe
11/08/2014  06:50 PM            37,136 srvkd.dll
11/08/2014  06:50 PM            15,632 symcvt.dll
11/08/2014  06:50 PM            14,096 symedit.exe
11/08/2014  06:50 PM            46,864 TESTDLGS.dll
11/08/2014  06:50 PM            41,232 testdlgs.exe
11/08/2014  06:50 PM           254,736 testdrvr.exe
11/08/2014  06:50 PM            29,456 TESTSCRN.dll
11/08/2014  06:50 PM            53,008 testscrn.exe
11/08/2014  06:50 PM             9,488 testvw32.dll
11/08/2014  06:50 PM             5,904 tlloc.dll
11/08/2014  06:50 PM            21,264 tlpipe.dll
11/08/2014  06:50 PM            14,608 tlser.dll
11/08/2014  06:50 PM            26,896 top.exe
11/08/2014  06:50 PM            15,120 ttkdx.dll
11/08/2014  06:50 PM            47,376 undel.exe
11/08/2014  06:50 PM            25,872 undname.exe
11/08/2014  06:50 PM           170,256 userkdx.dll
11/08/2014  06:50 PM            28,432 uuidgen.exe
11/08/2014  06:50 PM            59,664 vadump.exe
11/08/2014  06:50 PM            32,016 vdmperf.exe
11/08/2014  06:50 PM            26,896 verfix.exe
11/08/2014  06:50 PM           100,624 vidcap32.exe
11/08/2014  06:50 PM            30,480 windbgrm.exe
11/08/2014  06:50 PM           123,152 windiff.exe
11/08/2014  06:50 PM            17,357 windiff.hlp
11/08/2014  06:50 PM            26,131 wins.mib
11/08/2014  06:50 PM            41,232 wperf.exe
11/08/2014  06:50 PM             4,880 ws1.dll
11/08/2014  06:50 PM            24,336 wst.dll
11/08/2014  06:50 PM            40,720 wstcat.exe
11/08/2014  06:50 PM            29,456 wstdump.exe
11/08/2014  06:50 PM            66,832 wstune.exe
11/08/2014  06:50 PM            24,848 zoomin.exe
             109 File(s)      8,524,338 bytes
               2 Dir(s)  30,450,929,664 bytes free
C/C++ Compiler from Windows 2000 source tree

Code: Select all

 Volume in drive W is NT4Src
 Volume Serial Number is 7852-865B

 Directory of W:\tools\msvc2k

12/29/2014  12:21 AM    <DIR>          .
12/29/2014  12:21 AM    <DIR>          ..
11/08/2014  05:22 PM            78,240 c1.err
11/08/2014  05:22 PM           408,576 c1.exe
11/08/2014  05:22 PM           793,088 c1xx.exe
11/08/2014  06:48 PM           549,888 c2.exe
11/08/2014  05:22 PM             6,880 c23.err
11/08/2014  06:48 PM             1,974 cl.err
11/08/2014  05:22 PM            37,888 cl.exe
11/08/2014  05:22 PM             3,768 cl32.msg
11/08/2014  05:22 PM    <DIR>          jet
11/08/2014  05:22 PM           514,048 link.exe
11/08/2014  05:22 PM            39,184 mapsym.exe
11/08/2014  05:22 PM    <DIR>          misc
11/08/2014  06:48 PM           271,872 mspdb41.dll
11/08/2014  05:22 PM            74,752 msvcirt.dll
11/08/2014  05:22 PM           267,536 msvcrt.dll
11/08/2014  05:22 PM           210,944 msvcrt10.dll
11/08/2014  05:22 PM           253,952 msvcrt20.dll
11/08/2014  05:22 PM            65,024 msvcrt40.dll
11/08/2014  05:22 PM             9,506 profiler.xlm
              17 File(s)      3,587,120 bytes
               4 Dir(s)  30,450,925,568 bytes free
x86 16-bit Build Tools for NTVDM

Code: Select all

 Volume in drive W is NT4Src
 Volume Serial Number is 7852-865B

 Directory of W:\nt\private\mvdm\tools16

12/25/2014  11:10 PM    <DIR>          .
12/25/2014  11:10 PM    <DIR>          ..
11/08/2014  08:21 PM    <DIR>          BACKUP
11/11/2014  06:32 AM            16,541 buildidx.exe
11/16/2014  01:02 AM            48,828 buildmsg.exe
07/25/2000  03:59 PM            57,513 c1.err
07/25/2000  03:59 PM           341,504 c13216.exe
07/25/2000  03:59 PM           551,936 c1xx3216.exe
07/25/2000  03:59 PM             4,631 c23.err
07/25/2000  03:59 PM           502,272 c23216.exe
07/25/2000  03:59 PM           331,264 c23pcd.exe
07/25/2000  03:59 PM           246,784 c33216.exe
11/08/2014  08:21 PM             1,717 cl.def
07/25/2000  03:59 PM             1,792 cl.err
07/25/2000  03:59 PM             4,279 cl.msg
07/25/2000  03:59 PM            91,648 cl16.exe
11/11/2014  06:32 AM            22,016 fixexe.exe
11/11/2014  06:32 AM            14,403 getsize.exe
11/08/2014  08:21 PM            27,209 h2inc.exe
11/11/2014  06:32 AM            71,168 implib.exe
11/08/2014  08:21 PM           134,144 lib16.exe
11/08/2014  08:21 PM           131,072 link16.exe
11/08/2014  08:21 PM           131,072 link_60.exe
11/11/2014  06:32 AM           208,656 masm.exe
11/11/2014  06:32 AM            10,217 mkpublic.exe
11/08/2014  08:21 PM            16,299 nosrvbld.exe
11/08/2014  08:21 PM           208,384 q23.exe
11/11/2014  06:32 AM            44,099 rc16.exe
11/11/2014  06:32 AM            99,499 rcpp.exe
11/08/2014  08:21 PM            14,393 rcqq.err
11/08/2014  08:21 PM            99,481 rcqq.exe
11/08/2014  08:21 PM            15,635 reloc.exe
11/08/2014  08:21 PM             8,605 stripdd.exe
11/08/2014  08:21 PM             7,931 stripz.exe
              31 File(s)      3,464,992 bytes
               3 Dir(s)  30,450,921,472 bytes free

Version information of major x86 tools:

Code: Select all

>nmake
Microsoft (R) Program Maintenance Utility   Version 1.50.4048
Copyright (c) Microsoft Corp 1988-93. All rights reserved.

>masm
Microsoft (R) Macro Assembler Version 5.NT.02
Copyright (C) Microsoft Corp 1981, 1989.  All rights reserved.

>ml
Microsoft (R) Macro Assembler Version 6.11d
Copyright (C) Microsoft Corp 1981-1995.  All rights reserved.

>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 10.20.6166 for 80x86
Copyright (C) Microsoft Corp 1984-1996. All rights reserved.

>link
Microsoft (R) 32-Bit Incremental Linker Version 4.20.6164
Copyright (C) Microsoft Corp 1992-1996. All rights reserved.

>lib
Microsoft (R) 32-Bit Library Manager Version 4.20.6164
Copyright (C) Microsoft Corp 1992-1996. All rights reserved.

>rc
Microsoft (R) Windows 32 Resource Compiler, Version 4.00 - Build 1381

>midl
Microsoft (R) MIDL Compiler Version 3.00.44
Copyright (c) Microsoft Corp 1991-1995. All rights reserved.

>mktyplib
Microsoft (R) Type Library Generator  Version 2.20.4048
Copyright (c) Microsoft Corp. 1993-1995.  All rights reserved.

>cvtres
Microsoft (R) Windows Resource To Object Converter Version 4.00
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

>mc
Microsoft (R) Message Compiler  Version 1.00.5239
Copyright (c) Microsoft Corp 1992-1995. All rights reserved.

>mapsym
Microsoft (R) Symbol File Generator  Version 6.00
Copyright (C) Microsoft Corp 1984 - 1995.  All rights reserved.
Version information of major x86 16-bit tools:

Code: Select all

>cl16
Microsoft (R) C/C++ Optimizing Compiler Version 8.00x
Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

>link16
Microsoft (R) Segmented Executable Linker NTGroup Version 5.60.220 Dec 28 1999
Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.

>lib16
Microsoft (R) Library Manager  Version 3.40
Copyright (C) Microsoft Corp 1983-1993.  All rights reserved.

>implib
Microsoft (R) Import Library Manager  Version 1.50.132
Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.

>rc16
Microsoft (R) Windows Resource Compiler Version 3.11
Copyright (C) Microsoft Corp. 1985-1992. All rights reserved.
The razzle build environment is initialised from \nt\public\tools\sizzle.cmd (sizzle.cmd is my version of the razzle.cmd adopted to my build environment). The original razzle.cmd sets the _NTDRIVE based on its argument (main, hotfix_free, hotfix_checked). It seems they had different source trees on different drives for each of those builds. It also sets the USERNAME to (ARCH)fre so that the razzle environment builds the free build.

Code: Select all

:START
REM goto SET_BINARIES_DIR

	if "%PROCESSOR_ARCHITECTURE%" == "ALPHA" set USERNAME=alphafre
	if "%PROCESSOR_ARCHITECTURE%" == "MIPS"  set USERNAME=mipsfre
	if "%PROCESSOR_ARCHITECTURE%" == "PPC"   set USERNAME=ppcfre
	if "%PROCESSOR_ARCHITECTURE%" == "x86"   set USERNAME=x86fre

	if "%PROCESSOR_ARCHITECTURE%" == "ALPHA" set LOGNAME=HALPHAFIX
	if "%PROCESSOR_ARCHITECTURE%" == "MIPS"  set LOGNAME=HMIPSFIX
	if "%PROCESSOR_ARCHITECTURE%" == "PPC"   set LOGNAME=HPPCFIX
	if "%PROCESSOR_ARCHITECTURE%" == "x86"   set LOGNAME=HX86FIX

	set _MSVCVER=MSVC2k
	if not "%1" == ""			set _MSVCVER=%1

	if "%_MSVCVER%" == "MSVC15"	set _MSVCDIR=W:\tools\msvc15
	if "%_MSVCVER%" == "MSVC20"	set _MSVCDIR=W:\tools\msvc20
	if "%_MSVCVER%" == "MSVC40"	set _MSVCDIR=W:\tools\msvc40
	if "%_MSVCVER%" == "MSVC2k"	set _MSVCDIR=W:\tools\msvc2k
	if "%_MSVCVER%" == "MSVC71"	set _MSVCDIR=W:\tools\msvc71

	set PATH=%PATH%;W:\tools\mstools;W:\tools\idw;%_MSVCDIR%;W:\tools\etcutil

	set _NTDRIVE=W:

:SET_BINARIES_DIR

	rem shift

	if "%PROCESSOR_ARCHITECTURE%" == "ALPHA" set _ntALPHAboot=%_ntdrive%\binaries
	if "%PROCESSOR_ARCHITECTURE%" == "MIPS"  set _ntMIPSboot=%_ntdrive%\binaries
	if "%PROCESSOR_ARCHITECTURE%" == "PPC"   set _ntPPCboot=%_ntdrive%\binaries
	if "%PROCESSOR_ARCHITECTURE%" == "x86"   set _nt386boot=%_ntdrive%\binaries

	cmd /k %_NTDRIVE%\NT\PUBLIC\TOOLS\ntenv.cmd %2 %3 %4 %5 %6 %7 %8 %9

:END
sizzle.cmd is essentially equivalent to razzle.cmd, but it only targets the main build and provides additional command line parameter to set the VC version. This was used during the very early development stage to verify the compiler compatibility of various components. I originally had a bit of success getting things built with MSVC40, but after tons of compiler issues, I confirmed that MSVC2k (extracted from the Windows 2000 source tree) is the one to be used.

Other than that, ntenv.cmd performs most of the magic. The source tree is not currently verified with *chk (e.g. x86chk) builds and only valid for x86fre. It have just confirmed that I get a few errors here and there for x86chk build on ntos and mvdm. I will be looking into this in a near future.

MM-DD-YY
FTP Access
Posts: 53
Joined: Wed Dec 21, 2011 1:22 am

Re: Windows NT 4 Source Compiled! version 2

Post by MM-DD-YY »

I'm not sure if these are the right files your looking for....There is three 'des.c' files located at the following locations:
\private\net\sfm\atalk2\atalkp\
\private\net\sfm\atalk2\pacermp\
\private\net\sfm\atalk2\portable\

The same holds true for the 'md4c.c' file:
\private\lsa\crypt\engine\
\private\net\lsapi\md4\

In addition, there is a 'md4c.ccp' file at:
\private\net\svcdlls\lls\ccfapi32\

EDIT: Mistakenly wrote 'rc4c.c and rc4c.ccp' when I should have wrote 'md4c.c and md4c.ccp'.
Last edited by MM-DD-YY on Tue Dec 30, 2014 4:17 pm, edited 1 time in total.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

MM-DD-YY wrote:I'm not sure if these are the right files your looking for....There is three 'des.c' files located at the following locations:
\private\net\sfm\atalk2\atalkp\
\private\net\sfm\atalk2\pacermp\
\private\net\sfm\atalk2\portable\

The same holds true for the 'rc4c.c' file:
\private\lsa\crypt\engine\
\private\net\lsapi\md4\

In addition, there is a 'rc4c.ccp' file at:
\private\net\svcdlls\lls\ccfapi32\
Thanks for the input. Unfortunately, that des.c is not the des.c I'm looking for. They are different from the lsa implementation.
For rc4c.c file, I don't have it under the paths you provided, nor could I find rc4c.cpp under ccfapi32 directory.

I think you may have a different/more complete copy of the source tree. Could you please advise through PM?

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

Quick update:

1. rc4c.c is still not available. As of now, I'm using my own rc4c in i386 asm implementation. If it is concluded that there is no leaked version available for this file, I will rewrite the asm implementation in C for all archs.
2. des.c under atalk2 cannot be used as a direct replacement for the lsa des.c. They may partially be reused if we have to write our own lsa des.c. The compiled object files (they survived because their extension names were not .obj) are available under \nt\private\rpc\runtime\security\ntlmssp. des.i16 contains the i386 16-bit implementation, while mac and mppc contain 68k and PPC implementations, respectively.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

Update 2015-01-04:

1. rc4c.c is now available (details to be released later). des.c and ecb.c reconstruction still pending.
2. STARTUP.COM is now properly padded. CONST section was forced to be aligned at 16-byte boundary.

For now, I'm trying to get NTOS built in x86chk mode so that I can debug the kernel with full symbols. This is necessary to get the NTDETECT INACCESSIBLE_BOOT_DEVICE issue resolved.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

NTDETECT Error Screenshots:

Image

Image

All we know at this time is that:
1. the NTDETECT.COM built from the unmodified source will hang during GetFloppyInformation()- that is, this function will never return. The function is missing a return statement in one of the branches. With a return statement manually added to the branch, the function will successfully return; however, NTOSKRNL will report an error as shown in the second screenshit.
2. SCSI Disk Controller is detected as shown in the first screenshot, and this makes the PCI detection issue unlikely. Also note BUSLOGIC.SYS and SCSIPORT.SYS in the second screenshot, which are indeed correct.
3. 0x0000007B / INACCESSIBLE_BOOT_DEVICE, 0xC0000034 STATUS_OBJECT_NAME_NOT_FOUND.

NOTE: This is an issue with our NTDETECT.COM. Everything else (including NTOSKRNL) will function properly with the original (released by MS) NTDETECT.COM.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

Now that the holidays ended, I will have much less time to work on this. For that reason, I will make the full SVN repository available to those are willing to contribute. Please send requests through PM only. Do not post requests here.

Along with the repository disclosure, I will make clear what I am trying to achieve from this project:
1. Fully build-able source tree on all architectures
2. Potential use in legacy system maintenance (in particular, Alpha, MIPS, PPC systems ...)
3. Full checked build/debug symbol/source package for research/learning (similar to the concept of Windows Research Kernel, but covers a significantly larger portion of the OS)

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

Update 2015-01-10:

1. \nt\private\developr Razzle profiles were modified and refactored
2. x86fre and x86chk profiles were reconfigured with more appropriate settings
3. \nt\private\crtlib, crt32*, fp32* repositories were deleted. These CRT repositories are deemed obsolete and superseded by \nt\private\sdktools\vctools\crt. The exact CRT tree details are unknown as of now. It seems like the source tree was released in the middle of the CRT tree refactoring phase. For build completion and stability build, the CRT tree should be fully refactored. For now, we're sticking with the libs and dlls built from the current tricky build process. Debug CRT is not used for x86chk build. This decision is based on that of the original NT development team, which seems to have abandoned the use of Debug CRT in checked builds a while before the timestamp of this source tree. After all, it is almost never necessary to step into the internal CRT source anyway ..
4. NTOS now fully builds with both x86fre and x86chk.
5. (to those who have access to the repository) The SDK libraries (\nt\public\sdk\lib) in the repository were updated with those built from x86chk. If you're building x86fre, you must either keep the current rev. SDK libraries or build -c

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »


yourepicfailure
User avatar
Donator
Posts: 1256
Joined: Mon Jul 23, 2012 9:40 pm
Location: Flying high in a DC10

Re: Windows NT 4 Source Compiled! version 2

Post by yourepicfailure »

I've decided to help StephanOS and work on the GUI/Shell.
Image
Progman^

Image
WinFile^

Image
Control Panel^

Taskman compiles, but won't run, probably due to OS compatibility. (Running on Win2k3 SP1, real hardware)

I've concluded that most of the GUI components are compilable, but some of the obj's they rely on needed to be built before a successful compile.

EDIT: Reversi with 2 warnings.
Image

Image
I think we all knew that already. *hehe*
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off"
Image
You will never tear me from the grasp of the Pentium M!

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

MVDM Build Issue on x86chk (NOTE: MVDM builds without any problems under x86fre)

\nt\private\mvdm
A quick intro to how the build is performed-when the Build Utility is launched, makefil0 is invoked first. The makefil0 build script builds all wow16 components (that is, MS-DOS and Windows 3.1 codebase). We are having some issues at this stage.

The following is the error output of nmake -f makefil0:

Code: Select all

        cd ..\..\wow16
        nmake

Microsoft (R) Program Maintenance Utility   Version 1.50.4048
Copyright (c) Microsoft Corp 1988-93. All rights reserved.

        cd kernel31
        nmake d386

Microsoft (R) Program Maintenance Utility   Version 1.50.4048
Copyright (c) Microsoft Corp 1988-93. All rights reserved.

        NMAKE 386P=1 DEST=DEBUG3

Microsoft (R) Program Maintenance Utility   Version 1.50.4048
Copyright (c) Microsoft Corp 1988-93. All rights reserved.

        cd DEBUG3
        link16 /LI @..\krnl386.lnk,..\kernel.def

Microsoft (R) Segmented Executable Linker NTGroup Version 5.60.220 Dec 28 1999
Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.

Object Modules [.obj]: /LI kdata strings stack mapdata layer ldboot dosinit    +

Object Modules [.obj]: ldfastb 3gmemini ldself int24 diskio 3ginterf       +
Object Modules [.obj]: intnn i21file i21task i21entry 3protect 3gmoreme    +
Object Modules [.obj]: 3gcompac lhandle 3galloc 3glru 3gmem handle emsmisc +
Object Modules [.obj]: winexec ldfile ldaux atom gpfix hmem ldutil module  +
Object Modules [.obj]: ldheader ld ldcache ldopen ldint userpro ldreloc +
Object Modules [.obj]: ldappl ldseg context tasking lstring task ldstack  +
Object Modules [.obj]: resaux linterf lcompact lalloc ripaux rip 3gacheck  +
Object Modules [.obj]: lacheck lddebug rom enable miscapi lzexp error      +
Object Modules [.obj]: gpcont disasm patch reboot diag wow16cal kthunks    +
Object Modules [.obj]: wowdeb kdataend
Run File [kdata.exe]: kernel.exe/align:16/warnfixup/farcall/nopackcode
List File [w:kernel.map]: kernel.map/map
Libraries [.lib]: /NOD/NOE
LINK : fatal error L1074: IGROUP : group larger than 64K bytes
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2'
Stop.
Note that the makefil0 executes 'nmake d386'. This will lead to DEST=DEBUG3, which forces a debug build. In x86fre build profile, the makefil0 executes 'nmake r386', which sets DEST=RETAIL3.

Based on this, it seems that the DEBUG3 build adds a few extra objects to the link stage compared to RETAIL3 build and this causes the IGROUP (basically code section) to be larger than one segment (64K), causing a linker error.

This is as far as we know at this time. As I mentioned earlier, I'm focusing on the NTDETECT issue for now and I will start the actual debugging process as we now have the x86chk NTOS built.

Those who have access to the repository are encouraged to look into this issue. If you do not have access to the repo and would like to troubleshoot it, please let me know through the PM.

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

IRC channel for more direct communication: Freenode ##NT4Dev
My nick is csrss.

OltScript131
User avatar
FTP Access
Posts: 257
Joined: Sat Sep 10, 2011 9:46 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by OltScript131 »

But I wonder...

After getting a source code, how can I convert them to compatible executable ? 8-)

Stephanos
Posts: 297
Joined: Fri Dec 26, 2014 5:38 am
Contact:

Re: Windows NT 4 Source Compiled! version 2

Post by Stephanos »

Jajan131 wrote:But I wonder...

After getting a source code, how can I convert them to compatible executable ? 8-)
What do you mean by "[converting] them to compatible executable?"

Locked