-
Notifications
You must be signed in to change notification settings - Fork 2
/
launch.bat
132 lines (112 loc) · 5.41 KB
/
launch.bat
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@echo off
rem
rem Copyright (c) 2019, Kilian Kegel. All rights reserved.<BR>
rem SPDX-License-Identifier: BSD-2-Clause-Patent
rem
set path=%USERPROFILE%\appdata\Local\Programs\Python\Python37;%path%
rem #######################################################################
rem ### Check tools presence ##############################################
rem #######################################################################
rem
rem WINDDK 3790.1830 installation check...
rem
rem if not exist c:\WINDDK\3790.1830\install.htm (
rem echo ATTENTION: DDK 3790.1830 not installed
rem echo download from http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso
rem ping 127.0.0.0 > nul
rem ) else (
rem echo WINDDK 3790.1830 is installed
rem )
rem
rem MSVC v140/VS2015 C++ build tools (v14.00) installation check...
rem
if not exist "c:\Program Files (x86)\Microsoft Visual Studio 14.0\vc\bin\vcvars32.bat" (
if not exist "C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\VC\bin\vcvars32.bat" (
echo ATTENTION: Visual Studio 2015 not installed
pause
goto EOF
) else (
echo MSVC v140/VS2015 C++ build tools ^(v14.00^) is installed
)
) else (
echo MSVC v140/VS2015 C++ build tools ^(v14.00^) is installed
)
python --version > NUL 2>&1
if errorlevel 1 (
echo PYTHON is not installed.
echo Please install PYTHON from https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe
pause
goto EOF
) else (
python --version
)
git.exe --version > NUL 2>&1
if errorlevel 1 (
echo GIT is not installed.
echo Please install GIT from https://github.com/git-for-windows/git/releases/download/v2.23.0.windows.1/Git-2.23.0-64-bit.exe
PAUSE
goto EOF
) else (
git --version
)
if not exist c:\ASL (
echo Intel ASL compiler is not installed.
echo Please install Intel ASL compiler from https://acpica.org/sites/acpica/files/iasl-win-20160527.zip -OutFile download\iasl-win-20160527.zip to C:\ASL
) else (
c:\asl\iasl.exe | find "Optimizing Compiler"
)
rem #######################################################################
rem ### local tools #######################################################
rem #######################################################################
if not exist openssl-1.0.2r-x64_86-win64 (
powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile openssl-1.0.2r-x64_86-win64.zip"}"
if not exist openssl-1.0.2r-x64_86-win64.zip (
rem #######################################################################
rem ### if https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip not available
rem #######################################################################
git clone https://github.com/KilianKegel/openSSLBinary.git
move openSSLBinary\openssl-1.0.2r-x64_86-win64.zip .
rd /s /q openSSLBinary
)
powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip)
)
if not exist nasm-2.13.03 (
powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
powershell Expand-Archive nasm-2.13.03-win64.zip .
)
rem #######################################################################
rem ### EDK2 and EDK2-NON-OSI #############################################
rem #######################################################################
rem if not exist edk2 git clone --recursive https://github.com/tianocore/edk2.git edk2
rem if not exist edk2-non-osi git clone --recursive https://github.com/tianocore/edk2-non-osi.git edk2-non-osi
rem if not exist edk2-platforms git clone --recursive https://github.com/tianocore/edk2-platforms.git edk2-platforms
rem if not exist CdeBinPkg git clone --recursive https://github.com/KilianKegel/CdeBinPkg.git CdeBinPkg
rem #######################################################################
rem ### set build environment #############################################
rem #######################################################################
rem
set WORKSPACE=%CD%
set PACKAGES_PATH=%WORKSPACE%\edk2
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\overrides\edk2-platforms
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\overrides\EmulatorPkg
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\overrides\edk2-non-osi\Silicon\Intel
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\edk2-platforms\Silicon\Intel
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\edk2-platforms\Platform\Intel
rem set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%\edk2-non-osi\Silicon\Intel
set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64;%WORKSPACE%;
set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
rem ######################################################################
rem ### PYTHONE_HOME
rem ######################################################################
for /F %%a in ('where python.exe') do set PYTHON_HOME=%%~dpa
cd %WORKSPACE%\edk2
call edksetup.bat Rebuild
cd %WORKSPACE%\edk2\BaseTools\Source\C
nmake all
cd %WORKSPACE%\edk2
echo.
echo For MINNOWBOARD BUILD type: bldMNW.bat DEBUG/RELEASE
echo For EMULATION BUILD type: bldEMU.bat
%COMSPEC% /k echo Welcome, to the jungle...