Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
4.7 KiB

  1. Section 1: Creating a bootable disk image file
  2. Section 2: Updating hives etc. from a recent 32-bit build
  3. Section 1: Creating a bootable disk image file
  4. SIMICS boots NT from a disk image file. This file is called amd64.hdd by
  5. convention. The steps necessary to create this file are as follows:
  6. 0) Enlist in the private AMD64 branch for base\hals, base\boot and
  7. sdktools\debuggers
  8. 1) Create a partition on an IDE drive
  9. 2) Install the debug serial port
  10. 3) Create custom newfiles.cmd
  11. 4) Build the disk image
  12. 5) Boot
  13. Step 0: Enlist in the private AMD64 branch for base\hals, base\boot and
  14. sdktools\debuggers.
  15. From the <sdxroot>\base directory, modify your client view by running "sd
  16. client". Your client view should consist of the first line below. Add the
  17. two additional lines, replacing <clientroot> with whatever already appears
  18. on your client for <clientroot> in the first line.
  19. //depot/Lab01_N/base/... //<clientroot>/...
  20. //depot/private/amd64/boot/... //<clientroot>/boot/...
  21. //depot/private/amd64/hals/... //<clientroot>/hals/...
  22. Then run "sd sync -f ..." in base\boot and base\hals, this should copy down
  23. the files from the private branch.
  24. Step 1: Create a partition on an IDE drive.
  25. - Choose an empty IDE drive on your simulator machine. Note the disk
  26. number. These steps assume that this is drive 1.
  27. - Via Disk Manager, remove all partitions on the drive.
  28. - Run mbr.exe found in this directory, supplying the disk number, as in:
  29. MBR 1.
  30. - Again via Disk Manager, create a single, basic, primary partition on this
  31. drive that is relatively small... right now, 3GB is a good size. Either
  32. FAT32 or NTFS should work, I use NTFS.
  33. - Mark the partition "active"
  34. Do not partition the remainder of the drive, otherwise the partition table
  35. included in the image file will refer to partitions that do not exist and
  36. the OS will be confused.
  37. Step 2: Install serial port
  38. Use a standard kernel-debugger serial port to connect between com1 on
  39. the simics machine to a host machine running a kernel debugger. Set the
  40. host side to 19200 baud.
  41. Step 3: Create custom newfiles.cmd
  42. Copy newfiles.cmd from <SDXROOT>\enduser\stuff\simics to the root of the
  43. newly created partition and appropriately modify the commented environment
  44. variables therein.
  45. Note that the main binary source (%SOURCE_1%) should be a UNC path to
  46. _NTTREE on your amd64 build machine.
  47. Step 4: Build the disk image
  48. Change the current drive to the AMD64 image and run newfiles.cmd with no
  49. arguments. This will copy the necessary files over and build the amd64.hdd
  50. boot image. NOTE: The build process must have completed successfully,
  51. including all of postbuild.
  52. Step 5: Boot
  53. First, start kd on the host side.
  54. Next, from a sygwin command window in the x86-test-machine directory,
  55. execute "simics.bat -x amd64-serial.simics". This will launch the
  56. simulator and boot process.
  57. If all goes well, the system will begin booting and you will see the
  58. standard sign-on messages on the kernel debugger. If any breakpoints are
  59. encountered on the simics console, just continue with the "run" command.
  60. To attempt to boot a new set of binaries, repeat steps 4 and 5. Supplying
  61. an argument to newfiles.cmd will cause only that file to be updated
  62. before generating a new image, usefull if for example you've built a new
  63. kernel and want to boot with that.
  64. Section 2: Updating hives etc. from a recent 32-bit build
  65. *NOTE*: The steps in this section are not a part of the normal image
  66. building process. I (forrestf) expect to be the only one performing
  67. these steps periodically. The steps are included here in case I get hit
  68. by a bus.
  69. The install tree is "hand-assembled" via the process described in section
  70. 1. Some of the files that are not built during the build process, e.g.
  71. registry hives, user profiles etc. must be copied from a parallel 32-bit
  72. installation, ideally from a recent build.
  73. These files are checked in to the stuff\simics tree but should be refreshed
  74. periodically so that the hives contain the expected layout.
  75. The 32-bit template machine must be set up like this:
  76. 1. A "safe" build must be installed on a disk other than C:
  77. 2. The "recent" build must be installed in C:\WINDOWS and have the
  78. following characteristics:
  79. 2a. Running in a workgroup, not a domain
  80. 2b. Two users. I use "Admin" and "Admin2" with no password.
  81. 2c. Screen resolution set to 640x480.
  82. To refresh the binaries, run refresh.cmd, supplying the UNC path to
  83. the C: root of the template, 32-bit installation. e.g.
  84. refresh \\bootsim\c$
  85. Remember to "sd submit ..." when it is finished.