This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
forked from ms-iot/rpi-iotcore
/
build.cmd
59 lines (47 loc) · 1.42 KB
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@echo off
setlocal enableDelayedExpansion
pushd "%~dp0..\build\bcm2836"
REM Find Visual Studio Installations
for /f "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -requires Microsoft.Component.MSBuild -find VC\Auxiliary\Build\vcvarsall.bat') do (
set vcvarsall="%%i"
)
call !vcvarsall! x86
REM Build drivers
msbuild /p:Configuration=Release /p:Platform=ARM64 /m
REM Copy to output directory
rmdir Output /s /q 2>nul
mkdir Output 2>nul
pushd ARM64\Release
for /f "tokens=*" %%i in ('dir /b *.dll *.sys *.inf *.pdb') do (
copy %%i ..\..\Output /y > nul
)
popd
pushd Output
REM Sign drivers
inf2cat /os:10_VB_ARM64 /drv:. /uselocaltime
signtool sign /fd SHA256 /f "%~dp0testcert.pfx" /p testcert123 /v *.dll *.sys *.cat *.dll
REM Package
for /f "delims=. tokens=1" %%i in ('dir /b *.inf') do (
mkdir %%i 2>nul
move %%i.* %%i >nul
)
move vchiq_arm_kern.* vchiq >nul
move vcos_win32_kern.* vchiq >nul
REM Generate compatibility list
for %%m in (RPi3 RPi4) do (
for /f "tokens=*" %%i in ('dir /b /a:d') do (
set supported=1
if /I [%%m] == [RPi3] (
if /I [%%i] == [vchiq] set supported=0
if /I [%%i] == [rpiuxflt] set supported=0
if /I [%%i] == [bcmgenet] set supported=0
)
if /I [%%m] == [RPi4] (
if /I [%%i] == [vchiq] set supported=0
if /I [%%i] == [RpiLanPropertyChange] set supported=0
)
if !supported! == 1 (echo %%i>> %%m.txt)
)
)
popd
popd