rem\r
rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files.\r
rem Binary release is constructed in ..\Branches\WinOF\Wix\bin.\r
-rem Processor architecture specific WIX installers are constructed in %IDIR%\r
+rem Processor architecture specific WIX installers are constructed\r
+rem in %IDIR%\r
rem\r
-rem This script is an 'example' of a one-command entire IB stack build to single-file installer.\r
-rem Script is designed to be invoked from the ...\gen1\trunk folder with ..\branches\WinOF\Wix\*\r
-rem accessible.\r
+rem BuildRelease {compile | msi}\r
+rem\r
+rem This script is an 'example' of a one-command entire IB stack build to\r
+rem single-file installer.\r
+rem Script is designed to be invoked from the ...\gen1\trunk folder with\r
+rem ..\branches\WinOF\Wix\* accessible.\r
rem\r
rem Verify the following env vars are suitible for your system configuration.\r
rem _DDK, _PSDK, SVN, IDIR\r
\r
-if EXIST C:\WINDDK\3790~1.183 set _DDK=C:\WINDDK\3790~1.183\r
+if "%1" == "" goto OK\r
+if "%1" == "compile" goto OK\r
+if "%1" == "msi" goto OK\r
+echo Unknown arg '%1' ?\r
+echo "usage: BuildRelease {compile | msi}"\r
+exit /B 1 \r
\r
-if EXIST C:\WinDDK\6001.18001 set _DDK=C:\WinDDK\6001.18001\r
+:OK\r
\r
-if %_DDK% == "" (\r
- echo Missing DDK -or- WDK ???\r
- exit /B 1\r
+set _DDK=C:\WinDDK\6001.18001\r
\r
+if NOT EXIST %_DDK% (\r
+ echo Missing WDK @ %_DDK%\r
+ exit /B 1\r
)\r
echo Building with DDK @ %_DDK%\r
\r
-rem Platform SDK path\r
-set _PSDK=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\r
+rem Platform SDK path - watchout for missing LoadPerf.h (installsp.c)\r
+set _PSDK=C:\progra~1\mi2578~1\r
\r
rem WARNING - SVN set depends on the path '\openIB-windows-svn\xxx\gen1', where SVN is set to XXX\r
rem substring[23rd...26th] chars (offset counting) == xxxx\r
set SVN=%CD:~22,4%\r
\r
rem assumes %CD% == '...\gen1\trunk'\r
-\r
set BSE=%CD%\r
-set RBIN=%BSE%\r
-set RBIN=%RBIN:trunk=Branches\WinOF\Wix\bin%\r
+set WIX=%CD:trunk=Branches\WinOF\WIX%\r
+\r
+set RBIN_WLH=%CD:trunk=Branches\WinOF\Wix\wlh\bin%\r
+set RBIN_WNET=%CD:trunk=Branches\WinOF\Wix\wnet\bin%\r
+set RBIN_WXP=%CD:trunk=Branches\WinOF\Wix\wxp\bin%\r
\r
-if NOT EXIST "..\branches\WinOF\WIX\build-MSI.bat" (\r
+if NOT EXIST "..\branches\WinOF\WIX\build-all-MSI.bat" (\r
echo Missing .msi installer build script\r
- echo ..\branches\WinOF\WIX\build-MSI.bat\r
+ echo ..\branches\WinOF\WIX\build-all-MSI.bat\r
exit /B 1\r
)\r
\r
rem WIX Installer files (.msi) destination folder - set for local environment.\r
rem \r
-rem set IDIR=D:\temp\r
-set IDIR=C:\Windows\Temp\r
+set IDIR=%SystemRoot%\temp\r
\r
echo Building for OPENIB_REV %SVN%, installer files @ %IDIR%\r
+\r
+rem XXX cmd not available on XP//32, what to do?\r
timeout /T 5\r
\r
if NOT EXIST "%IDIR%" (\r
exit /B 1\r
)\r
\r
-set OPS=-wgcM 3\r
-rem set OPS=-wgM 3\r
+rem skip build - assumes binaries already built.\r
+\r
+if "%1" == "msi" goto InstallBin\r
+if "%1" == "installonly" goto InstallBin\r
+\r
+rem set OPS=-wgcM 3\r
+set OPS=-wg\r
+\r
+\r
+rem ********* WLH - Windows Server 2008 & Vista\r
\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+rem WLH x64\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+rem WLH x86\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+rem WLH ia64\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% '%_PSDK%' & build %OPS%"\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
if ERRORLEVEL 1 exit /B 1\r
\r
-rem :InstallBin\r
-echo Create binary release tree - suitible for WinOF-WIX installer build.\r
\r
-if EXIST "%RBIN%" (\r
- rmdir /S /Q %RBIN%\r
+rem ********* WXP - Windows XP - x86 only\r
+\r
+rem Fix XP WSD/installsp.exe build problems\r
+\r
+if exist .\ulp\wsd\dirs rename .\ulp\wsd\dirs Xdirs\r
+if exist .\tools\wsdinstall\dirs rename .\tools\wsdinstall\dirs Xdirs\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+\r
+rem restore WSD/installsp builds\r
+if exist .\ulp\wsd\Xdirs rename .\ulp\wsd\Xdirs dirs \r
+if exist .\tools\wsdinstall\Xdirs rename .\tools\wsdinstall\Xdirs dirs\r
+\r
+\r
+\r
+rem ********* WNET - Windows Server 2003\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+\r
+%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
+if ERRORLEVEL 1 exit /B 1\r
+\r
+\r
+if "%1" == "compile" (\r
+ echo ****** compile ONLY - done.\r
+ exit /B 0\r
)\r
-mkdir %RBIN%\r
+\r
+rem Install binaries into WIX environment, build msi installers.\r
+\r
+:InstallBin\r
+echo Create binary release tree - suitible for WinOF-WIX installer build.\r
+\r
+if EXIST "%RBIN_WLH%" rmdir /S /Q %RBIN_WLH%\r
+if EXIST "%RBIN_WNET%" rmdir /S /Q %RBIN_WNET%\r
+if EXIST "%RBIN_WXP%" rmdir /S /Q %RBIN_WXP%\r
+\r
+mkdir %RBIN_WLH%\r
+mkdir %RBIN_WNET%\r
+mkdir %RBIN_WXP%\r
\r
if EXIST "%BSE%\etc\makebin.bat" (\r
- call %BSE%\etc\makebin.bat %BSE% %RBIN%\r
+ call %BSE%\etc\makebin.bat %BSE% %RBIN_WLH% wlh\r
+ call %BSE%\etc\makebin.bat %BSE% %RBIN_WNET% wnet\r
+ call %BSE%\etc\makebin.bat %BSE% %RBIN_WXP% wxp\r
)\r
\r
-echo %0 - Binary release built in %RBIN%\r
+echo %0 - Binary release built in\r
+echo %RBIN_WLH%\r
+echo %RBIN_WNET%\r
+echo %RBIN_WXP%\r
\r
-rem build WIX installers --> in ..\branches\WinOF\WIX\r
+rem build WIX installers --> see ..\branches\WinOF\WIX\r
\r
-%COMSPEC% /C "%_DDK%\bin\setenv.bat %_DDK% fre AMD64 WNET & cd /D %RBIN%\.. & build-MSI %IDIR%" \r
+%COMSPEC% /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-ALL-MSI %IDIR%" \r
\r
endlocal\r
@echo on\r
@echo off\r
setlocal\r
\r
-echo %1 %2\r
+rem usage: makebin src dst [wlh,wnet,wxp]\r
+rem\r
+rem src - ...\gen1\trunk\r
+rem dst - full path where \bin is created.\r
+rem OS - which windows version\r
\r
-if "%1"=="" goto usage\r
+echo %1 %2 %3\r
\r
+if "%1"=="" goto usage\r
if "%2"=="" goto usage\r
\r
+if "%3"=="" goto usage\r
+if /I "%3"=="wlh" goto os_ok\r
+if /I "%3"=="wnet" goto os_ok\r
+if /I "%3"=="wxp" goto os_ok\r
+echo Invalid OS type '%3' ?\r
+exit /B 1\r
+\r
+:os_ok\r
+\r
+if not "%4"=="" set DBG=TRUE\r
+\r
+set OS=%3\r
+set WdfCoInstaller=%systemdrive%\WinDDK\6001.18001\redist\wdf\r
+\r
if not exist %1 goto usage\r
if not exist %2 goto usage\r
\r
-if not exist %1\bin\kernel\objfre_wnet_amd64\amd64 goto error1\r
-if not exist %1\bin\kernel\objfre_wnet_ia64\ia64 goto error2\r
-if not exist %1\bin\kernel\objfre_wnet_x86\i386 goto error3\r
-if not exist %1\bin\user\objfre_wnet_amd64\amd64 goto error4\r
-if not exist %1\bin\user\objfre_wnet_ia64\ia64 goto error5\r
-if not exist %1\bin\user\objfre_wnet_x86\i386 goto error6\r
-if not exist %1\bin\user\objchk_wnet_amd64\amd64 goto error7\r
-if not exist %1\bin\user\objchk_wnet_ia64\ia64 goto error8\r
-if not exist %1\bin\user\objchk_wnet_x86\i386 goto error9\r
-\r
-setlocal\r
+if /I "%OS%" == "wxp" (\r
+ if not exist %1\bin\kernel\objfre_%OS%_x86\i386 goto error3\r
+ if not exist %1\bin\user\objfre_%OS%_x86\i386 goto error6\r
+ if not exist %1\bin\user\objchk_%OS%_x86\i386 goto error9\r
+) else (\r
+ if not exist %1\bin\kernel\objfre_%OS%_amd64\amd64 goto error1\r
+ if not exist %1\bin\kernel\objfre_%OS%_ia64\ia64 goto error2\r
+ if not exist %1\bin\kernel\objfre_%OS%_x86\i386 goto error3\r
+ if not exist %1\bin\user\objfre_%OS%_amd64\amd64 goto error4\r
+ if not exist %1\bin\user\objfre_%OS%_ia64\ia64 goto error5\r
+ if not exist %1\bin\user\objfre_%OS%_x86\i386 goto error6\r
+ if not exist %1\bin\user\objchk_%OS%_amd64\amd64 goto error7\r
+ if not exist %1\bin\user\objchk_%OS%_ia64\ia64 goto error8\r
+ if not exist %1\bin\user\objchk_%OS%_x86\i386 goto error9\r
+)\r
\r
rem\r
rem KERNEL MODE\r
rem\r
\r
+if /I "%OS%" == "wxp" goto wxp_drv\r
+\r
rem Copy AMD64 drivers\r
-set bin_dir=%1\bin\kernel\objfre_wnet_amd64\amd64\r
+set bin_dir=%1\bin\kernel\objfre_%OS%_amd64\amd64\r
set dest_dir=%2\HCA\amd64\\r
-for %%i in (%bin_dir%\ibbus.sys, %bin_dir%\ibiou.sys, %bin_dir%\mthca.sys) do xcopy %%i %dest_dir% /y\r
+\r
+if "%DBG%" == "TRUE" echo DBG: AMD64 free drivers to %dest_dir%\r
+\r
+for %%i in (%bin_dir%\ibbus.sys, %bin_dir%\ibiou.sys, %bin_dir%\mthca.sys,%bin_dir%\mlx4_hca.sys, %bin_dir%\mlx4_bus.sys) do xcopy %%i %dest_dir% /y\r
+\r
+xcopy %WdfCoInstaller%\amd64\WdfCoInstaller01005.dll %dest_dir% /y\r
xcopy %bin_dir%\ipoib.sys %2\net\amd64\ /y\r
xcopy %bin_dir%\qlgcvnic.sys %2\net\amd64\ /y\r
xcopy %bin_dir%\ibsrp.sys %2\storage\amd64\ /y\r
\r
rem Copy IA64 drivers\r
-set bin_dir=%1\bin\kernel\objfre_wnet_ia64\ia64\r
+set bin_dir=%1\bin\kernel\objfre_%OS%_ia64\ia64\r
set dest_dir=%2\HCA\ia64\\r
+\r
+if "%DBG%" == "TRUE" echo DBG: ia64 free drivers to %dest_dir%\r
+\r
for %%i in (%bin_dir%\ibbus.sys, %bin_dir%\ibiou.sys, %bin_dir%\mthca.sys) do xcopy %%i %dest_dir% /y\r
+\r
xcopy %bin_dir%\ipoib.sys %2\net\ia64\ /y\r
xcopy %bin_dir%\qlgcvnic.sys %2\net\ia64\ /y\r
xcopy %bin_dir%\ibsrp.sys %2\storage\ia64\ /y\r
\r
rem Copy x86 drivers\r
-set bin_dir=%1\bin\kernel\objfre_wnet_x86\i386\r
+\r
+:wxp_drv\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 free drivers\r
+\r
+set bin_dir=%1\bin\kernel\objfre_%OS%_x86\i386\r
set dest_dir=%2\HCA\x86\\r
-for %%i in (%bin_dir%\ibbus.sys, %bin_dir%\ibiou.sys, %bin_dir%\mthca.sys) do xcopy %%i %dest_dir% /y\r
+\r
+for %%i in (%bin_dir%\ibbus.sys, %bin_dir%\ibiou.sys, %bin_dir%\mthca.sys,%bin_dir%\mlx4_hca.sys, %bin_dir%\mlx4_bus.sys) do xcopy %%i %dest_dir% /y\r
+\r
+xcopy %WdfCoInstaller%\x86\WdfCoInstaller01005.dll %dest_dir% /y\r
xcopy %bin_dir%\ipoib.sys %2\net\x86\ /y\r
xcopy %bin_dir%\qlgcvnic.sys %2\net\x86\ /y\r
xcopy %bin_dir%\ibsrp.sys %2\storage\x86\ /y\r
\r
-rem\r
-rem USER MODE\r
-rem\r
\r
-set bin_dir=%1\bin\user\objchk_wnet_amd64\amd64\r
+rem Checked USER MODE\r
+\r
+if /I "%OS%" == "wxp" goto wxp_userm\r
+\r
+if "%DBG%" == "TRUE" echo DBG: amd64 Checked amd64 user-mode\r
+\r
+set bin_dir=%1\bin\user\objchk_%OS%_amd64\amd64\r
set dest_dir=%2\HCA\amd64\\r
\r
-for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
+for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll, %bin_dir%\mlx4ud.dll) do (\r
+ xcopy %%i %dest_dir% /Y /F\r
+)\r
\r
-for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /yq\r
+for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /y /f\r
\r
xcopy %bin_dir%\*.exe %2\tools\amd64\debug\ /y\r
\r
xcopy %bin_dir%\dat2d.lib %2\DAPL2\amd64\ /yq\r
xcopy %bin_dir%\dat2d.pdb %2\DAPL2\amd64\ /yq\r
\r
-rem Copy checked IA64 drivers\r
-set bin_dir=%1\bin\user\objchk_wnet_ia64\ia64\r
+rem Copy checked IA64 dlls\r
+\r
+if "%DBG%" == "TRUE" echo DBG: ia64 Checked dlls\r
+\r
+set bin_dir=%1\bin\user\objchk_%OS%_ia64\ia64\r
set dest_dir=%2\HCA\ia64\\r
-for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
\r
-for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /yq\r
+for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y /f\r
+\r
+for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /y /f\r
\r
xcopy %bin_dir%\*.exe %2\tools\ia64\debug\ /y\r
\r
xcopy %bin_dir%\dat2d.lib %2\DAPL2\ia64\ /yq\r
xcopy %bin_dir%\dat2d.pdb %2\DAPL2\ia64\ /yq\r
\r
-rem Copy checked x86 drivers\r
-set bin_dir=%1\bin\user\objchk_wnet_x86\i386\r
+\r
+rem checked x86 user mode\r
+\r
+:wxp_userm\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 Checked user-mode dlls\r
+\r
+set bin_dir=%1\bin\user\objchk_%OS%_x86\i386\r
set dest_dir=%2\HCA\x86\\r
-for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
\r
-for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /yq\r
+for %%i in (%bin_dir%\ibald.dll, %bin_dir%\complibd.dll, %bin_dir%\mthcaud.dll, %bin_dir%\IbInstaller.dll,%bin_dir%\mlx4ud.dll) do xcopy %%i %dest_dir% /y /f\r
+\r
+for %%i in (%bin_dir%\ibald.lib, %bin_dir%\ibald.pdb, %bin_dir%\complibd.lib, %bin_dir%\complibd.pdb) do xcopy %%i %dest_dir% /y /f\r
\r
-xcopy %bin_dir%\*.exe %2\tools\x86\debug\ /y\r
+xcopy %bin_dir%\*.exe %2\tools\x86\debug\ /y /f\r
\r
xcopy %bin_dir%\dapld.dll %2\DAPL\x86\ /yq\r
xcopy %bin_dir%\dapld.pdb %2\DAPL\x86\ /yq\r
xcopy %bin_dir%\dat2d.lib %2\DAPL2\x86\ /yq\r
xcopy %bin_dir%\dat2d.pdb %2\DAPL2\x86\ /yq\r
\r
+copy /B %bin_dir%\installsp.exe %2\tools\x86\debug\ /y\r
+\r
+if /I "%OS%" == "wxp" goto wxp_free_drv\r
+\r
rem checked x86 DLLs --> WOW64 DLLs\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 Checked dlls to WOW64 dlls\r
+\r
rem xcopy had problems determining if dest was File | Dir ??\r
\r
-copy /B %bin_dir%\installsp.exe %2\tools\x86\debug\ /y\r
copy /B %bin_dir%\ibald.dll %2\HCA\amd64\ibal32d.dll /y\r
copy /B %bin_dir%\ibald.lib %2\HCA\amd64\ibal32d.lib /y\r
copy /B %bin_dir%\ibald.pdb %2\HCA\amd64\ibal32d.pdb /y\r
copy /B %bin_dir%\mthcaud.dll %2\HCA\amd64\mthca32d.dll /y\r
copy /B %bin_dir%\mthcaud.dll %2\HCA\ia64\mthca32d.dll /y\r
\r
+copy /B %bin_dir%\mlx4ud.dll %2\HCA\amd64\mlx4u32d.dll /y\r
+rem copy /B %bin_dir%\mlx4ud.dll %2\HCA\ia64\mlx4u32d.dll /y\r
+\r
copy /B %bin_dir%\dapld.dll %2\DAPL\amd64\dapl32d.dll /y\r
copy /B %bin_dir%\datd.dll %2\DAPL\amd64\dat32d.dll /y\r
copy /B %bin_dir%\dapld.dll %2\DAPL\ia64\dapl32d.dll /y\r
copy /B %bin_dir%\dapl2d.dll %2\DAPL2\ia64\dapl232d.dll /y\r
copy /B %bin_dir%\dat2d.dll %2\DAPL2\ia64\dat232d.dll /y\r
\r
-rem Copy Free x64 drivers\r
-set bin_dir=%1\bin\user\objfre_wnet_amd64\amd64\r
+rem Copy Free x64 dll\r
+\r
+if "%DBG%" == "TRUE" echo DBG: amd64 Free dll\r
+\r
+set bin_dir=%1\bin\user\objfre_%OS%_amd64\amd64\r
set dest_dir=%2\HCA\amd64\\r
-for %%i in (%bin_dir%\ibal.dll, %bin_dir%\complib.dll, %bin_dir%\mthcau.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
+\r
+for %%i in (%bin_dir%\ibal.dll, %bin_dir%\complib.dll, %bin_dir%\mthcau.dll, %bin_dir%\IbInstaller.dll,%bin_dir%\mlx4u.dll) do xcopy %%i %dest_dir% /y\r
\r
for %%i in (%bin_dir%\ibal.lib, %bin_dir%\ibal.pdb, %bin_dir%\complib.lib, %bin_dir%\complib.pdb) do xcopy %%i %dest_dir% /yq\r
\r
xcopy %bin_dir%\flint.exe %2\FwTools\amd64\ /y\r
xcopy %bin_dir%\mst.exe %2\FwTools\amd64\ /y\r
\r
-rem Copy Free IA64 drivers\r
-set bin_dir=%1\bin\user\objfre_wnet_ia64\ia64\r
+rem Copy Free IA64 dlls\r
+\r
+set bin_dir=%1\bin\user\objfre_%OS%_ia64\ia64\r
set dest_dir=%2\HCA\ia64\\r
+\r
+if "%DBG%" == "TRUE" echo DBG: IA64 Free dlls to %dest_dir%\r
+\r
for %%i in (%bin_dir%\ibal.dll, %bin_dir%\complib.dll, %bin_dir%\mthcau.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
\r
for %%i in (%bin_dir%\ibal.lib, %bin_dir%\ibal.pdb, %bin_dir%\complib.lib, %bin_dir%\complib.pdb) do xcopy %%i %dest_dir% /yq\r
xcopy %bin_dir%\mst.exe %2\FwTools\ia64\ /y\r
\r
rem Copy Free x86 drivers\r
-set bin_dir=%1\bin\user\objfre_wnet_x86\i386\r
+\r
+:wxp_free_drv\r
+\r
+set bin_dir=%1\bin\user\objfre_%OS%_x86\i386\r
set dest_dir=%2\HCA\x86\\r
-for %%i in (%bin_dir%\ibal.dll, %bin_dir%\complib.dll, %bin_dir%\mthcau.dll, %bin_dir%\IbInstaller.dll) do xcopy %%i %dest_dir% /y\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 Free dlls to %dest_dir%\r
+\r
+for %%i in (%bin_dir%\ibal.dll, %bin_dir%\complib.dll, %bin_dir%\mthcau.dll, %bin_dir%\IbInstaller.dll,%bin_dir%\mlx4u.dll) do xcopy %%i %dest_dir% /y\r
\r
for %%i in (%bin_dir%\ibal.lib, %bin_dir%\ibal.pdb, %bin_dir%\complib.lib, %bin_dir%\complib.pdb) do xcopy %%i %dest_dir% /yq\r
\r
xcopy %bin_dir%\flint.exe %2\FwTools\x86\ /y\r
xcopy %bin_dir%\mst.exe %2\FwTools\x86\ /y\r
\r
-rem free x86 DLLs --> WOW64 DLLs\r
+if /I "%OS%" == "wxp" goto inf_files\r
+\r
+rem free x86 items\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 Free WSD to %dest_dir%\net\x86\r
+\r
copy %bin_dir%\ibwsd.dll %2\net\x86\ /y\r
copy %bin_dir%\installsp.exe %2\net\x86\ /y\r
copy %bin_dir%\installsp.exe %2\tools\x86\release /y\r
+\r
+rem free x86 DLLs --> WOW64 DLLs\r
+\r
+if "%DBG%" == "TRUE" echo DBG: x86 Free dlls to WOW64\r
+\r
copy /B %bin_dir%\ibwsd.dll %2\net\amd64\ibwsd32.dll /y\r
copy /B %bin_dir%\ibwsd.dll %2\net\ia64\ibwsd32.dll /y\r
copy /B %bin_dir%\ibal.dll %2\HCA\amd64\ibal32.dll /y\r
copy /B %bin_dir%\complib.dll %2\HCA\ia64\cl32.dll /y\r
copy /B %bin_dir%\complib.lib %2\HCA\ia64\cl32.lib /y\r
copy /B %bin_dir%\complib.pdb %2\HCA\ia64\cl32.pdb /y\r
+\r
copy /B %bin_dir%\mthcau.dll %2\HCA\amd64\mthca32.dll /y\r
copy /B %bin_dir%\mthcau.dll %2\HCA\ia64\mthca32.dll /y\r
\r
+copy /B %bin_dir%\mlx4u.dll %2\HCA\amd64\mlx4u32.dll /y\r
+rem copy /B %bin_dir%\mlx4u.dll %2\HCA\ia64\mlx4u32.dll /y\r
+\r
copy /B %bin_dir%\dapl.dll %2\DAPL\amd64\dapl32.dll /y\r
copy /B %bin_dir%\dat.dll %2\DAPL\amd64\dat32.dll /y\r
copy /B %bin_dir%\dapl.dll %2\DAPL\ia64\dapl32.dll /y\r
copy /B %bin_dir%\dapl2.dll %2\DAPL2\ia64\dapl232.dll /y\r
copy /B %bin_dir%\dat2.dll %2\DAPL2\ia64\dat232.dll /y\r
\r
+\r
rem Copy INF files to arch specific dirs - WHQL reasons\r
-xcopy %1\hw\mthca\kernel\mthca.inf %2\HCA\amd64 /y\r
+\r
+:inf_files\r
+\r
+if "%DBG%" == "TRUE" echo DBG: copy x86 INF files\r
+\r
+rem .inf files needs mods before arch specific dest change.\r
xcopy %1\hw\mthca\kernel\mthca.inf %2\HCA\x86 /y\r
-xcopy %1\hw\mthca\kernel\mthca.inf %2\HCA\ia64 /y\r
-xcopy %1\hw\mthca\kernel\mthca.cdf %2\HCA\amd64 /y\r
xcopy %1\hw\mthca\kernel\mthca.cdf %2\HCA\x86 /y\r
-xcopy %1\hw\mthca\kernel\mthca.cdf %2\HCA\ia64 /y\r
-xcopy %1\core\bus\kernel\ib_bus.inf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.inf %2\HCA\x86 /y\r
+xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.cdf %2\HCA\x86 /y\r
+xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.inf %2\HCA\x86 /y\r
+xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.cdf %2\HCA\x86 /y\r
+\r
xcopy %1\core\bus\kernel\ib_bus.inf %2\HCA\x86 /y\r
-xcopy %1\core\bus\kernel\ib_bus.inf %2\HCA\ia64 /y\r
-xcopy %1\core\bus\kernel\ib_bus.cdf %2\HCA\amd64 /y\r
xcopy %1\core\bus\kernel\ib_bus.cdf %2\HCA\x86 /y\r
-xcopy %1\core\bus\kernel\ib_bus.cdf %2\HCA\ia64 /y\r
-xcopy %1\ulp\ipoib\kernel\netipoib.inf %2\net\amd64 /y\r
xcopy %1\ulp\ipoib\kernel\netipoib.inf %2\net\x86 /y\r
-xcopy %1\ulp\ipoib\kernel\netipoib.inf %2\net\ia64 /y\r
-xcopy %1\ulp\ipoib\kernel\ipoib.cdf %2\net\amd64 /y\r
xcopy %1\ulp\ipoib\kernel\ipoib.cdf %2\net\x86 /y\r
-xcopy %1\ulp\ipoib\kernel\ipoib.cdf %2\net\ia64 /y\r
-xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\amd64 /y\r
-xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\x86 /y\r
-xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\ia64 /y\r
-rem .inf files needs mods before arch specific dest change.\r
xcopy %1\ulp\srp\kernel\ib_srp.inf %2\storage\ /y\r
-rem pickup manifest files\r
-xcopy %1\tools\wsdinstall\user\installsp.exe.manifest %2\net\amd64 /y\r
+xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\x86 /y\r
xcopy %1\tools\wsdinstall\user\installsp.exe.manifest %2\net\x86 /y\r
+\r
+if /I "%OS%" == "wxp" goto cpy_bin_files\r
+\r
+if "%DBG%" == "TRUE" echo DBG: copy 64bit INF files\r
+\r
+xcopy %1\hw\mthca\kernel\mthca.inf %2\HCA\amd64 /y\r
+xcopy %1\hw\mthca\kernel\mthca.cdf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.inf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.cdf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\hca\mlx4_hca32.cdf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.inf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.cdf %2\HCA\amd64 /y\r
+xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus32.cdf %2\HCA\amd64 /y\r
+xcopy %1\core\bus\kernel\ib_bus.inf %2\HCA\amd64 /y\r
+xcopy %1\core\bus\kernel\ib_bus.cdf %2\HCA\amd64 /y\r
+xcopy %1\ulp\ipoib\kernel\netipoib.inf %2\net\amd64 /y\r
+xcopy %1\ulp\ipoib\kernel\ipoib.cdf %2\net\amd64 /y\r
+xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\amd64 /y\r
+xcopy %1\tools\wsdinstall\user\installsp.exe.manifest %2\net\amd64 /y\r
+\r
+xcopy %1\hw\mthca\kernel\mthca.inf %2\HCA\ia64 /y\r
+xcopy %1\hw\mthca\kernel\mthca.cdf %2\HCA\ia64 /y\r
+rem xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.inf %2\HCA\ia64 /y\r
+rem xcopy %1\hw\mlx4\kernel\hca\mlx4_hca.cdf %2\HCA\ia64 /y\r
+rem xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.inf %2\HCA\ia64 /y\r
+rem xcopy %1\hw\mlx4\kernel\bus\drv\mlx4_bus.cdf %2\HCA\ia64 /y\r
+xcopy %1\core\bus\kernel\ib_bus.inf %2\HCA\ia64 /y\r
+xcopy %1\core\bus\kernel\ib_bus.cdf %2\HCA\ia64 /y\r
+xcopy %1\ulp\ipoib\kernel\netipoib.inf %2\net\ia64 /y\r
+xcopy %1\ulp\ipoib\kernel\ipoib.cdf %2\net\ia64 /y\r
+xcopy %1\ulp\qlgcvnic\kernel\netvnic.inf %2\net\ia64 /y\r
xcopy %1\tools\wsdinstall\user\installsp.exe.manifest %2\net\ia64 /y\r
\r
-echo Copy bin\ files\r
-xcopy %1\bin %2\bin\ /eyq\r
-echo Copy symbol files\r
-xcopy %1\bin\*.pdb %2\symbols\ /eyq\r
-\r
-pushd %2\r
-del /s bin\*.pdb > nul\r
-del /s ibtest* > nul\r
-del /s pingpong* > nul\r
-del /s *Sdp* > nul\r
-del /s Select* > nul\r
-del /s usrp* > nul\r
-del /s bin\*.lib > nul\r
-del /s bin\*.exp > nul\r
-popd\r
+\r
+:cpy_bin_files\r
+\r
+rem bin\bin used to generate a web based symbol store in build-ofa-dist.bat.\r
+echo 'Copy bin\obj{chk,fre}_%3_{x86,amd64,ia64} to %2\bin'\r
+rem xcopy %1\bin %2\bin\ /eyq\r
+rem instead of copying the entire bin\ folder, pick items of OS interest.\r
+\r
+xcopy %1\bin\kernel\objchk_%3_x86 %2\bin\kernel\objchk_%3_x86\ /S /Y /Q\r
+xcopy %1\bin\kernel\objfre_%3_x86 %2\bin\kernel\objfre_%3_x86\ /S /Y /Q\r
+if /I "%3" == "wxp" goto ucpy\r
+xcopy %1\bin\kernel\objchk_%3_ia64 %2\bin\kernel\objchk_%3_ia64\ /S /Y /Q\r
+xcopy %1\bin\kernel\objfre_%3_ia64 %2\bin\kernel\objfre_%3_ia64\ /S /Y /Q\r
+xcopy %1\bin\kernel\objchk_%3_amd64 %2\bin\kernel\objchk_%3_amd64\ /S /Y /Q\r
+xcopy %1\bin\kernel\objfre_%3_amd64 %2\bin\kernel\objfre_%3_amd64\ /S /Y /Q\r
+\r
+:ucpy\r
+\r
+xcopy %1\bin\user\objchk_%3_x86 %2\bin\user\objchk_%3_x86\ /S /Y /Q\r
+xcopy %1\bin\user\objfre_%3_x86 %2\bin\user\objfre_%3_x86\ /S /Y /Q\r
+if /I "%3" == "wxp" goto ucpyx\r
+xcopy %1\bin\user\objchk_%3_ia64 %2\bin\user\objchk_%3_ia64\ /S /Y /Q\r
+xcopy %1\bin\user\objfre_%3_ia64 %2\bin\user\objfre_%3_ia64\ /S /Y /Q\r
+xcopy %1\bin\user\objchk_%3_amd64 %2\bin\user\objchk_%3_amd64\ /S /Y /Q\r
+xcopy %1\bin\user\objfre_%3_amd64 %2\bin\user\objfre_%3_amd64\ /S /Y /Q\r
+\r
+:ucpyx\r
+\r
+rem echo Copy symbol files: bin\*.pdb to %2\symbols\r
+rem xcopy %1\bin\*.pdb %2\symbols\ /eyq\r
+\r
+rem if "%DBG%" == "TRUE" echo DBG: bin\ file cleanup, file-not-found is OK.\r
+rem pushd %2\r
+rem del /s bin\*.pdb > nul\r
+rem del /s ibtest* > nul\r
+rem del /s pingpong* > nul\r
+rem del /s *Sdp* > nul\r
+rem del /s Select* > nul\r
+rem del /s usrp* > nul\r
+rem del /s bin\*.lib > nul\r
+rem del /s bin\*.exp > nul\r
+rem popd\r
\r
rem Copy DAT v1.1 header files\r
+if "%DBG%" == "TRUE" echo DBG: DAT v1.1 header files\r
if exist %1\ulp\dapl\dat\include\dat (\r
pushd %1\ulp\dapl\dat\include\dat\r
\r
)\r
\r
rem Copy DAT v2.0 header files\r
+if "%DBG%" == "TRUE" echo DBG: DAT v2.0 header files\r
if exist %1\ulp\dapl2\dat\include\dat (\r
pushd %1\ulp\dapl2\dat\include\dat\r
\r
)\r
\r
rem Copy IBAL header files\r
+if "%DBG%" == "TRUE" echo DBG: IBAL header files\r
if exist %1\inc (\r
if exist %2\inc rmdir /S/Q %2\inc\r
mkdir %2\Inc\r
)\r
\r
rem Docs & SDK items\r
+if "%DBG%" == "TRUE" echo DBG: Docs and SDK files\r
if NOT exist %2\Misc (\r
mkdir %2\Misc\r
)\r
goto end\r
\r
:usage\r
-echo makebin src dest\r
+echo makebin src dest os\r
echo src base directory.\r
echo dest directory in which to build the installable binary tree.\r
+echo os Windows version [wlh, wnet, wxp]\r
goto end\r
\r
:error1\r
-echo %1\bin\kernel\objfre_wnet_amd64\amd64 missing \r
+echo %1\bin\kernel\objfre_%OS%_amd64\amd64 missing \r
+goto end\r
:error2\r
-echo %1\bin\kernel\objfre_wnet_ia64\ia64 missing \r
+echo %1\bin\kernel\objfre_%OS%_ia64\ia64 missing \r
+goto end\r
:error3\r
-echo %1\bin\kernel\objfre_wnet_x86\i386 missing \r
+echo %1\bin\kernel\objfre_%OS%_x86\i386 missing \r
+goto end\r
:error4\r
-echo %1\bin\user\objfre_wnet_amd64\amd64 missing \r
+echo %1\bin\user\objfre_%OS%_amd64\amd64 missing \r
+goto end\r
:error5\r
-echo %6\bin\user\objfre_wnet_ia64\ia64 missing \r
+echo %6\bin\user\objfre_%OS%_ia64\ia64 missing \r
+goto end\r
:error6\r
-echo %1\bin\user\objfre_wnet_x86\i386 missing \r
+echo %1\bin\user\objfre_%OS%_x86\i386 missing \r
+goto end\r
:error7\r
-echo %1\bin\user\objchk_wnet_amd64\amd64 missing \r
+echo %1\bin\user\objchk_%OS%_amd64\amd64 missing \r
+goto end\r
:error8\r
-echo %1\bin\user\objchk_wnet_ia64\ia64 missing \r
+echo %1\bin\user\objchk_%OS%_ia64\ia64 missing \r
+goto end\r
:error9\r
-echo %1\bin\user\objchk_wnet_x86\i386 missing \r
-\r
-echo missin \r
+echo %1\bin\user\objchk_%OS%_x86\i386 missing \r
\r
:end\r
endlocal\r