Hello Again Today I needed a TPM (Trusted Platform Module) and my Computer don’t have any Hardware TPM to work with, So thought of working with good old Software TPM, I already have experience with TPM Emulator on Linux System but never thought of compiling one for windows.
1. Installation was pretty straight forward. I download the latest TPM emulator (the one provided by BerliOS) from there website
and I used there documentation as a guide.
2. Next I downloaded and Install cmake for windows
3. Then Download and I installed MinGW for windows, This took a while thanx to the Awesome Speed of PTCL Broad band.
4. Then I download GNU MP Libraries for windows, and extracted it to MinGW folder. (.h in include folder and .a and others in lib folders)
5. Now extract the TPM Emulator source to your desired folder
6. Run CMD as Administrator (Running it as Administrator is Necessary or else the Service wont start)
7. Now Go to the Source folder and the the Script build.bat, It take few seconds to Compile.
8. After compilation copy the script control_tpmd.bat from ./tpmd/windows/ to ./build/tpmd/windows/
9. Now to install the Service, Run the Script
and you will get the output
tpm_emulator-0.7.4\build\tpmd\windows>control_tpmd.bat install [SC] CreateService SUCCESS
10. To Start TPM Emulator, Run the Script
and you will get the output similar to the one below
SERVICE_NAME: tpmd TYPE : 10 WIN32_OWN_PROCESS STATE : 2 START_PENDING (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x7d0 PID : 5900 FLAGS :
11. Now you can check its progress by running command
and again you might get a similar out as below.
SERVICE_NAME: tpmd TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0
12. I am uploading my binaries (the complete build folder) to my google drive in case you don’t want to go to all this trouble to run it on windows, plus I dont know whether binaries compiled on my System would work on yours but good luck.
I hope this works for you, If you have any questions please go ahead and leave them in comment section and I will be glad to answer them.