[etc] Added some of the files needed in order to support LongHorn.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 23 Sep 2007 09:51:16 +0000 (09:51 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 23 Sep 2007 09:51:16 +0000 (09:51 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@828 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/ib_bus.cdf [new file with mode: 0644]
core/bus/kernel/ib_bus.inf
hw/mthca/kernel/mthca.cdf [new file with mode: 0644]
hw/mthca/kernel/mthca.inf
tools/coinstaller/user/IbInstaller.cpp
tools/wsdinstall/user/installsp.exe.manifest [new file with mode: 0644]
ulp/ipoib/kernel/ipoib.cdf [new file with mode: 0644]
ulp/ipoib/kernel/netipoib.inf

diff --git a/core/bus/kernel/ib_bus.cdf b/core/bus/kernel/ib_bus.cdf
new file mode 100644 (file)
index 0000000..ac428f1
--- /dev/null
@@ -0,0 +1,18 @@
+[CatalogHeader]\r
+Name=ib_bus.cat\r
+PublicVersion=0x0000001\r
+EncodingType=0x00010001\r
+CATATTR1=0x10010001:OSAttr:2:6.0\r
+[CatalogFiles]\r
+<hash>ib_bus.inf=ib_bus.inf\r
+<hash>ibbus.sys=ibbus.sys\r
+<hash>ibiou.sys=ibiou.sys\r
+<hash>ibal.dll=ibal.dll\r
+<hash>complib.dll=complib.dll\r
+<hash>ibald.dll=ibald.dll\r
+<hash>complibd.dll=complibd.dll\r
+<hash>cl32d.dll=cl32d.dll\r
+<hash>cl32.dll=cl32.dll\r
+<hash>ibal32d.dll=ibal32d.dll\r
+<hash>ibal32.dll=ibal32.dll\r
+\r
index c3ae6c3..ec50360 100644 (file)
@@ -8,7 +8,7 @@ Class=System
 ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}\r
 Provider=%OPENIB%\r
 DriverVer=03/08/2006,1.0.0000.614\r
-\r
+CatalogFile=ib_bus.cat\r
 \r
 ; ================= Device Install section =====================\r
 \r
diff --git a/hw/mthca/kernel/mthca.cdf b/hw/mthca/kernel/mthca.cdf
new file mode 100644 (file)
index 0000000..af10df1
--- /dev/null
@@ -0,0 +1,14 @@
+[CatalogHeader]\r
+Name=mthca.cat\r
+PublicVersion=0x0000001\r
+EncodingType=0x00010001\r
+CATATTR1=0x10010001:OSAttr:2:6.0\r
+[CatalogFiles]\r
+<hash>mthca.inf=mthca.inf\r
+<hash>mthca.sys=mthca.sys\r
+<hash>mthcau.dll=mthcau.dll\r
+<hash>mthcaud.dll=mthcaud.dll\r
+<hash>mthca32.dll=mthca32.dll\r
+<hash>mthca32d.dll=mthca32d.dll\r
+<hash>IbInstaller.dll=IbInstaller.dll\r
+\r
index f995a48..a553ba2 100644 (file)
@@ -8,6 +8,7 @@ ClassGUID={58517E00-D3CF-40c9-A679-CEE5752F4491}
 Provider=%OPENIB%\r
 ; must be synchronized with MTHCA_DEV.H\r
 DriverVer=03/08/2006,1.0.0000.614\r
+CatalogFile=mthca.cat\r
 \r
 ; ================= Destination directory section =====================\r
 \r
index 5ee73e3..7844bdc 100644 (file)
@@ -135,6 +135,7 @@ DWORD SelectDriver(
        DWORD   i;\r
        BOOL    bSuccess;\r
        \r
+       OutputDebugString( L"SelectDriver" );\r
 \r
        // Get a list of drivers.\r
        bSuccess =\r
@@ -182,7 +183,7 @@ DWORD SelectDriver(
 \r
 DWORD\r
 CreateIbBusRoot(\r
-       IN                              PCTSTR                                          driverPath )\r
+       IN                              PTSTR                                           driverPath )\r
 {\r
        HDEVINFO                                hDevList;\r
        BOOL                                    bSuccess;\r
@@ -190,7 +191,8 @@ CreateIbBusRoot(
        SP_DRVINFO_DATA                 drvInfo;\r
        LONG                                    status;\r
        SP_DEVINSTALL_PARAMS    installParams;\r
-\r
+       size_t                                  nEnd;\r
+       DWORD gle = 0;\r
 \r
        memset( &devInfo, 0, sizeof(SP_DEVINFO_DATA) );\r
        devInfo.cbSize = sizeof(SP_DEVINFO_DATA);\r
@@ -201,8 +203,9 @@ CreateIbBusRoot(
        hDevList = SetupDiCreateDeviceInfoList( &GUID_CLASS_SYSTEM, NULL );\r
        if( hDevList == INVALID_HANDLE_VALUE )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]Failed to create dev info list.\n") );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Create the device.\r
@@ -211,9 +214,10 @@ CreateIbBusRoot(
                NULL, DICD_GENERATE_ID, &devInfo );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiCreateDeviceInfo failed.\n") );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Setup the HW ID for the device.\r
@@ -221,24 +225,79 @@ CreateIbBusRoot(
                SPDRP_HARDWAREID, (BYTE*)GUID_IB_BUS_HW_ID, sizeof(GUID_IB_BUS_HW_ID) );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString(\r
                        TEXT("[IbInstaller]SetupDiSetDeviceRegistryProperty failed.\n") );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Setup the install path.\r
        ZeroMemory( &installParams, sizeof(installParams) );\r
        installParams.cbSize = sizeof(installParams);\r
+\r
+\r
+       OSVERSIONINFO osvi;\r
+       osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);\r
+       bSuccess = GetVersionEx (&osvi);\r
+       if( !bSuccess )\r
+       {\r
+               gle = GetLastError();\r
+               OutputDebugString(\r
+                       TEXT("[IbInstaller]GetVersionEx failed.\n") );\r
+               SetupDiDestroyDeviceInfoList( hDevList );\r
+               return gle;\r
+       }\r
+\r
+       // for LH we want to find the correct path\r
+       if (osvi.dwMajorVersion > 5) \r
+       {\r
+               WIN32_FIND_DATA FindFileData;\r
+               HANDLE hFind;\r
+\r
+               // Strip the file name from the path.\r
+               nEnd = _tcslen( driverPath );\r
+               while( driverPath[nEnd] != '\\' ) {\r
+                       nEnd--;\r
+               }\r
+               driverPath[nEnd] = _T('\0');\r
+               _tcsncat(driverPath,TEXT("\\ib_bus.inf_*"), MAX_PATH);\r
+\r
+               hFind = FindFirstFile(driverPath, &FindFileData);\r
+               if (hFind == INVALID_HANDLE_VALUE) \r
+               {\r
+                       printf ("Invalid File Handle. GetLastError reports %d\n", GetLastError ());\r
+                       return ERROR_FILE_NOT_FOUND;\r
+               } \r
+               else \r
+               {\r
+                       printf ("The first file found is %s\n", FindFileData.cFileName);\r
+\r
+                       // Strip the file name from the path.\r
+                       nEnd = _tcslen( driverPath );\r
+                       while( driverPath[nEnd] != '\\' ) {\r
+                               nEnd--;\r
+                       }\r
+                       driverPath[nEnd+1] = _T('\0');            \r
+\r
        _tcsncpy( installParams.DriverPath, driverPath, MAX_PATH );\r
+                       _tcsncat(installParams.DriverPath, FindFileData.cFileName, MAX_PATH);\r
+                       FindClose(hFind);\r
+               }\r
+\r
+       } else {\r
+                       _tcsncpy( installParams.DriverPath, driverPath, MAX_PATH );\r
+       }\r
+\r
 \r
        bSuccess =\r
                SetupDiSetDeviceInstallParams( hDevList, &devInfo, &installParams );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiSetDeviceInstallParams failed.\n") );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        status = SelectDriver( hDevList, &devInfo, &drvInfo );\r
@@ -254,20 +313,22 @@ CreateIbBusRoot(
        bSuccess = SetupDiSetSelectedDevice( hDevList, &devInfo );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiSetSelectedDevice failed.\n") );\r
                SetupDiDestroyDriverInfoList( hDevList, &devInfo, SPDIT_CLASSDRIVER );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Select the driver.\r
        bSuccess = SetupDiSetSelectedDriver( hDevList, &devInfo, &drvInfo );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiSetSelectedDriver failed.\n") );\r
                SetupDiDestroyDriverInfoList( hDevList, &devInfo, SPDIT_CLASSDRIVER );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Register the device (since it is non-PnP).\r
@@ -275,20 +336,22 @@ CreateIbBusRoot(
                NULL, NULL, NULL );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiRegisterDeviceInfo failed.\n") );\r
                SetupDiDestroyDriverInfoList( hDevList, &devInfo, SPDIT_CLASSDRIVER );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        // Install the device (copies the files and starts it).\r
        bSuccess = SetupDiInstallDevice( hDevList, &devInfo );\r
        if( !bSuccess )\r
        {\r
+               gle = GetLastError();\r
                OutputDebugString( TEXT("[IbInstaller]SetupDiInstallDevice failed.\n") );\r
                SetupDiDestroyDriverInfoList( hDevList, &devInfo, SPDIT_CLASSDRIVER );\r
                SetupDiDestroyDeviceInfoList( hDevList );\r
-               return GetLastError();\r
+               return gle;\r
        }\r
 \r
        return ERROR_SUCCESS;\r
@@ -305,6 +368,8 @@ IbFileCallback(
        TCHAR           *pPath;\r
        FILEPATHS       *pFileInfo;\r
 \r
+       OutputDebugString( L"IbFileCallback" );\r
+\r
        UNREFERENCED_PARAMETER( Param2 );\r
 \r
        if( Notification != SPFILENOTIFY_QUEUESCAN_EX )\r
@@ -339,6 +404,9 @@ IbCoInstaller(
 \r
        UNREFERENCED_PARAMETER( Context );\r
 \r
+       swprintf( debug_buf ,L"IbCoInstaller called DI_FUNCTION =%d\n", InstallFunction);\r
+       OutputDebugString( debug_buf );\r
+\r
        // The file queue is valid on the DIF_INSTALLDEVICE, so trap that\r
        // code and extract the install path.\r
        if( InstallFunction != DIF_INSTALLDEVICE )\r
diff --git a/tools/wsdinstall/user/installsp.exe.manifest b/tools/wsdinstall/user/installsp.exe.manifest
new file mode 100644 (file)
index 0000000..d5e574e
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\r
+    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">\r
+        <security>\r
+            <requestedPrivileges>\r
+                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>\r
+            </requestedPrivileges>\r
+        </security>\r
+    </trustInfo>\r
+</assembly>   
\ No newline at end of file
diff --git a/ulp/ipoib/kernel/ipoib.cdf b/ulp/ipoib/kernel/ipoib.cdf
new file mode 100644 (file)
index 0000000..5253af1
--- /dev/null
@@ -0,0 +1,12 @@
+[CatalogHeader]\r
+Name=ipoib.cat\r
+PublicVersion=0x0000001\r
+EncodingType=0x00010001\r
+CATATTR1=0x10010001:OSAttr:2:6.0\r
+[CatalogFiles]\r
+<hash>netipoib.inf=netipoib.inf\r
+<hash>ipoib.sys=ipoib.sys\r
+<hash>ibwsd.dll=ibwsd.dll\r
+<hash>ibwsd32.dll=ibwsd32.dll\r
+\r
+\r
index 4b2b800..d8fd04b 100644 (file)
@@ -8,6 +8,7 @@ Class       = Net
 ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}\r
 Provider    = %OPENIB%\r
 DriverVer=03/08/2006,1.0.0000.614\r
+CatalogFile=ipoib.cat\r
 \r
 [Manufacturer]\r
 %OPENIB%       = OPENIB,ntx86,ntamd64,ntia64\r