Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Adding CHTx64 script and version updated to 4.3 (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
parameshbabu authored May 7, 2018
1 parent 46e6326 commit fcc0748
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/LaunchTool.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ REM Change to Working directory
cd /D %IOTADK_ROOT%\Tools
call setOEM.cmd
doskey /macrofile=alias.txt
set IOT_ADDON_VERSION=4.2
set IOT_ADDON_VERSION=4.3

echo IOTADK_ROOT : %IOTADK_ROOT%
echo ADK_VERSION : %ADK_VERSION%
Expand Down
50 changes: 50 additions & 0 deletions Tools/bsptools/CHTx64/convert.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@echo off

goto START

:Usage
echo Usage: convert
echo Generates the wm.xml file for the inf files and renames the existing pkg.xml to _pkg.xml
echo [/?].................... Displays this usage string.
echo Example:
echo convert
endlocal
exit /b 1

:START
setlocal ENABLEDELAYEDEXPANSION
if [%BSP_ARCH%] neq [amd64] (
echo.%CLRRED%Error: Supported only in amd64.%CLREND%
exit /b 1
)

set DST_DIR=%BSPSRC_DIR%\CHTx64
pushd
cd /D %DST_DIR%
del /s /q *.wm.xml >nul 2>nul
dir *.inf /b /s > %DST_DIR%\inflist.txt

for /f "delims=" %%i in (%DST_DIR%\inflist.txt) do (
cd %%~pi
for %%A in (.) do ( set FILENAME=%%~nxA)
move !FILENAME!.pkg.xml !FILENAME!._pkg.xml >nul 2>nul
echo Processing %%~nxi
call inf2pkg.cmd %%i !FILENAME! Intel
)

popd
del %DST_DIR%\inflist.txt

call convertpkg %DST_DIR%

echo Fixing the BSPFM.xml file
powershell -Command "(gc %DST_DIR%\Packages\CHTx64FM.XML) -replace 'Intel.CHT64.OEM', '%%OEM_NAME%%.CHT64.OEM' -replace 'Intel.CHT64.Device', '%%OEM_NAME%%.CHT64.Device' -replace 'FeatureIdentifierPackage=\"true\"', '' | Out-File %DST_DIR%\Packages\CHTx64FM.xml -Encoding utf8"
echo Fixing the TestOEMInput.xml file
powershell -Command "(gc %DST_DIR%\OEMInputSamples\TestOEMInput.xml) -replace '%%BSPSRC_DIR%%', '%%BLD_DIR%%' -replace 'CHTx64\\Packages','MergedFMs' | Out-File %DST_DIR%\OEMInputSamples\TestOEMInput.xml -Encoding utf8"
echo Fixing the RetailOEMInput.xml file
powershell -Command "(gc %DST_DIR%\OEMInputSamples\RetailOEMInput.xml) -replace '%%BSPSRC_DIR%%', '%%BLD_DIR%%' -replace 'CHTx64\\Packages','MergedFMs' | Out-File %DST_DIR%\OEMInputSamples\RetailOEMInput.xml -Encoding utf8"

endlocal

echo Conversions done
exit /b 0

0 comments on commit fcc0748

Please sign in to comment.