├── .gitattributes ├── .gitignore ├── CLoader ├── .gitattributes ├── .gitignore ├── CldrSources.cmn ├── ReadMe.txt ├── bootSector │ ├── FAT16BootSec.img │ ├── FAT32BootSec.img │ ├── ReadMe.txt │ ├── fat │ │ ├── BSECT.COM │ │ ├── bsect.asm │ │ ├── bsect.img │ │ └── bsect_orig.asm │ └── fat32 │ │ ├── BSECT.COM │ │ ├── bsect.asm │ │ ├── bsect.img │ │ └── build.bat ├── cldr │ ├── args.c │ ├── bldr.h │ ├── console │ │ ├── bldr.bib │ │ ├── bldr6.bib │ │ ├── log.c │ │ ├── makefile │ │ ├── makefile.inc │ │ └── sources │ ├── dirs │ ├── download.c │ ├── ini.h │ ├── init.c │ ├── main.c │ ├── poweroff.c │ ├── serial │ │ ├── bldr.bib │ │ ├── bldr6.bib │ │ ├── log.c │ │ ├── makefile │ │ ├── makefile.inc │ │ └── sources │ └── util.c ├── core │ ├── common │ │ ├── crtsupp.c │ │ ├── heap.c │ │ ├── heaplocal.c │ │ ├── main.c │ │ ├── makefile │ │ └── sources │ ├── dirs │ ├── display │ │ ├── Splash.cpp │ │ ├── display.cpp │ │ ├── display.h │ │ ├── makefile │ │ ├── sources │ │ └── splash.h │ ├── filesys │ │ ├── FileSys.cpp │ │ ├── bldr_fat16.c │ │ ├── bldr_fat32.c │ │ ├── fat.h │ │ ├── fat16_funcs.h │ │ ├── fat32.h │ │ ├── fat32_funcs.h │ │ ├── fs.h │ │ ├── makefile │ │ └── sources │ └── x86_bios │ │ ├── bios.asm │ │ ├── biosint.c │ │ ├── jumpto.c │ │ ├── makefile │ │ ├── memory.c │ │ ├── oalio.c │ │ ├── oalmemory.c │ │ ├── oaltimer.c │ │ ├── pci.c │ │ ├── sources │ │ └── start.asm ├── dirs ├── inc │ ├── DisplayAPI.h │ ├── FileSysAPI.h │ ├── boot.h │ ├── bootDebugZones.h │ ├── bootbios.h │ ├── bootblock.h │ ├── bootblockbios.h │ ├── bootblockutils.h │ ├── bootcore.h │ ├── bootdisplay.h │ ├── bootdisplaybios.h │ ├── bootdriver.h │ ├── bootdriver.hpp │ ├── bootdriverclasses.h │ ├── bootfactory.h │ ├── bootio.h │ ├── bootlog.h │ ├── bootmemory.h │ ├── bootpci.h │ ├── bootserial.h │ ├── bootstring.h │ ├── boottypes.h │ ├── dbgmsg.h │ ├── parser.h │ └── util.h ├── iniparser │ ├── makefile │ ├── parser.c │ ├── parser.h │ ├── sources │ └── util.c ├── log │ ├── debuglog.c │ ├── dump.c │ ├── format.c │ ├── kitllog.c │ ├── log.c │ ├── makefile │ ├── oallog.c │ ├── obj │ │ └── x86 │ │ │ ├── checked │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ └── macrolist.tmp │ │ │ ├── debug │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ └── macrolist.tmp │ │ │ └── retail │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ └── macrolist.tmp │ └── sources └── xldr │ ├── bios.asm │ ├── bldrcfg.nb0 │ ├── console │ ├── log.c │ ├── makefile │ ├── makefile.inc │ ├── obj │ │ └── x86 │ │ │ ├── debug │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ ├── macrolist.tmp │ │ │ └── xldrc.pdb │ │ │ └── retail │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ ├── macrolist.tmp │ │ │ └── xldrc.pdb │ ├── sources │ ├── xldr.bib │ └── xldr6.bib │ ├── dirs │ ├── filesystem.c │ ├── serial │ ├── log.c │ ├── makefile │ ├── makefile.inc │ ├── obj │ │ └── x86 │ │ │ ├── debug │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ ├── macrolist.tmp │ │ │ └── xldrs.pdb │ │ │ └── retail │ │ │ ├── _objects.mac │ │ │ ├── _table.mac │ │ │ ├── macrolist.tmp │ │ │ └── xldrs.pdb │ ├── sources │ ├── xldr.bib │ └── xldr6.bib │ ├── startup.asm │ ├── xldr.c │ └── xldr.h ├── NLoader ├── NldrSources.cmn ├── ReadMe.txt ├── bootSector │ ├── FAT12 │ │ ├── bsect.img │ │ ├── bsect.s │ │ └── build.bat │ ├── FAT16 │ │ ├── bsect.img │ │ ├── bsect.s │ │ └── build.bat │ ├── FAT32 │ │ ├── bsect.img │ │ ├── bsect.s │ │ └── build.bat │ ├── ReadMe.md │ ├── exFAT │ │ ├── bsect.img │ │ ├── bsect.s │ │ └── build.bat │ └── nasm_win32 │ │ └── LICENSE ├── core │ ├── common │ │ ├── crtsupp.c │ │ ├── heap.c │ │ ├── heaplocal.c │ │ ├── main.c │ │ ├── makefile │ │ └── sources │ ├── dirs │ ├── display │ │ ├── Splash.cpp │ │ ├── display.cpp │ │ ├── display.h │ │ ├── makefile │ │ ├── sources │ │ └── splash.h │ ├── filesys │ │ ├── FileSys.cpp │ │ ├── bldr_exfat.c │ │ ├── bldr_fat12.c │ │ ├── bldr_fat16.c │ │ ├── bldr_fat32.c │ │ ├── exfat.h │ │ ├── exfat_funcs.h │ │ ├── fat.h │ │ ├── fat12_funcs.h │ │ ├── fat16_funcs.h │ │ ├── fat32.h │ │ ├── fat32_funcs.h │ │ ├── fs.h │ │ ├── makefile │ │ └── sources │ └── x86_bios │ │ ├── bios.asm │ │ ├── biosint.c │ │ ├── jumpto.c │ │ ├── makefile │ │ ├── memory.c │ │ ├── oalio.c │ │ ├── oalmemory.c │ │ ├── oaltimer.c │ │ ├── pci.c │ │ ├── sources │ │ └── start.asm ├── dirs ├── inc │ ├── DisplayAPI.h │ ├── FileSysAPI.h │ ├── boot.h │ ├── bootDebugZones.h │ ├── bootbios.h │ ├── bootblock.h │ ├── bootblockbios.h │ ├── bootblockutils.h │ ├── bootcore.h │ ├── bootdisplay.h │ ├── bootdisplaybios.h │ ├── bootdriver.h │ ├── bootdriver.hpp │ ├── bootdriverclasses.h │ ├── bootfactory.h │ ├── bootio.h │ ├── bootlog.h │ ├── bootmemory.h │ ├── bootpci.h │ ├── bootserial.h │ ├── bootstring.h │ ├── boottypes.h │ ├── dbgmsg.h │ ├── parser.h │ └── util.h ├── iniparser │ ├── makefile │ ├── parser.c │ ├── parser.h │ ├── sources │ └── util.c ├── log │ ├── debuglog.c │ ├── dump.c │ ├── format.c │ ├── kitllog.c │ ├── log.c │ ├── makefile │ ├── oallog.c │ └── sources ├── nldr │ ├── args.c │ ├── bldr.h │ ├── console │ │ ├── bldr.bib │ │ ├── bldr6.bib │ │ ├── log.c │ │ ├── makefile │ │ ├── makefile.inc │ │ └── sources │ ├── dirs │ ├── download.c │ ├── ini.h │ ├── init.c │ ├── main.c │ ├── poweroff.c │ ├── serial │ │ ├── bldr.bib │ │ ├── bldr6.bib │ │ ├── log.c │ │ ├── makefile │ │ ├── makefile.inc │ │ └── sources │ └── util.c └── xldr │ ├── bios.asm │ ├── bldrcfg.nb0 │ ├── console │ ├── log.c │ ├── makefile │ ├── makefile.inc │ ├── sources │ ├── xldr.bib │ └── xldr6.bib │ ├── dirs │ ├── filesystem.c │ ├── serial │ ├── log.c │ ├── makefile │ ├── makefile.inc │ ├── sources │ ├── xldr.bib │ └── xldr6.bib │ ├── startup.asm │ ├── xldr.c │ └── xldr.h ├── README.md ├── UEFIloader ├── BIN │ └── BootIA32.efi ├── ReadMe.txt └── WEC7OSLoader │ ├── MdeModulePkg │ ├── Application │ │ └── CE7OSLoader │ │ │ ├── CELoader.c │ │ │ ├── CELoader.inf │ │ │ ├── RamTop.c │ │ │ ├── args.c │ │ │ ├── bootfilesystem.c │ │ │ ├── config.c │ │ │ ├── filesystemreadbinfile.c │ │ │ ├── globalVariable.c │ │ │ ├── include │ │ │ ├── Bootdebug.h │ │ │ ├── RamTop.h │ │ │ ├── bldr.h │ │ │ ├── boot.h │ │ │ ├── bootarg.h │ │ │ ├── bootcore.h │ │ │ ├── bootdownloadbinformat.h │ │ │ ├── bootdriver.h │ │ │ ├── bootdriverclasses.h │ │ │ ├── bootfactory.h │ │ │ ├── bootfilesystem.h │ │ │ ├── bootfilesystemutils.h │ │ │ ├── bootmemory.h │ │ │ ├── bootterminalutils.h │ │ │ ├── boottransport.h │ │ │ ├── boottransportedbg.h │ │ │ ├── boottypes.h │ │ │ ├── globalVariable.h │ │ │ ├── oal_args.h │ │ │ ├── oal_memory.h │ │ │ └── specstrings.h │ │ │ ├── init.c │ │ │ ├── loados.c │ │ │ ├── loaduldr.c │ │ │ ├── main.c │ │ │ ├── memory.c │ │ │ ├── menu.c │ │ │ ├── poweron.c │ │ │ ├── preload.c │ │ │ ├── readenable.c │ │ │ ├── readip4.c │ │ │ ├── readline.c │ │ │ └── run.c │ ├── CE7OSLoader.dec │ └── CE7OSLoader.dsc │ ├── build_CE7OSLOADER.bat │ └── cleanCE7OSLoader.bat ├── biosloader ├── README.md ├── bootsector │ ├── FAT12 │ │ ├── bsect.asm │ │ ├── bsect.s │ │ ├── build.bat │ │ └── getbsect.scr │ ├── FAT16 │ │ ├── bsect.asm │ │ ├── bsect.s │ │ ├── build.bat │ │ └── getbsect.scr │ ├── FAT32 │ │ ├── ML.EXE │ │ ├── bsect.asm │ │ ├── bsect.s │ │ ├── build.bat │ │ ├── build2.bat │ │ └── getbsect.scr │ ├── Images │ │ ├── exfat_bsect.img │ │ ├── fat12_bsect.img │ │ ├── fat16_bsect.img │ │ ├── fat32_bsect.img │ │ └── readme.txt │ └── exFAT │ │ ├── bsect.asm │ │ ├── bsect.s │ │ ├── build.bat │ │ └── getbsect.scr ├── dirs ├── diskimages │ ├── bootdisk.144 │ ├── bootdisk │ │ ├── bldr │ │ ├── boot.ini │ │ ├── eboot.bix │ │ └── splash.bmx │ ├── setupdisk.144 │ └── setupdisk │ │ ├── autoexec.bat │ │ ├── bldr │ │ ├── boot.ini │ │ ├── bsect.img │ │ ├── eboot.bix │ │ ├── format.com │ │ ├── mkdisk.bat │ │ └── splash.bmx ├── iniparser │ ├── makefile │ ├── parser.c │ ├── parser.h │ ├── sources │ ├── util.c │ └── util.h ├── loader │ ├── Fixed │ │ ├── FAT16 │ │ │ ├── bldr_fat16.c │ │ │ ├── boot.bib │ │ │ ├── fat.h │ │ │ ├── fixjmp.scr │ │ │ ├── makebldr.bat │ │ │ ├── makefile │ │ │ └── sources │ │ ├── FAT32 │ │ │ ├── bldr_fat32.c │ │ │ ├── boot.bib │ │ │ ├── fat32.h │ │ │ ├── fixjmp.scr │ │ │ ├── makebldr.bat │ │ │ ├── makefile │ │ │ └── sources │ │ ├── Main │ │ │ ├── bios.asm │ │ │ ├── bldr.inc │ │ │ ├── bootarg.h │ │ │ ├── debug.c │ │ │ ├── decoder.c │ │ │ ├── decoder.h │ │ │ ├── drive.c │ │ │ ├── format.c │ │ │ ├── ini.c │ │ │ ├── ini.h │ │ │ ├── main.c │ │ │ ├── makefile │ │ │ ├── sources │ │ │ ├── splash.c │ │ │ ├── startup.asm │ │ │ ├── video.c │ │ │ └── video.h │ │ ├── dirs │ │ ├── exFAT │ │ │ ├── bldr_exfat.c │ │ │ ├── boot.bib │ │ │ ├── exfat.h │ │ │ ├── fixjmp.scr │ │ │ ├── makebldr.bat │ │ │ ├── makefile │ │ │ └── sources │ │ └── inc │ │ │ ├── bldr.h │ │ │ ├── debug.h │ │ │ ├── fs.h │ │ │ └── splash.h │ ├── Floppy │ │ ├── bios.asm │ │ ├── bldr.h │ │ ├── bldr.inc │ │ ├── bldr_floppy.c │ │ ├── boot.bib │ │ ├── debug.c │ │ ├── debug.h │ │ ├── decoder.c │ │ ├── decoder.h │ │ ├── drive.c │ │ ├── fat.h │ │ ├── fixjmp.scr │ │ ├── format.c │ │ ├── fs.h │ │ ├── ini.c │ │ ├── ini.h │ │ ├── main.c │ │ ├── makebldr.bat │ │ ├── makefile │ │ ├── sources │ │ ├── splash.c │ │ ├── splash.h │ │ ├── startup.asm │ │ ├── video.c │ │ └── video.h │ ├── Images │ │ ├── bldr_exfat │ │ ├── bldr_fat12 │ │ ├── bldr_fat16 │ │ └── readme.txt │ └── dirs └── utilities │ ├── DiskPart │ ├── diskpart.cpp │ ├── diskpart.h │ ├── makefile │ ├── mbr.dat │ ├── mbr.h │ ├── simplestring.cpp │ ├── simplestring.h │ └── sources │ ├── bincompress │ ├── bc.h │ ├── bcio.c │ ├── bcio.h │ ├── bcxpress.c │ ├── bcxpress.h │ ├── bincompress.c │ ├── bincompress.h │ ├── makefile │ └── sources │ ├── cesys │ └── dos │ │ ├── main.c │ │ └── makefile │ └── dirs ├── loadcepc ├── bootarg.h ├── debug.c ├── ethernet.h ├── ethmain.c ├── kernel.h ├── loadcepc.h ├── loadcepc.mak ├── loadnkpc.h ├── main.c ├── mdppfs.c ├── pc.h ├── ppfs.c ├── ppfs.h ├── ppfstool.c ├── readme.txt ├── setupen2.bat ├── setupenv.bat ├── smchw.h ├── transfer.asm ├── transfer.s ├── video.c ├── video.h ├── wdm.h ├── windows.h ├── xmsapi.c └── xmsapi.h └── wecloader ├── bldr ├── args.c ├── bldr.h ├── config.c ├── console │ ├── bldr.bib │ ├── log.c │ ├── makefile │ ├── makefile.inc │ └── sources ├── dirs ├── download.c ├── drivers.c ├── init.c ├── loados.c ├── loaduldr.c ├── main.c ├── notify.c ├── pci.c ├── poweroff.c ├── poweron.c ├── preload.c ├── run.c ├── serial │ ├── bldr.bib │ ├── log.c │ ├── makefile │ ├── makefile.inc │ └── sources └── stub.c ├── bootSector ├── fat │ └── bsect.asm └── fat32 │ └── bsect.asm ├── dirs ├── diskimages ├── cepcboot.144 └── readme.txt ├── tools └── dirs └── xldr ├── bios.asm ├── bldrcfg.nb0 ├── console ├── log.c ├── makefile ├── makefile.inc ├── sources └── xldr.bib ├── dirs ├── filesystem.c ├── serial ├── log.c ├── makefile ├── makefile.inc ├── sources └── xldr.bib ├── startup.asm ├── xldr.c └── xldr.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | # Windows image file caches 35 | Thumbs.db 36 | ehthumbs.db 37 | 38 | # Folder config file 39 | Desktop.ini 40 | 41 | # Recycle Bin used on file shares 42 | $RECYCLE.BIN/ 43 | 44 | # Windows Installer files 45 | *.cab 46 | *.msi 47 | *.msm 48 | *.msp 49 | 50 | # Windows shortcuts 51 | *.lnk 52 | 53 | # build gen folder 54 | obj 55 | 56 | # ========================= 57 | # Operating System Files 58 | # ========================= 59 | 60 | # OSX 61 | # ========================= 62 | 63 | .DS_Store 64 | .AppleDouble 65 | .LSOverride 66 | 67 | # Thumbnails 68 | ._* 69 | 70 | # Files that might appear in the root of a volume 71 | .DocumentRevisions-V100 72 | .fseventsd 73 | .Spotlight-V100 74 | .TemporaryItems 75 | .Trashes 76 | .VolumeIcon.icns 77 | 78 | # Directories potentially created on remote AFP share 79 | .AppleDB 80 | .AppleDesktop 81 | Network Trash Folder 82 | Temporary Items 83 | .apdisk 84 | 85 | # MASM/MSVC generation files 86 | *.lst 87 | *.cod 88 | *.bsc 89 | -------------------------------------------------------------------------------- /CLoader/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /CLoader/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /CLoader/CldrSources.cmn: -------------------------------------------------------------------------------- 1 | 2 | #make up for not having PLATLIB var in CE 6 build env. 3 | !IF "$(_WINCEOSVER)"=="600" 4 | _PLATLIB=$(_TARGETPLATROOT)\lib 5 | !ENDIF 6 | 7 | -------------------------------------------------------------------------------- /CLoader/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/ReadMe.txt -------------------------------------------------------------------------------- /CLoader/bootSector/FAT16BootSec.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/FAT16BootSec.img -------------------------------------------------------------------------------- /CLoader/bootSector/FAT32BootSec.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/FAT32BootSec.img -------------------------------------------------------------------------------- /CLoader/bootSector/ReadMe.txt: -------------------------------------------------------------------------------- 1 | The boot sectors need to be built with MASM 611 and linked with the linker from MASM 5. 2 | 3 | These tools need to be installd on a 32 bit version of Windows 7. -------------------------------------------------------------------------------- /CLoader/bootSector/fat/BSECT.COM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/fat/BSECT.COM -------------------------------------------------------------------------------- /CLoader/bootSector/fat/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/fat/bsect.img -------------------------------------------------------------------------------- /CLoader/bootSector/fat32/BSECT.COM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/fat32/BSECT.COM -------------------------------------------------------------------------------- /CLoader/bootSector/fat32/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/bootSector/fat32/bsect.img -------------------------------------------------------------------------------- /CLoader/cldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/cldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | 15 | wceldr: 16 | !IF "$(_WINCEOSVER)"=="600" 17 | romimage $(ROMIMAGE_FLAGS) bldr6.bib 18 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 19 | !ELSE 20 | romimage $(ROMIMAGE_FLAGS) bldr.bib 21 | !ENDIF 22 | 23 | if exist $(_RELEASEDIR)\xldrC.nb0 copy /b $(_RELEASEDIR)\xldrC.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrC.bin $(_RELEASEDIR)\wceldrC 24 | 25 | !IF "$(WINCEREL)"=="1" 26 | del $(_FLATRELEASEDIR)\wceldrC 27 | if exist $(_RELEASEDIR)\wceldrC xcopy /Q /I $(_RELEASEDIR)\wceldrC $(_FLATRELEASEDIR) 28 | !ENDIF 29 | 30 | 31 | -------------------------------------------------------------------------------- /CLoader/cldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /CLoader/cldr/serial/bldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | BLDRS 00130000 00050000 RAMIMAGE 20 | RAM 00180000 0007EF00 RAM 21 | IVT 001FEF00 00000100 RESERVED ; See pIVT 22 | BOOTARGS 001FF000 00001000 RESERVED ; Boot arguments, see also BOOT_ARG_PTR_LOCATION, BOOT_ARG_LOCATION_NP, BOOT_ARG_PTR_LOCATION_NP 23 | 24 | 25 | CONFIG 26 | 27 | COMPRESSION=OFF 28 | PROFILE=OFF 29 | KERNELFIXUPS=ON 30 | 31 | 32 | MODULES 33 | 34 | ; Name Path Memory Flags 35 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 36 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bldrS.exe bldrS 37 | -------------------------------------------------------------------------------- /CLoader/cldr/serial/bldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | BLDRS 00130000 00050000 RAMIMAGE 20 | RAM 00180000 0007EF00 RAM 21 | IVT 001FEF00 00000100 RESERVED ; See pIVT 22 | BOOTARGS 001FF000 00001000 RESERVED ; Boot arguments, see also BOOT_ARG_PTR_LOCATION, BOOT_ARG_LOCATION_NP, BOOT_ARG_PTR_LOCATION_NP 23 | 24 | 25 | CONFIG 26 | 27 | COMPRESSION=OFF 28 | PROFILE=OFF 29 | KERNELFIXUPS=ON 30 | 31 | 32 | MODULES 33 | 34 | ; Name Path Memory Flags 35 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 36 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bldrS.exe bldrS 37 | -------------------------------------------------------------------------------- /CLoader/cldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/cldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) bldr6.bib 17 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) bldr.bib 20 | !ENDIF 21 | if exist $(_RELEASEDIR)\xldrS.nb0 copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\wceldrS 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\wceldrS 24 | if exist $(_RELEASEDIR)\wceldrS xcopy /Q /I $(_RELEASEDIR)\wceldrS $(_FLATRELEASEDIR) 25 | !ENDIF 26 | -------------------------------------------------------------------------------- /CLoader/core/common/heaplocal.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | // 17 | // Function: LocalAlloc 18 | // 19 | // This is simple wrapper which allows use standard C++ library new/delete 20 | // operators. 21 | // 22 | #ifdef DEBUG 23 | #undef LocalAlloc 24 | #endif 25 | 26 | HLOCAL 27 | LocalAlloc( 28 | UINT flags, 29 | UINT size 30 | ) 31 | { 32 | UNREFERENCED_PARAMETER(flags); 33 | return BootAlloc(size); 34 | } 35 | 36 | //------------------------------------------------------------------------------ 37 | // 38 | // Function: LocalFree 39 | // 40 | // This is simple wrapper which allows use standard C++ library new/delete 41 | // operators. 42 | // 43 | HLOCAL 44 | LocalFree( 45 | HLOCAL hMemory 46 | ) 47 | { 48 | BootFree(hMemory); 49 | return NULL; 50 | } 51 | 52 | //------------------------------------------------------------------------------ 53 | 54 | -------------------------------------------------------------------------------- /CLoader/core/common/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/core/common/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=boot_core 15 | TARGETTYPE=LIBRARY 16 | RELEASETYPE=PLATFORM 17 | 18 | SYNCHRONIZE_BLOCK=1 19 | 20 | SYNCHRONIZE_DRAIN=1 21 | 22 | 23 | INCLUDES=..\..\inc;$(INCLUDES) 24 | 25 | SOURCES= \ 26 | main.c \ 27 | heap.c \ 28 | heapLocal.c \ 29 | crtsupp.c 30 | 31 | #(db)WARNLEVEL=4 32 | #(db)WARNISERROR=1 33 | 34 | -------------------------------------------------------------------------------- /CLoader/core/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | common \ 16 | filesys \ 17 | display \ 18 | x86_bios \ 19 | 20 | -------------------------------------------------------------------------------- /CLoader/core/display/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/core/display/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | TARGETNAME=boot_driver_display 14 | TARGETTYPE=LIBRARY 15 | RELEASETYPE=PLATFORM 16 | 17 | SYNCHRONIZE_DRAIN=1 18 | 19 | #include common settings for core build 20 | !INCLUDE ..\..\CldrSources.cmn 21 | 22 | INCLUDES=..\..\inc;$(INCLUDES) 23 | 24 | SOURCES= \ 25 | display.cpp \ 26 | splash.cpp 27 | 28 | WARNLEVEL=4 29 | WARNISERROR=1 30 | 31 | -------------------------------------------------------------------------------- /CLoader/core/display/splash.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | 20 | #ifndef _SPLASH_H 21 | #define _SPLASH_H 22 | 23 | // NOTE: A 24-bit screen will be requested 24 | #define SPLASH_SCREEN_WIDTH 640 25 | #define SPLASH_SCREEN_HEIGHT 480 26 | 27 | #define PROGRESS_BAR_WIDTH 100 28 | #define PROGRESS_BAR_HEIGHT 10 29 | #define PROGRESS_BAR_TOP_MARGIN 5 30 | #define PROGRESS_BAR_COLOUR 0x00383838 // 6bits per primary 31 | #define PROGRESS_BAR_UPDATE_THRESHOLD 25 32 | 33 | #define SPLASH_IMAGE_FILE_NAME "splash.bmp" 34 | 35 | // Public function prototypes 36 | int InitSplashScreen(); 37 | void SetProgressValue(int progress); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /CLoader/core/filesys/fat16_funcs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | #ifndef _FAT_H_ 20 | #define _FAT_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // 27 | // Function prototypes 28 | // 29 | BOOL FAT16_FSInit(void); 30 | ULONG FAT16_FSOpenFile(PCHAR pFileName); 31 | void FAT16_FSCloseFile(void); 32 | BOOL FAT16_FSReadFile(PUCHAR pAddress, ULONG Length); 33 | BOOL FAT16_FSRewind(ULONG offset); 34 | 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // _FAT_H_ 41 | -------------------------------------------------------------------------------- /CLoader/core/filesys/fat32_funcs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | #ifndef _FAT32_H_ 20 | #define _FAT32_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // 27 | // Function prototypes 28 | // 29 | BOOL FAT32_FSInit(void); 30 | ULONG FAT32_FSOpenFile(PCHAR pFileName); 31 | void FAT32_FSCloseFile(void); 32 | BOOL FAT32_FSReadFile(PUCHAR pAddress, ULONG Length); 33 | BOOL FAT32_FSRewind(ULONG offset); 34 | 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // _FAT32_H_ 41 | -------------------------------------------------------------------------------- /CLoader/core/filesys/fs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | 12 | BOOLEAN ReadSectors(UCHAR DriveID, ULONG LBA, USHORT nSectors, PUCHAR pBuffer); 13 | 14 | ////////////////////////////////////////// 15 | // 16 | // BIN image and record headers 17 | // 18 | #pragma pack(1) 19 | typedef struct // Image header (one per BIN image) 20 | { 21 | CHAR SyncBytes[7]; 22 | ULONG ImageAddr; 23 | ULONG ImageLen; 24 | } IMAGEHDR, *PIMAGEHDR; 25 | #pragma pack() 26 | 27 | #pragma pack(1) 28 | typedef struct // Record header (one per section in image) 29 | { 30 | ULONG RecordAddr; 31 | ULONG RecordLen; 32 | ULONG RecordChksum; 33 | } RECORDHDR, *PRECORDHDR; 34 | #pragma pack() 35 | 36 | typedef struct 37 | { 38 | BOOL useEdd; 39 | UCHAR DriveId; 40 | USHORT usNumCyl; 41 | USHORT usNumHeads; 42 | USHORT usSectorsPerTrack; 43 | USHORT usSectorSize; 44 | DWORD dwTotalSectors; 45 | } DRIVE_INFO, *PDRIVE_INFO; 46 | 47 | // Helper macros 48 | #define TO_UPPER(a) ((a >= 0x61) && (a <=0x7A) ? a - 0x20 : a) 49 | #define MIN(a, b) (a < b ? a : b) 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /CLoader/core/filesys/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/core/filesys/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=boot_core_FATfilesys 15 | TARGETTYPE=LIBRARY 16 | RELEASETYPE=PLATFORM 17 | 18 | SYNCHRONIZE_BLOCK=1 19 | 20 | ASM_SAFESEH=1 21 | 22 | #include common settings for core build 23 | !INCLUDE ..\..\CldrSources.cmn 24 | 25 | INCLUDES=..\..\inc;$(INCLUDES) 26 | 27 | SOURCES= \ 28 | FileSys.cpp \ 29 | bldr_fat16.c \ 30 | bldr_fat32.c \ 31 | 32 | 33 | SOURCELIBS= \ 34 | $(_PLATLIB)\$(_CPUDEPPATH)\boot_core_x86_bios.lib 35 | 36 | #(db)WARNLEVEL=4 37 | #(db)WARNISERROR=1 38 | 39 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/jumpto.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | typedef 18 | void 19 | (*PFN_LAUNCH)( 20 | ); 21 | 22 | //------------------------------------------------------------------------------ 23 | 24 | void 25 | BootJumpTo( 26 | uint32_t address 27 | ) 28 | { 29 | // Read an UNCACHED address to serialize. No actual cache flush required. 30 | _asm { 31 | mov eax, DWORD PTR ds:0A0000000h 32 | xor eax, eax 33 | } 34 | 35 | // flush TLB 36 | _asm { 37 | mov eax, cr3 38 | mov cr3, eax 39 | } 40 | 41 | ((PFN_LAUNCH)(address))(); 42 | } 43 | 44 | //------------------------------------------------------------------------------ 45 | 46 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/memory.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | void* 18 | BootPAtoVA( 19 | uint32_t pa, 20 | bool_t cached 21 | ) 22 | { 23 | UNREFERENCED_PARAMETER(cached); 24 | return (void*)pa; 25 | } 26 | 27 | //------------------------------------------------------------------------------ 28 | 29 | uint32_t 30 | BootVAtoPA( 31 | void *pAddress 32 | ) 33 | { 34 | return (uint32_t)pAddress; 35 | } 36 | 37 | //------------------------------------------------------------------------------ 38 | 39 | uint32_t 40 | BootImageVAtoPA( 41 | void *pAddress 42 | ) 43 | { 44 | return (uint32_t)pAddress & ~0xA0000000; 45 | } 46 | 47 | //------------------------------------------------------------------------------ 48 | 49 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/oalmemory.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | VOID* 18 | OALPAtoVA( 19 | UINT32 pa, 20 | BOOL cached 21 | ) 22 | { 23 | return BootPAtoVA(pa, cached); 24 | } 25 | 26 | //------------------------------------------------------------------------------ 27 | 28 | UINT32 29 | OALVAtoPA( 30 | VOID *va 31 | ) 32 | { 33 | return BootVAtoPA(va); 34 | } 35 | 36 | //------------------------------------------------------------------------------ 37 | 38 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/oaltimer.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | UINT32 18 | OALGetTickCount( 19 | ) 20 | { 21 | return OEMBootGetTickCount(); 22 | } 23 | 24 | //------------------------------------------------------------------------------ 25 | 26 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/pci.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | #include 15 | 16 | //------------------------------------------------------------------------------ 17 | 18 | void* 19 | BootPciMbarToVA( 20 | BootPciLocation_t pciLoc, 21 | enum_t index, 22 | bool_t cached 23 | ) 24 | { 25 | void *pAddress = NULL; 26 | uint32_t mbar; 27 | 28 | // Read MBAR 29 | if (!BootPciConfigRead( 30 | pciLoc, (uint8_t)(0x10 + (index << 2)), &mbar, sizeof(mbar) 31 | )) goto cleanUp; 32 | if (mbar == 0xFFFFFFFF) goto cleanUp; 33 | 34 | // Map MBAR to CPU address space 35 | if ((mbar & 0x1) != 0) 36 | { 37 | pAddress = (void*)(mbar & ~0x1); 38 | } 39 | else 40 | { 41 | pAddress = BootPAtoVA(mbar, cached); 42 | } 43 | 44 | cleanUp: 45 | return pAddress; 46 | } 47 | 48 | //------------------------------------------------------------------------------ 49 | 50 | -------------------------------------------------------------------------------- /CLoader/core/x86_bios/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=boot_core_x86_bios 15 | TARGETTYPE=LIBRARY 16 | RELEASETYPE=PLATFORM 17 | 18 | #SYNCHRONIZE_DRAIN=1 19 | 20 | ASM_SAFESEH=1 21 | 22 | #include common settings for core build 23 | !INCLUDE ..\..\CldrSources.cmn 24 | 25 | INCLUDES=..\..\inc;$(INCLUDES) 26 | 27 | SOURCES= \ 28 | start.asm \ 29 | jumpTo.c \ 30 | memory.c \ 31 | bios.asm \ 32 | biosInt.c \ 33 | pci.c \ 34 | oalIo.c \ 35 | oalMemory.c \ 36 | oalTimer.c 37 | 38 | 39 | #(db)WARNLEVEL=4 40 | #(db)WARNISERROR=1 41 | 42 | -------------------------------------------------------------------------------- /CLoader/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | log \ 16 | core \ 17 | iniparser \ 18 | cldr \ 19 | xldr 20 | -------------------------------------------------------------------------------- /CLoader/inc/FileSysAPI.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | 20 | // 21 | // BIOS loader debug support 22 | // 23 | 24 | #ifndef _FILESYSAPI_H 25 | #define _FILESYSAPI_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | int InitializeFileSys (void); 32 | 33 | 34 | BOOL FSInit(); 35 | ULONG FSOpenFile( char* pFileName ); 36 | void FSCloseFile( void ); 37 | BOOL FSReadFile( PUCHAR pAddress, ULONG Length ); 38 | BOOL FSRewind( ULONG Offset ); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | 45 | #endif // _FILESYSAPI_H 46 | -------------------------------------------------------------------------------- /CLoader/inc/boot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_H 14 | #define __BOOT_H 15 | 16 | //------------------------------------------------------------------------------ 17 | 18 | #include 19 | #include 20 | #include 21 | //#include 22 | #include 23 | #include 24 | #include 25 | 26 | //#include < bootDriver.h> 27 | //#include 28 | 29 | //#include 30 | //#include 31 | //#include 32 | //#include 33 | //#include 34 | //#include 35 | //#include 36 | //#include 37 | 38 | //(db) 39 | #include 40 | //#include 41 | 42 | //------------------------------------------------------------------------------ 43 | 44 | #endif // __BOOT_H 45 | -------------------------------------------------------------------------------- /CLoader/inc/bootDebugZones.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_DEBUGZONES_H 14 | #define __BOOT_DEBUGZONES_H 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | //------------------------------------------------------------------------------ 23 | // Debug zone defines 24 | // 25 | // NOTE: dpCurSettings is defined in boot\log\debuglog.c 26 | 27 | 28 | 29 | 30 | 31 | //------------------------------------------------------------------------------ 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif // __BOOT_DEBUGZONES_H 38 | -------------------------------------------------------------------------------- /CLoader/inc/bootblockutils.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_BLOCK_UTILS_H 14 | #define __BOOT_BLOCK_UTILS_H 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | 23 | //------------------------------------------------------------------------------ 24 | 25 | bool_t 26 | BootBlockFormatForStoreDownload( 27 | handle_t hBlock, 28 | handle_t hDownload 29 | ); 30 | 31 | //------------------------------------------------------------------------------ 32 | 33 | bool_t 34 | BootBlockLoadBinFsImage( 35 | handle_t hBlock, 36 | handle_t hSegment, 37 | size_t offset, 38 | uint32_t *pAddress 39 | ); 40 | 41 | //------------------------------------------------------------------------------ 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif // __BOOT_BLOCK_UTILS_H 48 | -------------------------------------------------------------------------------- /CLoader/inc/bootdriver.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #pragma once 14 | 15 | #include 16 | 17 | namespace ceboot { 18 | 19 | //------------------------------------------------------------------------------ 20 | // 21 | // Class: BootDriver_t 22 | // 23 | 24 | class __declspec(novtable) BootDriver_t 25 | { 26 | 27 | public: 28 | 29 | virtual 30 | bool_t 31 | __cdecl 32 | DeInit( 33 | ) = 0; 34 | 35 | virtual 36 | bool_t 37 | __cdecl 38 | IoCtl( 39 | enum_t code, 40 | void *pBuffer, 41 | size_t size 42 | ) = 0; 43 | 44 | }; 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | }; // ceboot 49 | -------------------------------------------------------------------------------- /CLoader/inc/bootfactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_FACTORY_H 14 | #define __BOOT_FACTORY_H 15 | 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // Function: OEMBootCreateDriver 26 | // 27 | handle_t 28 | OEMBootCreateDriver( 29 | void *pContext, 30 | enum_t classId, 31 | enum_t index 32 | ); 33 | 34 | //------------------------------------------------------------------------------ 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // __BOOT_FACTORY_H 41 | -------------------------------------------------------------------------------- /CLoader/inc/util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | // 13 | //------------------------------------------------------------------------------ 14 | // 15 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 16 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 18 | // PARTICULAR PURPOSE. 19 | // 20 | //------------------------------------------------------------------------------ 21 | 22 | #ifndef _UTIL_H 23 | #define _UTIL_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void StrNCpy(PUCHAR dest, PUCHAR src, ULONG length); 30 | ULONG ParseDec(PCHAR str, ULONG * pVal); 31 | ULONG ParseHex(PCHAR str, ULONG * pVal); 32 | ULONG ParseInteger(PCHAR str, ULONG * pVal); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /CLoader/iniparser/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/iniparser/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | !endif 13 | 14 | 15 | TARGETNAME=iniparse 16 | TARGETTYPE=LIBRARY 17 | 18 | SYNCHRONIZE_BLOCK=1 19 | 20 | INCLUDES=..\inc;$(INCLUDES) 21 | 22 | LINKER_SUBSYSTEM=-subsystem:native 23 | LDEFINES=$(LDEFINES) $(LINKER_SUBSYSTEM) /FIXED:NO 24 | 25 | SOURCES= parser.c \ 26 | util.c 27 | -------------------------------------------------------------------------------- /CLoader/log/kitllog.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | void 18 | KITLOutputDebugString( 19 | const char *fmt, ... 20 | ) 21 | { 22 | va_list pArgList; 23 | 24 | va_start(pArgList, fmt); 25 | BootLogA(fmt, pArgList); 26 | va_end(pArgList); 27 | } 28 | 29 | //------------------------------------------------------------------------------ 30 | 31 | -------------------------------------------------------------------------------- /CLoader/log/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/log/oallog.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | DWORD 18 | g_oalLogMask = 0; 19 | 20 | //------------------------------------------------------------------------------ 21 | 22 | VOID OALLogSerial( 23 | LPCWSTR format, 24 | ... 25 | ) 26 | { 27 | va_list pArgList; 28 | 29 | va_start(pArgList, format); 30 | BootLogW(format, pArgList); 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | 35 | -------------------------------------------------------------------------------- /CLoader/log/obj/x86/checked/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\checked\format.obj\ 3 | obj\x86\checked\log.obj\ 4 | obj\x86\checked\dump.obj\ 5 | obj\x86\checked\oallog.obj\ 6 | obj\x86\checked\debuglog.obj\ 7 | obj\x86\checked\kitllog.obj 8 | 9 | -------------------------------------------------------------------------------- /CLoader/log/obj/x86/debug/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\debug\format.obj\ 3 | obj\x86\debug\log.obj\ 4 | obj\x86\debug\dump.obj\ 5 | obj\x86\debug\oallog.obj\ 6 | obj\x86\debug\debuglog.obj\ 7 | obj\x86\debug\kitllog.obj 8 | 9 | -------------------------------------------------------------------------------- /CLoader/log/obj/x86/retail/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\retail\format.obj\ 3 | obj\x86\retail\log.obj\ 4 | obj\x86\retail\dump.obj\ 5 | obj\x86\retail\oallog.obj\ 6 | obj\x86\retail\debuglog.obj\ 7 | obj\x86\retail\kitllog.obj 8 | 9 | -------------------------------------------------------------------------------- /CLoader/log/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | TARGETNAME=boot_log 14 | TARGETTYPE=LIBRARY 15 | RELEASETYPE=PLATFORM 16 | 17 | SYNCHRONIZE_BLOCK=1 18 | 19 | INCLUDES=..\inc;$(INCLUDES) 20 | 21 | SOURCES= \ 22 | format.c \ 23 | log.c \ 24 | dump.c \ 25 | oalLog.c \ 26 | debugLog.c \ 27 | kitlLog.c 28 | 29 | #(db)WARNLEVEL=4 30 | #(db)WARNISERROR=1 31 | 32 | -------------------------------------------------------------------------------- /CLoader/xldr/bldrcfg.nb0: -------------------------------------------------------------------------------- 1 | BLDRCFG 2 | -------------------------------------------------------------------------------- /CLoader/xldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/xldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) xldr6.bib 17 | _RELEASEDIR=$(WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) xldr.bib 20 | !ENDIF 21 | 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\wceldrC 24 | if exist $(_RELEASEDIR)\wceldrC xcopy /Q /I $(_RELEASEDIR)\wceldrC $(_FLATRELEASEDIR) 25 | !ENDIF 26 | 27 | -------------------------------------------------------------------------------- /CLoader/xldr/console/obj/x86/debug/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\debug\startup.obj\ 3 | obj\x86\debug\bios.obj\ 4 | obj\x86\debug\filesystem.obj\ 5 | obj\x86\debug\xldr.obj\ 6 | obj\x86\debug\log.obj 7 | 8 | -------------------------------------------------------------------------------- /CLoader/xldr/console/obj/x86/debug/xldrc.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/xldr/console/obj/x86/debug/xldrc.pdb -------------------------------------------------------------------------------- /CLoader/xldr/console/obj/x86/retail/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\retail\startup.obj\ 3 | obj\x86\retail\bios.obj\ 4 | obj\x86\retail\filesystem.obj\ 5 | obj\x86\retail\xldr.obj\ 6 | obj\x86\retail\log.obj 7 | 8 | -------------------------------------------------------------------------------- /CLoader/xldr/console/obj/x86/retail/xldrc.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/xldr/console/obj/x86/retail/xldrc.pdb -------------------------------------------------------------------------------- /CLoader/xldr/console/xldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRC 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrC.exe xldrC 40 | 41 | -------------------------------------------------------------------------------- /CLoader/xldr/console/xldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRC 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrC.exe xldrC 40 | 41 | -------------------------------------------------------------------------------- /CLoader/xldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) xldr6.bib 17 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) xldr.bib 20 | !ENDIF 21 | if exist $(_RELEASEDIR)\bldrS.bin copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\wceldrS 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\wceldrS 24 | if exist $(_RELEASEDIR)\wceldrS xcopy /Q /I $(_RELEASEDIR)\wceldrS $(_FLATRELEASEDIR) 25 | !ENDIF 26 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/obj/x86/debug/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\debug\log.obj\ 3 | obj\x86\debug\startup.obj\ 4 | obj\x86\debug\bios.obj\ 5 | obj\x86\debug\filesystem.obj\ 6 | obj\x86\debug\xldr.obj 7 | 8 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/obj/x86/debug/xldrs.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/xldr/serial/obj/x86/debug/xldrs.pdb -------------------------------------------------------------------------------- /CLoader/xldr/serial/obj/x86/retail/_objects.mac: -------------------------------------------------------------------------------- 1 | OBJECTS=\ 2 | obj\x86\retail\log.obj\ 3 | obj\x86\retail\startup.obj\ 4 | obj\x86\retail\bios.obj\ 5 | obj\x86\retail\filesystem.obj\ 6 | obj\x86\retail\xldr.obj 7 | 8 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/obj/x86/retail/xldrs.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/CLoader/xldr/serial/obj/x86/retail/xldrs.pdb -------------------------------------------------------------------------------- /CLoader/xldr/serial/xldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRS 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrS.exe xldrS 40 | 41 | -------------------------------------------------------------------------------- /CLoader/xldr/serial/xldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRS 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrS.exe xldrS 40 | 41 | -------------------------------------------------------------------------------- /CLoader/xldr/xldr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __XLDR_H 14 | #define __XLDR_H 15 | 16 | #include 17 | 18 | //------------------------------------------------------------------------------ 19 | 20 | #define VERSION_MAJOR 1 21 | #define VERSION_MINOR 0 22 | 23 | //------------------------------------------------------------------------------ 24 | 25 | #define IMAGE_XLDR_BOOTSEC_PA 0xFA00 26 | #define IMAGE_XLDR_BUFFER_PA 0xFC00 27 | 28 | //------------------------------------------------------------------------------ 29 | 30 | handle_t 31 | FileSystemInit( 32 | ); 33 | 34 | bool_t 35 | FileSystemRead( 36 | handle_t hFileSystem, 37 | void *pBuffer, 38 | size_t size 39 | ); 40 | 41 | void 42 | FileSystemDeinit( 43 | handle_t hFileSystem 44 | ); 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /NLoader/NldrSources.cmn: -------------------------------------------------------------------------------- 1 | 2 | #make up for not having PLATLIB var in CE 6 build env. 3 | !IF "$(_WINCEOSVER)"=="600" 4 | _PLATLIB=$(_TARGETPLATROOT)\lib 5 | !ENDIF 6 | 7 | -------------------------------------------------------------------------------- /NLoader/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/NLoader/ReadMe.txt -------------------------------------------------------------------------------- /NLoader/bootSector/FAT12/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/NLoader/bootSector/FAT12/bsect.img -------------------------------------------------------------------------------- /NLoader/bootSector/FAT12/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM use nasm to make boot sector, 512Byte 3 | @REM 4 | @ECHO OFF 5 | 6 | ..\nasm_win32\nasm.exe -o bsect.img bsect.s 7 | -------------------------------------------------------------------------------- /NLoader/bootSector/FAT16/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/NLoader/bootSector/FAT16/bsect.img -------------------------------------------------------------------------------- /NLoader/bootSector/FAT16/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM use nasm to make boot sector, 512Byte 3 | @REM 4 | @ECHO OFF 5 | 6 | ..\nasm_win32\nasm.exe -o bsect.img bsect.s 7 | -------------------------------------------------------------------------------- /NLoader/bootSector/FAT32/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/NLoader/bootSector/FAT32/bsect.img -------------------------------------------------------------------------------- /NLoader/bootSector/FAT32/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM use nasm to make boot sector, 512Byte 3 | @REM 4 | @ECHO OFF 5 | 6 | ..\nasm_win32\nasm.exe -o bsect.img -l bsect.lst bsect.s 7 | -------------------------------------------------------------------------------- /NLoader/bootSector/ReadMe.md: -------------------------------------------------------------------------------- 1 | The boot sectors need to be built with nasm v2.14 2 | 3 | just run build.bat for re-build -------------------------------------------------------------------------------- /NLoader/bootSector/exFAT/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/NLoader/bootSector/exFAT/bsect.img -------------------------------------------------------------------------------- /NLoader/bootSector/exFAT/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM use nasm to make boot sector, 512Byte 3 | @REM 4 | @ECHO OFF 5 | 6 | ..\nasm_win32\nasm.exe -o bsect.img bsect.s 7 | -------------------------------------------------------------------------------- /NLoader/bootSector/nasm_win32/LICENSE: -------------------------------------------------------------------------------- 1 | NASM is now licensed under the 2-clause BSD license, also known as the 2 | simplified BSD license. 3 | 4 | Copyright 1996-2010 the NASM Authors - All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following 8 | conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following 14 | disclaimer in the documentation and/or other materials provided 15 | with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 22 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 29 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /NLoader/core/common/heaplocal.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | // 17 | // Function: LocalAlloc 18 | // 19 | // This is simple wrapper which allows use standard C++ library new/delete 20 | // operators. 21 | // 22 | #ifdef DEBUG 23 | #undef LocalAlloc 24 | #endif 25 | 26 | HLOCAL 27 | LocalAlloc( 28 | UINT flags, 29 | UINT size 30 | ) 31 | { 32 | UNREFERENCED_PARAMETER(flags); 33 | return BootAlloc(size); 34 | } 35 | 36 | //------------------------------------------------------------------------------ 37 | // 38 | // Function: LocalFree 39 | // 40 | // This is simple wrapper which allows use standard C++ library new/delete 41 | // operators. 42 | // 43 | HLOCAL 44 | LocalFree( 45 | HLOCAL hMemory 46 | ) 47 | { 48 | BootFree(hMemory); 49 | return NULL; 50 | } 51 | 52 | //------------------------------------------------------------------------------ 53 | 54 | -------------------------------------------------------------------------------- /NLoader/core/common/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/core/common/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=boot_core 15 | TARGETTYPE=LIBRARY 16 | RELEASETYPE=PLATFORM 17 | 18 | SYNCHRONIZE_BLOCK=1 19 | 20 | SYNCHRONIZE_DRAIN=1 21 | 22 | 23 | INCLUDES=..\..\inc;$(INCLUDES) 24 | 25 | SOURCES= \ 26 | main.c \ 27 | heap.c \ 28 | heapLocal.c \ 29 | crtsupp.c 30 | 31 | #(db)WARNLEVEL=4 32 | #(db)WARNISERROR=1 33 | 34 | -------------------------------------------------------------------------------- /NLoader/core/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | common \ 16 | filesys \ 17 | display \ 18 | x86_bios \ 19 | 20 | -------------------------------------------------------------------------------- /NLoader/core/display/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/core/display/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | TARGETNAME=boot_driver_display 14 | TARGETTYPE=LIBRARY 15 | RELEASETYPE=PLATFORM 16 | 17 | SYNCHRONIZE_DRAIN=1 18 | 19 | #include common settings for core build 20 | !INCLUDE ..\..\NldrSources.cmn 21 | 22 | INCLUDES=..\..\inc;$(INCLUDES) 23 | 24 | SOURCES= \ 25 | display.cpp \ 26 | splash.cpp 27 | 28 | WARNLEVEL=4 29 | WARNISERROR=1 30 | 31 | -------------------------------------------------------------------------------- /NLoader/core/display/splash.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | 20 | #ifndef _SPLASH_H 21 | #define _SPLASH_H 22 | 23 | // NOTE: A 24-bit screen will be requested 24 | #define SPLASH_SCREEN_WIDTH 640 25 | #define SPLASH_SCREEN_HEIGHT 480 26 | 27 | #define PROGRESS_BAR_WIDTH 100 28 | #define PROGRESS_BAR_HEIGHT 10 29 | #define PROGRESS_BAR_TOP_MARGIN 5 30 | #define PROGRESS_BAR_COLOUR 0x00383838 // 6bits per primary 31 | #define PROGRESS_BAR_UPDATE_THRESHOLD 25 32 | 33 | #define SPLASH_IMAGE_FILE_NAME "splash.bmp" 34 | 35 | // Public function prototypes 36 | int InitSplashScreen(); 37 | void SetProgressValue(int progress); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /NLoader/core/filesys/exfat_funcs.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _EXFAT_FUNC_H_ 3 | #define _EXFAT_FUNC_H_ 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | // 10 | // Function prototypes 11 | // 12 | BOOL ExFAT_FSInit(void); 13 | ULONG ExFAT_FSOpenFile(PCHAR pFileName); 14 | void ExFAT_FSCloseFile(void); 15 | BOOL ExFAT_FSReadFile(PUCHAR pAddress, ULONG Length); 16 | BOOL ExFAT_FSRewind(ULONG offset); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // _EXFAT_FUNC_H_ 24 | -------------------------------------------------------------------------------- /NLoader/core/filesys/fat12_funcs.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _FAT12_H_ 3 | #define _FAT12_H_ 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | // 10 | // Function prototypes 11 | // 12 | BOOL FAT12_FSInit(void); 13 | ULONG FAT12_FSOpenFile(PCHAR pFileName); 14 | void FAT12_FSCloseFile(void); 15 | BOOL FAT12_FSReadFile(PUCHAR pAddress, ULONG Length); 16 | BOOL FAT12_FSRewind(ULONG offset); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // _FAT12_H_ 23 | -------------------------------------------------------------------------------- /NLoader/core/filesys/fat16_funcs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | #ifndef _FAT_H_ 20 | #define _FAT_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // 27 | // Function prototypes 28 | // 29 | BOOL FAT16_FSInit(void); 30 | ULONG FAT16_FSOpenFile(PCHAR pFileName); 31 | void FAT16_FSCloseFile(void); 32 | BOOL FAT16_FSReadFile(PUCHAR pAddress, ULONG Length); 33 | BOOL FAT16_FSRewind(ULONG offset); 34 | 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // _FAT_H_ 41 | -------------------------------------------------------------------------------- /NLoader/core/filesys/fat32_funcs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | #ifndef _FAT32_H_ 20 | #define _FAT32_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // 27 | // Function prototypes 28 | // 29 | BOOL FAT32_FSInit(void); 30 | ULONG FAT32_FSOpenFile(PCHAR pFileName); 31 | void FAT32_FSCloseFile(void); 32 | BOOL FAT32_FSReadFile(PUCHAR pAddress, ULONG Length); 33 | BOOL FAT32_FSRewind(ULONG offset); 34 | 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // _FAT32_H_ 41 | -------------------------------------------------------------------------------- /NLoader/core/filesys/fs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | 12 | BOOLEAN ReadSectors(UCHAR DriveID, ULONG LBA, USHORT nSectors, PUCHAR pBuffer); 13 | 14 | ////////////////////////////////////////// 15 | // 16 | // BIN image and record headers 17 | // 18 | #pragma pack(1) 19 | typedef struct // Image header (one per BIN image) 20 | { 21 | CHAR SyncBytes[7]; 22 | ULONG ImageAddr; 23 | ULONG ImageLen; 24 | } IMAGEHDR, *PIMAGEHDR; 25 | #pragma pack() 26 | 27 | #pragma pack(1) 28 | typedef struct // Record header (one per section in image) 29 | { 30 | ULONG RecordAddr; 31 | ULONG RecordLen; 32 | ULONG RecordChksum; 33 | } RECORDHDR, *PRECORDHDR; 34 | #pragma pack() 35 | 36 | typedef struct 37 | { 38 | BOOL useEdd; 39 | UCHAR DriveId; 40 | USHORT usNumCyl; 41 | USHORT usNumHeads; 42 | USHORT usSectorsPerTrack; 43 | USHORT usSectorSize; 44 | DWORD dwTotalSectors; 45 | } DRIVE_INFO, *PDRIVE_INFO; 46 | 47 | // Helper macros 48 | #define TO_UPPER(a) ((a >= 0x61) && (a <=0x7A) ? a - 0x20 : a) 49 | #define MIN(a, b) (a < b ? a : b) 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /NLoader/core/filesys/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/core/filesys/sources: -------------------------------------------------------------------------------- 1 | 2 | 3 | TARGETNAME=boot_core_FATfilesys 4 | TARGETTYPE=LIBRARY 5 | RELEASETYPE=PLATFORM 6 | 7 | SYNCHRONIZE_BLOCK=1 8 | 9 | ASM_SAFESEH=1 10 | 11 | #include common settings for core build 12 | !INCLUDE ..\..\NldrSources.cmn 13 | 14 | INCLUDES=..\..\inc;$(INCLUDES) 15 | 16 | SOURCES= \ 17 | FileSys.cpp \ 18 | bldr_fat16.c \ 19 | bldr_fat32.c \ 20 | bldr_exfat.c \ 21 | 22 | 23 | 24 | SOURCELIBS= \ 25 | $(_PLATLIB)\$(_CPUDEPPATH)\boot_core_x86_bios.lib 26 | 27 | #(db)WARNLEVEL=4 28 | #(db)WARNISERROR=1 29 | 30 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/jumpto.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | typedef 18 | void 19 | (*PFN_LAUNCH)( 20 | ); 21 | 22 | //------------------------------------------------------------------------------ 23 | 24 | void 25 | BootJumpTo( 26 | uint32_t address 27 | ) 28 | { 29 | // Read an UNCACHED address to serialize. No actual cache flush required. 30 | _asm { 31 | mov eax, DWORD PTR ds:0A0000000h 32 | xor eax, eax 33 | } 34 | 35 | // flush TLB 36 | _asm { 37 | mov eax, cr3 38 | mov cr3, eax 39 | } 40 | 41 | ((PFN_LAUNCH)(address))(); 42 | } 43 | 44 | //------------------------------------------------------------------------------ 45 | 46 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/memory.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | void* 18 | BootPAtoVA( 19 | uint32_t pa, 20 | bool_t cached 21 | ) 22 | { 23 | UNREFERENCED_PARAMETER(cached); 24 | return (void*)pa; 25 | } 26 | 27 | //------------------------------------------------------------------------------ 28 | 29 | uint32_t 30 | BootVAtoPA( 31 | void *pAddress 32 | ) 33 | { 34 | return (uint32_t)pAddress; 35 | } 36 | 37 | //------------------------------------------------------------------------------ 38 | 39 | uint32_t 40 | BootImageVAtoPA( 41 | void *pAddress 42 | ) 43 | { 44 | return (uint32_t)pAddress & ~0xA0000000; 45 | } 46 | 47 | //------------------------------------------------------------------------------ 48 | 49 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/oalmemory.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | VOID* 18 | OALPAtoVA( 19 | UINT32 pa, 20 | BOOL cached 21 | ) 22 | { 23 | return BootPAtoVA(pa, cached); 24 | } 25 | 26 | //------------------------------------------------------------------------------ 27 | 28 | UINT32 29 | OALVAtoPA( 30 | VOID *va 31 | ) 32 | { 33 | return BootVAtoPA(va); 34 | } 35 | 36 | //------------------------------------------------------------------------------ 37 | 38 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/oaltimer.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | UINT32 18 | OALGetTickCount( 19 | ) 20 | { 21 | return OEMBootGetTickCount(); 22 | } 23 | 24 | //------------------------------------------------------------------------------ 25 | 26 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/pci.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | #include 15 | 16 | //------------------------------------------------------------------------------ 17 | 18 | void* 19 | BootPciMbarToVA( 20 | BootPciLocation_t pciLoc, 21 | enum_t index, 22 | bool_t cached 23 | ) 24 | { 25 | void *pAddress = NULL; 26 | uint32_t mbar; 27 | 28 | // Read MBAR 29 | if (!BootPciConfigRead( 30 | pciLoc, (uint8_t)(0x10 + (index << 2)), &mbar, sizeof(mbar) 31 | )) goto cleanUp; 32 | if (mbar == 0xFFFFFFFF) goto cleanUp; 33 | 34 | // Map MBAR to CPU address space 35 | if ((mbar & 0x1) != 0) 36 | { 37 | pAddress = (void*)(mbar & ~0x1); 38 | } 39 | else 40 | { 41 | pAddress = BootPAtoVA(mbar, cached); 42 | } 43 | 44 | cleanUp: 45 | return pAddress; 46 | } 47 | 48 | //------------------------------------------------------------------------------ 49 | 50 | -------------------------------------------------------------------------------- /NLoader/core/x86_bios/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=boot_core_x86_bios 15 | TARGETTYPE=LIBRARY 16 | RELEASETYPE=PLATFORM 17 | 18 | #SYNCHRONIZE_DRAIN=1 19 | 20 | ASM_SAFESEH=1 21 | 22 | #include common settings for core build 23 | !INCLUDE ..\..\NldrSources.cmn 24 | 25 | INCLUDES=..\..\inc;$(INCLUDES) 26 | 27 | SOURCES= \ 28 | start.asm \ 29 | jumpTo.c \ 30 | memory.c \ 31 | bios.asm \ 32 | biosInt.c \ 33 | pci.c \ 34 | oalIo.c \ 35 | oalMemory.c \ 36 | oalTimer.c 37 | 38 | 39 | #(db)WARNLEVEL=4 40 | #(db)WARNISERROR=1 41 | 42 | -------------------------------------------------------------------------------- /NLoader/dirs: -------------------------------------------------------------------------------- 1 | 2 | DIRS= \ 3 | log \ 4 | core \ 5 | iniparser \ 6 | nldr \ 7 | xldr 8 | -------------------------------------------------------------------------------- /NLoader/inc/FileSysAPI.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | 20 | // 21 | // BIOS loader debug support 22 | // 23 | 24 | #ifndef _FILESYSAPI_H 25 | #define _FILESYSAPI_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | int InitializeFileSys (void); 32 | 33 | 34 | BOOL FSInit(); 35 | ULONG FSOpenFile( char* pFileName ); 36 | void FSCloseFile( void ); 37 | BOOL FSReadFile( PUCHAR pAddress, ULONG Length ); 38 | BOOL FSRewind( ULONG Offset ); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | 45 | #endif // _FILESYSAPI_H 46 | -------------------------------------------------------------------------------- /NLoader/inc/boot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_H 14 | #define __BOOT_H 15 | 16 | //------------------------------------------------------------------------------ 17 | 18 | #include 19 | #include 20 | #include 21 | //#include 22 | #include 23 | #include 24 | #include 25 | 26 | //#include < bootDriver.h> 27 | //#include 28 | 29 | //#include 30 | //#include 31 | //#include 32 | //#include 33 | //#include 34 | //#include 35 | //#include 36 | //#include 37 | 38 | //(db) 39 | #include 40 | //#include 41 | 42 | //------------------------------------------------------------------------------ 43 | 44 | #endif // __BOOT_H 45 | -------------------------------------------------------------------------------- /NLoader/inc/bootDebugZones.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_DEBUGZONES_H 14 | #define __BOOT_DEBUGZONES_H 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | //------------------------------------------------------------------------------ 23 | // Debug zone defines 24 | // 25 | // NOTE: dpCurSettings is defined in boot\log\debuglog.c 26 | 27 | 28 | 29 | 30 | 31 | //------------------------------------------------------------------------------ 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif // __BOOT_DEBUGZONES_H 38 | -------------------------------------------------------------------------------- /NLoader/inc/bootblockutils.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_BLOCK_UTILS_H 14 | #define __BOOT_BLOCK_UTILS_H 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | 23 | //------------------------------------------------------------------------------ 24 | 25 | bool_t 26 | BootBlockFormatForStoreDownload( 27 | handle_t hBlock, 28 | handle_t hDownload 29 | ); 30 | 31 | //------------------------------------------------------------------------------ 32 | 33 | bool_t 34 | BootBlockLoadBinFsImage( 35 | handle_t hBlock, 36 | handle_t hSegment, 37 | size_t offset, 38 | uint32_t *pAddress 39 | ); 40 | 41 | //------------------------------------------------------------------------------ 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif // __BOOT_BLOCK_UTILS_H 48 | -------------------------------------------------------------------------------- /NLoader/inc/bootdriver.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #pragma once 14 | 15 | #include 16 | 17 | namespace ceboot { 18 | 19 | //------------------------------------------------------------------------------ 20 | // 21 | // Class: BootDriver_t 22 | // 23 | 24 | class __declspec(novtable) BootDriver_t 25 | { 26 | 27 | public: 28 | 29 | virtual 30 | bool_t 31 | __cdecl 32 | DeInit( 33 | ) = 0; 34 | 35 | virtual 36 | bool_t 37 | __cdecl 38 | IoCtl( 39 | enum_t code, 40 | void *pBuffer, 41 | size_t size 42 | ) = 0; 43 | 44 | }; 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | }; // ceboot 49 | -------------------------------------------------------------------------------- /NLoader/inc/bootfactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_FACTORY_H 14 | #define __BOOT_FACTORY_H 15 | 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // Function: OEMBootCreateDriver 26 | // 27 | handle_t 28 | OEMBootCreateDriver( 29 | void *pContext, 30 | enum_t classId, 31 | enum_t index 32 | ); 33 | 34 | //------------------------------------------------------------------------------ 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // __BOOT_FACTORY_H 41 | -------------------------------------------------------------------------------- /NLoader/inc/util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | // 13 | //------------------------------------------------------------------------------ 14 | // 15 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 16 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 18 | // PARTICULAR PURPOSE. 19 | // 20 | //------------------------------------------------------------------------------ 21 | 22 | #ifndef _UTIL_H 23 | #define _UTIL_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void StrNCpy(PUCHAR dest, PUCHAR src, ULONG length); 30 | ULONG ParseDec(PCHAR str, ULONG * pVal); 31 | ULONG ParseHex(PCHAR str, ULONG * pVal); 32 | ULONG ParseInteger(PCHAR str, ULONG * pVal); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /NLoader/iniparser/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/iniparser/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. 12 | !endif 13 | 14 | 15 | TARGETNAME=iniparse 16 | TARGETTYPE=LIBRARY 17 | 18 | SYNCHRONIZE_BLOCK=1 19 | 20 | INCLUDES=..\inc;$(INCLUDES) 21 | 22 | LINKER_SUBSYSTEM=-subsystem:native 23 | LDEFINES=$(LDEFINES) $(LINKER_SUBSYSTEM) /FIXED:NO 24 | 25 | SOURCES= parser.c \ 26 | util.c 27 | -------------------------------------------------------------------------------- /NLoader/log/kitllog.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | void 18 | KITLOutputDebugString( 19 | const char *fmt, ... 20 | ) 21 | { 22 | va_list pArgList; 23 | 24 | va_start(pArgList, fmt); 25 | BootLogA(fmt, pArgList); 26 | va_end(pArgList); 27 | } 28 | 29 | //------------------------------------------------------------------------------ 30 | 31 | -------------------------------------------------------------------------------- /NLoader/log/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/log/oallog.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | DWORD 18 | g_oalLogMask = 0; 19 | 20 | //------------------------------------------------------------------------------ 21 | 22 | VOID OALLogSerial( 23 | LPCWSTR format, 24 | ... 25 | ) 26 | { 27 | va_list pArgList; 28 | 29 | va_start(pArgList, format); 30 | BootLogW(format, pArgList); 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | 35 | -------------------------------------------------------------------------------- /NLoader/log/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | TARGETNAME=boot_log 14 | TARGETTYPE=LIBRARY 15 | RELEASETYPE=PLATFORM 16 | 17 | SYNCHRONIZE_BLOCK=1 18 | 19 | INCLUDES=..\inc;$(INCLUDES) 20 | 21 | SOURCES= \ 22 | format.c \ 23 | log.c \ 24 | dump.c \ 25 | oalLog.c \ 26 | debugLog.c \ 27 | kitlLog.c 28 | 29 | #(db)WARNLEVEL=4 30 | #(db)WARNISERROR=1 31 | 32 | -------------------------------------------------------------------------------- /NLoader/nldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/nldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | 15 | nwceldr: 16 | !IF "$(_WINCEOSVER)"=="600" 17 | romimage $(ROMIMAGE_FLAGS) bldr6.bib 18 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 19 | !ELSE 20 | romimage $(ROMIMAGE_FLAGS) bldr.bib 21 | !ENDIF 22 | 23 | if exist $(_RELEASEDIR)\xldrC.nb0 copy /b $(_RELEASEDIR)\xldrC.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrC.bin $(_RELEASEDIR)\nwceldrC 24 | 25 | !IF "$(WINCEREL)"=="1" 26 | del $(_FLATRELEASEDIR)\nwceldrC 27 | if exist $(_RELEASEDIR)\nwceldrC xcopy /Q /I $(_RELEASEDIR)\nwceldrC $(_FLATRELEASEDIR) 28 | !ENDIF 29 | 30 | 31 | -------------------------------------------------------------------------------- /NLoader/nldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /NLoader/nldr/serial/bldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | BLDRS 00130000 00050000 RAMIMAGE 20 | RAM 00180000 0007EF00 RAM 21 | IVT 001FEF00 00000100 RESERVED ; See pIVT 22 | BOOTARGS 001FF000 00001000 RESERVED ; Boot arguments, see also BOOT_ARG_PTR_LOCATION, BOOT_ARG_LOCATION_NP, BOOT_ARG_PTR_LOCATION_NP 23 | 24 | 25 | CONFIG 26 | 27 | COMPRESSION=OFF 28 | PROFILE=OFF 29 | KERNELFIXUPS=ON 30 | 31 | 32 | MODULES 33 | 34 | ; Name Path Memory Flags 35 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 36 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bldrS.exe bldrS 37 | -------------------------------------------------------------------------------- /NLoader/nldr/serial/bldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | BLDRS 00130000 00050000 RAMIMAGE 20 | RAM 00180000 0007EF00 RAM 21 | IVT 001FEF00 00000100 RESERVED ; See pIVT 22 | BOOTARGS 001FF000 00001000 RESERVED ; Boot arguments, see also BOOT_ARG_PTR_LOCATION, BOOT_ARG_LOCATION_NP, BOOT_ARG_PTR_LOCATION_NP 23 | 24 | 25 | CONFIG 26 | 27 | COMPRESSION=OFF 28 | PROFILE=OFF 29 | KERNELFIXUPS=ON 30 | 31 | 32 | MODULES 33 | 34 | ; Name Path Memory Flags 35 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 36 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bldrS.exe bldrS 37 | -------------------------------------------------------------------------------- /NLoader/nldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/nldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | nwceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) bldr6.bib 17 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) bldr.bib 20 | !ENDIF 21 | if exist $(_RELEASEDIR)\xldrS.nb0 copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\nwceldrS 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\nwceldrS 24 | if exist $(_RELEASEDIR)\nwceldrS xcopy /Q /I $(_RELEASEDIR)\nwceldrS $(_FLATRELEASEDIR) 25 | !ENDIF 26 | -------------------------------------------------------------------------------- /NLoader/xldr/bldrcfg.nb0: -------------------------------------------------------------------------------- 1 | BLDRCFG 2 | -------------------------------------------------------------------------------- /NLoader/xldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/xldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | nwceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) xldr6.bib 17 | _RELEASEDIR=$(WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) xldr.bib 20 | !ENDIF 21 | 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\nwceldrC 24 | if exist $(_RELEASEDIR)\nwceldrC xcopy /Q /I $(_RELEASEDIR)\nwceldrC $(_FLATRELEASEDIR) 25 | !ENDIF 26 | 27 | -------------------------------------------------------------------------------- /NLoader/xldr/console/xldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRC 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrC.exe xldrC 40 | 41 | -------------------------------------------------------------------------------- /NLoader/xldr/console/xldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRC 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrC.exe xldrC 40 | 41 | -------------------------------------------------------------------------------- /NLoader/xldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /NLoader/xldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /NLoader/xldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | nwceldr: 15 | !IF "$(_WINCEOSVER)"=="600" 16 | romimage $(ROMIMAGE_FLAGS) xldr6.bib 17 | set _RELEASEDIR=$(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG) 18 | !ELSE 19 | romimage $(ROMIMAGE_FLAGS) xldr.bib 20 | !ENDIF 21 | if exist $(_RELEASEDIR)\bldrS.bin copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\nwceldrS 22 | !IF "$(WINCEREL)"=="1" 23 | del $(_FLATRELEASEDIR)\nwceldrS 24 | if exist $(_RELEASEDIR)\nwceldrS xcopy /Q /I $(_RELEASEDIR)\nwceldrS $(_FLATRELEASEDIR) 25 | !ENDIF 26 | -------------------------------------------------------------------------------- /NLoader/xldr/serial/xldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRS 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrS.exe xldrS 40 | 41 | -------------------------------------------------------------------------------- /NLoader/xldr/serial/xldr6.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | XLDRS 00001000 00005000 RAMIMAGE 20 | RAM 00009000 00002200 RAM 21 | STACK 0000B400 00001500 RESERVED 22 | BOOTSEC 0000FA00 00000200 RESERVED 23 | BUFFER 0000FC00 00000300 RESERVED 24 | 25 | CONFIG 26 | 27 | AUTOSIZE=OFF 28 | COMPRESSION=OFF 29 | PROFILE=OFF 30 | KERNELFIXUPS=ON 31 | 32 | ROMSTART=00001000 33 | ROMSIZE=00005000 34 | ROMWIDTH=32 35 | 36 | MODULES 37 | ; Name Path Memory Flags 38 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 39 | nk.exe $(_WINCEROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\xldrS.exe xldrS 40 | 41 | -------------------------------------------------------------------------------- /NLoader/xldr/xldr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __XLDR_H 14 | #define __XLDR_H 15 | 16 | #include 17 | 18 | //------------------------------------------------------------------------------ 19 | 20 | #define VERSION_MAJOR 1 21 | #define VERSION_MINOR 0 22 | 23 | //------------------------------------------------------------------------------ 24 | 25 | #define IMAGE_XLDR_BOOTSEC_PA 0xFA00 26 | #define IMAGE_XLDR_BUFFER_PA 0xFC00 27 | 28 | //------------------------------------------------------------------------------ 29 | 30 | handle_t 31 | FileSystemInit( 32 | ); 33 | 34 | bool_t 35 | FileSystemRead( 36 | handle_t hFileSystem, 37 | void *pBuffer, 38 | size_t size 39 | ); 40 | 41 | void 42 | FileSystemDeinit( 43 | handle_t hFileSystem 44 | ); 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Collection of WINDOWS CE bootloader 2 | --- 3 | 4 | * biosloader -- for x86 BIOS loader from WINCE 6, don't need DOS enviroments, support splash screen 5 | * wecloader -- a new x86 BIOS loader from WEC7, enhance biosloader version, support more features 6 | * CLoader -- combines biosloader and wecloader feature, clone from [Doug Boling's github](https://github.com/dougboling/CLoader) 7 | * UEFIloader -- for UEFI platform from Intel WEC7 BSP, the code need EDK2 for compiling 8 | * NLoader -- my fork CLoader for improve filesystem support and change bootsect 9 | * loadcepc -- Microsoft WINCE bootloader on DOS 10 | -------------------------------------------------------------------------------- /UEFIloader/BIN/BootIA32.efi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/UEFIloader/BIN/BootIA32.efi -------------------------------------------------------------------------------- /UEFIloader/ReadMe.txt: -------------------------------------------------------------------------------- 1 | UEFI OS Loader for WEC7 Intel BSP 2 | ================================= 3 | This folder contains the source code for building OS Loader (boot-loader) for WEC7 that works Intel EDKII firmware. The source code is built by using EDKII tool chain. For details, please refer to the WEC7 Intel BSP release note. 4 | Caution: The source code is not built with MSFT WEC7 platform builder. -------------------------------------------------------------------------------- /UEFIloader/WEC7OSLoader/MdeModulePkg/Application/CE7OSLoader/include/RamTop.h: -------------------------------------------------------------------------------- 1 | 2 | /** @file 3 | This sample application bases on HelloWorld PCD setting 4 | to print "UEFI Hello World!" to the UEFI Console. 5 | 6 | Copyright (c) 2006 - 2011, Intel Corporation 7 | All rights reserved. This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | #ifndef __RAMTOP_H__ 17 | #define __RAMTOP_H__ 18 | 19 | EFI_STATUS GetRamTop (UINT64* pRamTop); 20 | 21 | #endif // __RAMTOP_H__ 22 | -------------------------------------------------------------------------------- /UEFIloader/WEC7OSLoader/MdeModulePkg/Application/CE7OSLoader/include/boot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_H 14 | #define __BOOT_H 15 | 16 | //------------------------------------------------------------------------------ 17 | 18 | #include "include/bootTypes.h" 19 | #include "include/bootCore.h" 20 | #include "include/bootMemory.h" 21 | #include "include/bootFileSystem.h" 22 | #include "include/bootarg.h" 23 | #include "include/bootdownloadbinformat.h" 24 | #include "include/bootfilesystem.h" 25 | #include "include/bootfilesystemutils.h" 26 | #include "include/bootTerminalUtils.h" 27 | #include "include/bootTransportEdbg.h" 28 | //#include "include/bootTransportEdbgRtl8139.h" 29 | //#include "include/bootTransportEdbgDec21140.h" 30 | //#include "include/bootTransportEdbgNe2000.h" 31 | //#include "include/bootTransportEdbgDp83815.h" 32 | //#include "include/bootpci.h" 33 | 34 | //------------------------------------------------------------------------------ 35 | 36 | #endif // __BOOT_H 37 | -------------------------------------------------------------------------------- /UEFIloader/WEC7OSLoader/MdeModulePkg/Application/CE7OSLoader/include/bootfactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __BOOT_FACTORY_H 14 | #define __BOOT_FACTORY_H 15 | 16 | #include "include/BootTypes.h" 17 | #include "include/bootDriverClasses.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | //------------------------------------------------------------------------------ 24 | // 25 | // Function: OEMBootCreateDriver 26 | // 27 | handle_t 28 | OEMBootCreateDriver( 29 | void *pContext, 30 | enum_t classId, 31 | enum_t index 32 | ); 33 | 34 | //------------------------------------------------------------------------------ 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // __BOOT_FACTORY_H 41 | -------------------------------------------------------------------------------- /UEFIloader/WEC7OSLoader/MdeModulePkg/Application/CE7OSLoader/include/globalVariable.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this source code is subject to the terms of the Microsoft end-user 6 | // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 7 | // If you did not accept the terms of the EULA, you are not authorized to use 8 | // this source code. For a copy of the EULA, please see the LICENSE.RTF on your 9 | // install media. 10 | // 11 | //------------------------------------------------------------------------------ 12 | // 13 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 14 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 15 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 16 | // PARTICULAR PURPOSE. 17 | // 18 | //------------------------------------------------------------------------------ 19 | 20 | #ifndef _GLOBALVARIABLE_H 21 | #define _GLOBALVARIABLE_H 22 | 23 | #include "include/boottypes.h" 24 | 25 | typedef VOID* GLOBALVAR_HANDLE; 26 | 27 | bool_t UpdateGlobalVariables(BootConfig_t *pBootConfig); 28 | bool_t CheckIsGlobalVarVaild(BootConfig_t *pBootConfig); 29 | bool_t InitializeGlobalVariables(void); 30 | 31 | #endif // _GLOBALVARIABLE_H 32 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT12/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | @REM 14 | @REM This batch file builds the boot sector code for the Windows CE BIOS bootloader. 15 | @REM 16 | @REM It relies on a 16-bit assembler and linker. As well, it executes a debug.com 17 | @REM script at the end to extract the boot sector text area from the resultant 18 | @REM COM file. Since the boot sector code runs in a loader-less environment, the 19 | @REM better part of the COM file is of no use to us. 20 | @REM 21 | @REM ** NOTE: the debug.com script extracts just the text area of the boot sector 22 | @REM and doesn't include the BIOS parameter block (BPB) area. This is because 23 | @REM the BPB created by the format operation is used instead and an offset 24 | @REM (62d/0x3E) is applied to the boot sector code before it's written into 25 | @REM the boot sector. 26 | @REM 27 | @ECHO OFF 28 | 29 | ml /Zm /Flbsect.lst /c bsect.asm 30 | link bsect.obj,bsect.com,,,, 31 | debug bsect.com < getbsect.scr 32 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT12/getbsect.scr: -------------------------------------------------------------------------------- 1 | rcx 2 | 1C2 3 | rbx 4 | 0 5 | n bsect.img 6 | w fa3e 7 | q 8 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT16/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | @REM 14 | @REM This batch file builds the boot sector code for the Windows CE BIOS bootloader. 15 | @REM 16 | @REM It relies on a 16-bit assembler and linker. As well, it executes a debug.com 17 | @REM script at the end to extract the boot sector text area from the resultant 18 | @REM COM file. Since the boot sector code runs in a loader-less environment, the 19 | @REM better part of the COM file is of no use to us. 20 | @REM 21 | @REM ** NOTE: the debug.com script extracts just the text area of the boot sector 22 | @REM and doesn't include the BIOS parameter block (BPB) area. This is because 23 | @REM the BPB created by the format operation is used instead and an offset 24 | @REM (62d/0x3E) is applied to the boot sector code before it's written into 25 | @REM the boot sector. 26 | @REM 27 | @ECHO OFF 28 | 29 | ml /Zm /Flbsect.lst /c bsect.asm 30 | link bsect.obj,bsect.com,,,, 31 | debug bsect.com < getbsect.scr 32 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT16/getbsect.scr: -------------------------------------------------------------------------------- 1 | rcx 2 | 1C2 3 | rbx 4 | 0 5 | n bsect.img 6 | w fa3e 7 | q 8 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT32/ML.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/bootsector/FAT32/ML.EXE -------------------------------------------------------------------------------- /biosloader/bootsector/FAT32/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | @REM 14 | @REM This batch file builds the boot sector code for the Windows CE BIOS bootloader. 15 | @REM 16 | @REM It relies on a 16-bit assembler and linker. As well, it executes a debug.com 17 | @REM script at the end to extract the boot sector text area from the resultant 18 | @REM COM file. Since the boot sector code runs in a loader-less environment, the 19 | @REM better part of the COM file is of no use to us. 20 | @REM 21 | @REM ** NOTE: the debug.com script extracts just the text area of the boot sector 22 | @REM and doesn't include the BIOS parameter block (BPB) area. This is because 23 | @REM the BPB created by the format operation is used instead and an offset 24 | @REM (62d/0x3E) is applied to the boot sector code before it's written into 25 | @REM the boot sector. 26 | @REM 27 | @ECHO OFF 28 | 29 | ml /Zm /Flbsect.lst /c bsect.asm 30 | link bsect.obj,bsect.com,,,, 31 | debug bsect.com < getbsect.scr 32 | -------------------------------------------------------------------------------- /biosloader/bootsector/FAT32/getbsect.scr: -------------------------------------------------------------------------------- 1 | rcx 2 | 1A6 3 | rbx 4 | 0 5 | n bsect.img 6 | w fa5a 7 | q 8 | -------------------------------------------------------------------------------- /biosloader/bootsector/Images/exfat_bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/bootsector/Images/exfat_bsect.img -------------------------------------------------------------------------------- /biosloader/bootsector/Images/fat12_bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/bootsector/Images/fat12_bsect.img -------------------------------------------------------------------------------- /biosloader/bootsector/Images/fat16_bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/bootsector/Images/fat16_bsect.img -------------------------------------------------------------------------------- /biosloader/bootsector/Images/fat32_bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/bootsector/Images/fat32_bsect.img -------------------------------------------------------------------------------- /biosloader/bootsector/Images/readme.txt: -------------------------------------------------------------------------------- 1 | The boot sector goes in the first sector of the partition, or in the sector with the BPB for FAT volumes. 2 | The size of the image is dependent on the size of the BPB. FAT32 and exFAT have larger BPBs, and so the 3 | amount of code that can be written in the sector is smaller. -------------------------------------------------------------------------------- /biosloader/bootsector/exFAT/build.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | @REM 14 | @REM This batch file builds the boot sector code for the Windows CE BIOS bootloader. 15 | @REM 16 | @REM It relies on a 16-bit assembler and linker. As well, it executes a debug.com 17 | @REM script at the end to extract the boot sector text area from the resultant 18 | @REM COM file. Since the boot sector code runs in a loader-less environment, the 19 | @REM better part of the COM file is of no use to us. 20 | @REM 21 | @REM ** NOTE: the debug.com script extracts just the text area of the boot sector 22 | @REM and doesn't include the BIOS parameter block (BPB) area. This is because 23 | @REM the BPB created by the format operation is used instead and an offset 24 | @REM (62d/0x3E) is applied to the boot sector code before it's written into 25 | @REM the boot sector. 26 | @REM 27 | @ECHO OFF 28 | 29 | ml /Zm /Flbsect.lst /c bsect.asm 30 | link bsect.obj,bsect.com,,,, 31 | debug bsect.com < getbsect.scr 32 | -------------------------------------------------------------------------------- /biosloader/bootsector/exFAT/getbsect.scr: -------------------------------------------------------------------------------- 1 | rcx 2 | 188 3 | rbx 4 | 0 5 | n bsect.img 6 | w fa78 7 | q 8 | -------------------------------------------------------------------------------- /biosloader/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | DIRS= 14 | DIRS_CE= \ 15 | iniparser \ 16 | loader 17 | -------------------------------------------------------------------------------- /biosloader/diskimages/bootdisk.144: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/bootdisk.144 -------------------------------------------------------------------------------- /biosloader/diskimages/bootdisk/bldr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/bootdisk/bldr -------------------------------------------------------------------------------- /biosloader/diskimages/bootdisk/eboot.bix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/bootdisk/eboot.bix -------------------------------------------------------------------------------- /biosloader/diskimages/bootdisk/splash.bmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/bootdisk/splash.bmx -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk.144: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk.144 -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/autoexec.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | @ECHO OFF 14 | -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/bldr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk/bldr -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/bsect.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk/bsect.img -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/eboot.bix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk/eboot.bix -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/format.com: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk/format.com -------------------------------------------------------------------------------- /biosloader/diskimages/setupdisk/splash.bmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/diskimages/setupdisk/splash.bmx -------------------------------------------------------------------------------- /biosloader/iniparser/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/iniparser/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | 15 | TARGETNAME=iniparse 16 | TARGETTYPE=LIBRARY 17 | 18 | 19 | 20 | LDEFINES=$(LDEFINES) /FIXED:NO 21 | 22 | ERRORFORBANNEDAPIS= 23 | 24 | SOURCES= parser.c \ 25 | util.c 26 | -------------------------------------------------------------------------------- /biosloader/iniparser/util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | //------------------------------------------------------------------------------ 14 | // 15 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 16 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 18 | // PARTICULAR PURPOSE. 19 | // 20 | //------------------------------------------------------------------------------ 21 | 22 | #ifndef _UTIL_H 23 | #define _UTIL_H 24 | 25 | void StrNCpy(PUCHAR dest, PUCHAR src, ULONG length); 26 | ULONG ParseDec(PCHAR str, ULONG * pVal); 27 | ULONG ParseHex(PCHAR str, ULONG * pVal); 28 | ULONG ParseInteger(PCHAR str, ULONG * pVal); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT16/fixjmp.scr: -------------------------------------------------------------------------------- 1 | e 103 66 2 | 3 | w 4 | q 5 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT16/makebldr.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | romimage boot.bib 14 | del bldr 15 | copy %SG_OUTPUT_ROOT%\platform\%_TGTPLAT%\target\%_TGTCPU%\%WINCEDEBUG%\bldr.nb0 bldr 16 | debug bldr < fixjmp.scr 17 | copy bldr %_FLATRELEASEDIR%\bldr_fat16 18 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT16/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT32/fixjmp.scr: -------------------------------------------------------------------------------- 1 | e 103 66 2 | 3 | w 4 | q 5 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT32/makebldr.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | romimage boot.bib 14 | del bldr 15 | copy %SG_OUTPUT_ROOT%\platform\%_TGTPLAT%\target\%_TGTCPU%\%WINCEDEBUG%\bldr.nb0 bldr 16 | copy bldr bldr.org 17 | debug bldr < fixjmp.scr 18 | copy bldr %_FLATRELEASEDIR%\bldr_fat32 -------------------------------------------------------------------------------- /biosloader/loader/Fixed/FAT32/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/Main/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this source code is subject to the terms of the Microsoft 6 | premium shared source license agreement under which you licensed 7 | this source code. If you did not accept the terms of the license 8 | agreement, you are not authorized to use this source code. 9 | For the terms of the license, please see the license agreement 10 | signed by you and Microsoft. 11 | THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | dirs=Main\ 14 | FAT16 \ 15 | FAT32 \ 16 | exFAT 17 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/exFAT/fixjmp.scr: -------------------------------------------------------------------------------- 1 | e 103 66 2 | 3 | w 4 | q 5 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/exFAT/makebldr.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | romimage boot.bib 14 | del bldr 15 | copy %SG_OUTPUT_ROOT%\platform\%_TGTPLAT%\target\%_TGTCPU%\%WINCEDEBUG%\bldr.nb0 bldr 16 | debug bldr < fixjmp.scr 17 | copy bldr %_FLATRELEASEDIR%\bldr_exfat 18 | -------------------------------------------------------------------------------- /biosloader/loader/Fixed/exFAT/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/loader/Floppy/fixjmp.scr: -------------------------------------------------------------------------------- 1 | e 103 66 2 | 3 | w 4 | q 5 | -------------------------------------------------------------------------------- /biosloader/loader/Floppy/makebldr.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | romimage boot.bib 14 | del bldr 15 | copy %SG_OUTPUT_ROOT%\platform\%_TGTPLAT%\target\%_TGTCPU%\%WINCEDEBUG%\bldr.nb0 bldr 16 | debug bldr < fixjmp.scr 17 | copy bldr %_FLATRELEASEDIR%\bldr_floppy 18 | -------------------------------------------------------------------------------- /biosloader/loader/Floppy/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/loader/Images/bldr_exfat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/loader/Images/bldr_exfat -------------------------------------------------------------------------------- /biosloader/loader/Images/bldr_fat12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/loader/Images/bldr_fat12 -------------------------------------------------------------------------------- /biosloader/loader/Images/bldr_fat16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/loader/Images/bldr_fat16 -------------------------------------------------------------------------------- /biosloader/loader/Images/readme.txt: -------------------------------------------------------------------------------- 1 | The bldr_* file should be the first file copied onto a disk and should be copied as 'bldr'. 2 | Remove the file system specific extension before place the file on the disk. 3 | -------------------------------------------------------------------------------- /biosloader/loader/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this source code is subject to the terms of the Microsoft 6 | premium shared source license agreement under which you licensed 7 | this source code. If you did not accept the terms of the license 8 | agreement, you are not authorized to use this source code. 9 | For the terms of the license, please see the license agreement 10 | signed by you and Microsoft. 11 | THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | dirs=Fixed\ 14 | Floppy 15 | -------------------------------------------------------------------------------- /biosloader/utilities/DiskPart/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/utilities/DiskPart/mbr.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/biosloader/utilities/DiskPart/mbr.dat -------------------------------------------------------------------------------- /biosloader/utilities/DiskPart/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | WINCEOEM=1 14 | 15 | TARGETNAME=DiskPart 16 | TARGETTYPE=PROGRAM 17 | 18 | COMMON_CDEFINES= /DSTANDALONE 19 | EXEENTRY=WinMain 20 | 21 | SOURCES=DiskPart.cpp \ 22 | SimpleString.cpp 23 | 24 | TARGETLIBS=\ 25 | $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib 26 | -------------------------------------------------------------------------------- /biosloader/utilities/bincompress/bcio.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | //------------------------------------------------------------------------------ 14 | // 15 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 16 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 18 | // PARTICULAR PURPOSE. 19 | // 20 | //------------------------------------------------------------------------------ 21 | 22 | // 23 | // Defines constants used by bincompress. Include this file 24 | // in the BIOS loader decompression module to keep the constants in sync. 25 | // 26 | 27 | #ifndef _IO_H 28 | #define _IO_H 29 | 30 | int OpenForReading(PCHAR fileName, FILE ** ppFile, ULONG * pLength); 31 | int OpenForWriting(PCHAR fileName, FILE ** ppFile); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /biosloader/utilities/bincompress/bcxpress.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | //------------------------------------------------------------------------------ 14 | // 15 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 16 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 18 | // PARTICULAR PURPOSE. 19 | // 20 | //------------------------------------------------------------------------------ 21 | 22 | // 23 | // Defines constants used by bincompress. Include this file 24 | // in the BIOS loader decompression module to keep the constants in sync. 25 | // 26 | 27 | #ifndef _BCXPRESS_H 28 | #define _BCXPRESS_H 29 | 30 | // Public function prototypes 31 | int CeCompressEncodeFile(PCHAR inFileName, PCHAR outFileName); 32 | int CeCompressDecodeFile(PCHAR inFileName, PCHAR outFileName); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /biosloader/utilities/bincompress/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /biosloader/utilities/bincompress/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | _TGTOS=NT 15 | 16 | TARGETNAME=bincompress 17 | TARGETTYPE=PROGRAM 18 | RELEASETYPE=LOCAL 19 | 20 | TARGETLIBS=\ 21 | $(_WINCEROOT)\public\common\oak\lib\$(_CPUDEPPATH)\cecompress.lib 22 | 23 | INCLUDES=$(_COMMONOAKROOT)\inc; 24 | 25 | CDEFINES=$(CDEFINES) -DDEBUG 26 | 27 | SOURCES= bincompress.c \ 28 | bcio.c \ 29 | bcxpress.c 30 | -------------------------------------------------------------------------------- /biosloader/utilities/cesys/dos/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | !if 0 15 | To build this utility, type "nmake". 16 | !endif 17 | 18 | all: cesys.exe 19 | 20 | clean: 21 | del *.obj *.map *.exe *.com *.sbr 22 | 23 | cesys.exe: main.obj 24 | c:\msvc\bin\link main.obj ,cesys.exe,,c:\msvc\lib\oldnames.lib c:\msvc\lib\slibce.lib,, 25 | 26 | main.obj: main.c 27 | c:\msvc\bin\cl /c /Ic:\msvc\include main.c 28 | -------------------------------------------------------------------------------- /biosloader/utilities/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | DIRS=bincompress 14 | -------------------------------------------------------------------------------- /loadcepc/kernel.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include "windows.h" 14 | #include 15 | 16 | #define LOCKFLAG_WRITE 1 17 | 18 | #define int long 19 | 20 | #define ZONE_DEBUG 1 21 | 22 | #define DEBUGMSG(a, b) printf b 23 | 24 | int OEMParallelPortGetByte(void); 25 | VOID OEMParallelPortSendByte(BYTE chData); 26 | 27 | #define LockPages(a, b, c, d) 28 | #define UnlockPages(a, b) 29 | 30 | #define KUnicodeToAscii(a, b, c) strncpy(a, b, c) 31 | -------------------------------------------------------------------------------- /loadcepc/loadcepc.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #define TRUE 1 14 | #define FALSE 0 15 | 16 | typedef int BOOL; 17 | 18 | typedef unsigned char BYTE, *LPBYTE, UCHAR, *PUCHAR; 19 | typedef unsigned int USHORT, *PUSHORT; 20 | typedef unsigned long ULONG, *PULONG; 21 | 22 | typedef unsigned short WORD, *PWORD; 23 | typedef unsigned long DWORD, *PDWORD; 24 | 25 | typedef signed char INT8; 26 | typedef unsigned char UINT8; 27 | typedef signed short INT16; 28 | typedef unsigned short UINT16; 29 | typedef signed int INT32; 30 | typedef unsigned int UINT32; 31 | -------------------------------------------------------------------------------- /loadcepc/loadnkpc.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #define TRUE 1 14 | #define FALSE 0 15 | 16 | typedef int BOOL; 17 | 18 | typedef unsigned char UCHAR, *PUCHAR; 19 | typedef unsigned int USHORT, *PUSHORT; 20 | typedef unsigned long ULONG, *PULONG; 21 | 22 | typedef unsigned short WORD, *PWORD; 23 | typedef unsigned long DWORD, *PDWORD; 24 | -------------------------------------------------------------------------------- /loadcepc/pc.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | -------------------------------------------------------------------------------- /loadcepc/ppfs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | long rlseek(long fd, long off, long mode); 14 | long rwrite(long fd, char *buf, long cnt); 15 | long rread(long fd, char *buf, long cnt); 16 | long rclose(long fd); 17 | long ropen(WCHAR *name, long mode); 18 | 19 | long rRegOpen(DWORD hKey, CHAR *szName, LPDWORD lphKey); 20 | long rRegClose(DWORD hKey); 21 | long rRegGet(DWORD hKey, CHAR *szName, LPDWORD lpdwType, 22 | LPBYTE lpbData, LPDWORD lpdwSize); 23 | long rRegEnum(DWORD hKey, DWORD dwIndex, LPBYTE lpbData, LPDWORD lpdwSize); 24 | 25 | long rfindfirst(DWORD hFind, WCHAR *pattern, struct _finddata_t *fd); 26 | long rfindnext(DWORD hFind, struct _finddata_t *fd); 27 | -------------------------------------------------------------------------------- /loadcepc/setupenv.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM Copyright (c) Microsoft Corporation. All rights reserved. 3 | @REM 4 | @REM 5 | @REM Use of this sample source code is subject to the terms of the Microsoft 6 | @REM license agreement under which you licensed this sample source code. If 7 | @REM you did not accept the terms of the license agreement, you are not 8 | @REM authorized to use this sample source code. For the terms of the license, 9 | @REM please see the license agreement between you and Microsoft or, if applicable, 10 | @REM see the LICENSE.RTF on your install media or the root of your tools installation. 11 | @REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | @REM 13 | 14 | @echo off 15 | 16 | %comspec% /k setupen2.bat 17 | 18 | -------------------------------------------------------------------------------- /loadcepc/wdm.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | int __cdecl _inp(unsigned); 14 | int __cdecl _outp(unsigned, int); 15 | 16 | #pragma intrinsic(_inp, _outp) 17 | 18 | #define READ_PORT_UCHAR(a) _inp((unsigned)a) 19 | #define WRITE_PORT_UCHAR(a, b) _outp((unsigned)a, (int)b) 20 | -------------------------------------------------------------------------------- /loadcepc/windows.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | #include 15 | 16 | typedef struct _CRITICAL_SECTION 17 | { 18 | int iDummy; 19 | } CRITICAL_SECTION, *LPCRITICAL_SECTION; 20 | 21 | typedef unsigned long DWORD, *LPDWORD; 22 | typedef unsigned long BOOL; 23 | typedef char CHAR; 24 | typedef unsigned char BYTE, *LPBYTE, UCHAR, *PUCHAR; 25 | typedef unsigned short USHORT, *PUSHORT; 26 | 27 | #define FALSE 0 28 | #define TRUE 1 29 | 30 | #define TEXT 31 | #define VOID void 32 | #define WCHAR char 33 | #define TCHAR char 34 | #define PTCHAR char * 35 | 36 | #define strlenW strlen 37 | 38 | #define OutputDebugString printf 39 | #define NKDbgPrintfW printf 40 | 41 | #define EnterCriticalSection(a) 42 | #define LeaveCriticalSection(a) 43 | -------------------------------------------------------------------------------- /wecloader/bldr/console/bldr.bib: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) Microsoft Corporation. All rights reserved. 3 | ; 4 | ; 5 | ; Use of this sample source code is subject to the terms of the Microsoft 6 | ; license agreement under which you licensed this sample source code. If 7 | ; you did not accept the terms of the license agreement, you are not 8 | ; authorized to use this sample source code. For the terms of the license, 9 | ; please see the license agreement between you and Microsoft or, if applicable, 10 | ; see the LICENSE.RTF on your install media or the root of your tools installation. 11 | ; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | ; 13 | ;------------------------------------------------------------------------------- 14 | 15 | MEMORY 16 | 17 | ; Name Start Size Type 18 | ; ------- -------- -------- ---- 19 | BLDRC 00130000 00050000 RAMIMAGE 20 | RAM 00180000 0007EF00 RAM 21 | IVT 001FEF00 00000100 RESERVED ; See pIVT 22 | BOOTARGS 001FF000 00001000 RESERVED ; Boot arguments, see also BOOT_ARG_PTR_LOCATION, BOOT_ARG_LOCATION_NP, BOOT_ARG_PTR_LOCATION_NP 23 | 24 | 25 | CONFIG 26 | 27 | COMPRESSION=OFF 28 | PROFILE=OFF 29 | KERNELFIXUPS=ON 30 | 31 | 32 | MODULES 33 | 34 | ; Name Path Memory Flags 35 | ; -------- --------------------------------------------------------------------------------------- ------- ------ 36 | nk.exe $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bldrC.exe bldrC 37 | -------------------------------------------------------------------------------- /wecloader/bldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /wecloader/bldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | romimage $(ROMIMAGE_FLAGS) bldr.bib 16 | if exist $(_RELEASEDIR)\xldrC.nb0 copy /b $(_RELEASEDIR)\xldrC.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrC.bin $(_RELEASEDIR)\wceldrC 17 | !IF "$(WINCEREL)"=="1" 18 | del $(_FLATRELEASEDIR)\wceldrC 19 | if exist $(_RELEASEDIR)\wceldrC xcopy /Q /I $(_RELEASEDIR)\wceldrC $(_FLATRELEASEDIR) 20 | !ENDIF 21 | -------------------------------------------------------------------------------- /wecloader/bldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /wecloader/bldr/poweron.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include "bldr.h" 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | enum_t 18 | BootLoaderPowerOn( 19 | BootLoader_t * pLoader 20 | ) 21 | { 22 | UNREFERENCED_PARAMETER(pLoader); 23 | 24 | // Simply return next state now 25 | return BOOT_STATE_CONFIG; 26 | } 27 | 28 | //------------------------------------------------------------------------------ 29 | -------------------------------------------------------------------------------- /wecloader/bldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components of Windows CE. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /wecloader/bldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | romimage $(ROMIMAGE_FLAGS) bldr.bib 16 | if exist $(_RELEASEDIR)\xldrS.nb0 copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\..\xldr\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\wceldrS 17 | !IF "$(WINCEREL)"=="1" 18 | del $(_FLATRELEASEDIR)\wceldrS 19 | if exist $(_RELEASEDIR)\wceldrS xcopy /Q /I $(_RELEASEDIR)\wceldrS $(_FLATRELEASEDIR) 20 | !ENDIF 21 | -------------------------------------------------------------------------------- /wecloader/bldr/stub.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #include 14 | #include 15 | #include 16 | 17 | //------------------------------------------------------------------------------ 18 | 19 | LPVOID NKCreateStaticMapping(DWORD dwPhysBase, DWORD dwSize) 20 | { 21 | UNREFERENCED_PARAMETER(dwSize); 22 | return (LPVOID)dwPhysBase; 23 | } 24 | 25 | //------------------------------------------------------------------------------ 26 | 27 | UINT32 28 | OALPCICfgRead( 29 | UINT32 busId, 30 | OAL_PCI_LOCATION pciLoc, 31 | UINT32 offset, 32 | UINT32 size, 33 | __out_bcount(size) VOID *pData 34 | ) 35 | { 36 | BootPciLocation_t bootPciLoc; 37 | UNREFERENCED_PARAMETER(busId); 38 | bootPciLoc.logicalLoc = pciLoc.logicalLoc; 39 | return BootPciConfigRead(bootPciLoc, (uint8_t)offset, pData, size); 40 | } -------------------------------------------------------------------------------- /wecloader/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | bldr \ 16 | xldr 17 | -------------------------------------------------------------------------------- /wecloader/diskimages/cepcboot.144: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KunYi/WINCELOADER/8c517656dd7a84d89e2f0c71265031271e2069b6/wecloader/diskimages/cepcboot.144 -------------------------------------------------------------------------------- /wecloader/diskimages/readme.txt: -------------------------------------------------------------------------------- 1 | If your system does not execute .144 files, the necessary utility (makeimagebin.exe) for 2 | creating a CEPC boot disk is installed with Platform Builder. It can be found in your install 3 | root, typically C:\Program Files\Microsoft Platform Builder\7.00\cepb\utilities. -------------------------------------------------------------------------------- /wecloader/tools/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS=\ 15 | cesys{nt} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /wecloader/xldr/bldrcfg.nb0: -------------------------------------------------------------------------------- 1 | BLDRCFG 2 | -------------------------------------------------------------------------------- /wecloader/xldr/console/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /wecloader/xldr/console/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | romimage $(ROMIMAGE_FLAGS) xldr.bib 16 | if exist $(_RELEASEDIR)\bldrC.bin copy /b $(_RELEASEDIR)\xldrC.nb0 + ..\bldrCfg.nb0 + $(_RELEASEDIR)\bldrC.bin $(_RELEASEDIR)\wceldrC 17 | !IF "$(WINCEREL)"=="1" 18 | del $(_FLATRELEASEDIR)\wceldrC 19 | if exist $(_RELEASEDIR)\wceldrC xcopy /Q /I $(_RELEASEDIR)\wceldrC $(_FLATRELEASEDIR) 20 | !ENDIF 21 | 22 | -------------------------------------------------------------------------------- /wecloader/xldr/console/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=xldrC 15 | TARGETTYPE=PROGRAM 16 | EXEENTRY=StartUp 17 | 18 | 19 | POSTBUILDTARGETS=wceldr 20 | # ensure we don't run romimage the same time another project is running romimage 21 | POSTBUILD_CONSUMES=bldr_console 22 | POSTBUILD_PRODUCES=xldr_console 23 | 24 | LDEFINES=/DEBUG /DEBUGTYPE:CV /FIXED:NO 25 | 26 | SAFESEH= 27 | NOLIBC=1 28 | 29 | INCLUDES=$(INCLUDES);$(_PLATFORMROOT)\common\src\common\bldr\inc 30 | INCLUDES=$(INCLUDES);.. 31 | 32 | SOURCES= \ 33 | ..\startup.asm \ 34 | ..\bios.asm \ 35 | ..\fileSystem.c \ 36 | ..\xldr.c \ 37 | log.c \ 38 | 39 | TARGETLIBS= \ 40 | $(_PLATCOMMONLIB)\$(_CPUDEPPATH)\boot_log.lib \ 41 | $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\gsnull.lib \ 42 | $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fulllibc.lib 43 | 44 | -------------------------------------------------------------------------------- /wecloader/xldr/dirs: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | DIRS= \ 15 | console \ 16 | serial 17 | -------------------------------------------------------------------------------- /wecloader/xldr/serial/makefile: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | # 14 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 15 | # file to this component. This file merely indirects to the real make file 16 | # that is shared by all the components. 17 | # 18 | !INCLUDE $(_MAKEENVROOT)\makefile.def 19 | -------------------------------------------------------------------------------- /wecloader/xldr/serial/makefile.inc: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | wceldr: 15 | romimage $(ROMIMAGE_FLAGS) xldr.bib 16 | if exist $(_RELEASEDIR)\bldrS.bin copy /b $(_RELEASEDIR)\xldrS.nb0 + ..\bldrCfg.nb0 + $(_RELEASEDIR)\bldrS.bin $(_RELEASEDIR)\wceldrS 17 | !IF "$(WINCEREL)"=="1" 18 | del $(_FLATRELEASEDIR)\wceldrS 19 | if exist $(_RELEASEDIR)\wceldrS xcopy /Q /I $(_RELEASEDIR)\wceldrS $(_FLATRELEASEDIR) 20 | !ENDIF 21 | -------------------------------------------------------------------------------- /wecloader/xldr/serial/sources: -------------------------------------------------------------------------------- 1 | !if 0 2 | Copyright (c) Microsoft Corporation. All rights reserved. 3 | !endif 4 | !if 0 5 | Use of this sample source code is subject to the terms of the Microsoft 6 | license agreement under which you licensed this sample source code. If 7 | you did not accept the terms of the license agreement, you are not 8 | authorized to use this sample source code. For the terms of the license, 9 | please see the license agreement between you and Microsoft or, if applicable, 10 | see the LICENSE.RTF on your install media or the root of your tools installation. 11 | THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | !endif 13 | 14 | TARGETNAME=xldrS 15 | TARGETTYPE=PROGRAM 16 | EXEENTRY=StartUp 17 | 18 | 19 | 20 | POSTBUILDTARGETS=wceldr 21 | # ensure we don't run romimage the same time another project is running romimage 22 | POSTBUILD_CONSUMES=xldr_console 23 | POSTBUILD_PRODUCES=xldr_serial 24 | 25 | LDEFINES=/DEBUG /DEBUGTYPE:CV /FIXED:NO 26 | 27 | SAFESEH= 28 | NOLIBC=1 29 | 30 | INCLUDES=$(INCLUDES);$(_PLATFORMROOT)\common\src\common\bldr\inc 31 | INCLUDES=$(INCLUDES);.. 32 | 33 | SOURCES= \ 34 | log.c \ 35 | ..\startup.asm \ 36 | ..\bios.asm \ 37 | ..\fileSystem.c \ 38 | ..\xldr.c 39 | 40 | TARGETLIBS= \ 41 | $(_PLATCOMMONLIB)\$(_CPUDEPPATH)\boot_log.lib \ 42 | $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\gsnull.lib \ 43 | $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fulllibc.lib 44 | 45 | -------------------------------------------------------------------------------- /wecloader/xldr/xldr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | // 4 | // 5 | // Use of this sample source code is subject to the terms of the Microsoft 6 | // license agreement under which you licensed this sample source code. If 7 | // you did not accept the terms of the license agreement, you are not 8 | // authorized to use this sample source code. For the terms of the license, 9 | // please see the license agreement between you and Microsoft or, if applicable, 10 | // see the LICENSE.RTF on your install media or the root of your tools installation. 11 | // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 12 | // 13 | #ifndef __XLDR_H 14 | #define __XLDR_H 15 | 16 | #include 17 | 18 | //------------------------------------------------------------------------------ 19 | 20 | #define VERSION_MAJOR 1 21 | #define VERSION_MINOR 0 22 | 23 | //------------------------------------------------------------------------------ 24 | 25 | #define IMAGE_XLDR_BOOTSEC_PA 0xFA00 26 | #define IMAGE_XLDR_BUFFER_PA 0xFC00 27 | 28 | //------------------------------------------------------------------------------ 29 | 30 | handle_t 31 | FileSystemInit( 32 | ); 33 | 34 | bool_t 35 | FileSystemRead( 36 | handle_t hFileSystem, 37 | void *pBuffer, 38 | size_t size 39 | ); 40 | 41 | void 42 | FileSystemDeinit( 43 | handle_t hFileSystem 44 | ); 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | #endif 49 | --------------------------------------------------------------------------------