Skip to content

KilianKegel/Howto-setup-a-UEFI-Development-PC

Repository files navigation

Howto-setup-a-UEFI-Development-PC

NOTE: To build all projects from https://github.com/KilianKegel the tools below are absolutely needed

  • NASM
  • ASL
  • Windows 8.1 SDK (for EDK2020-MinnowBoard)
  • FLEX/BISON (for the Visual-ACPICA-for-UEFI-Shell project)

Preparation for upcoming portable projects

NOTE: To avoid build failure due to incomplete installed or wrongly configured build machines,
upcoming and updated projects run their build tools within the project folder.

The build tools are installed and initialized when starting LAUNCH.BAT the first time.

Currently the tools listed below are in use:

To avoid multiple, lengthy downloads the original images can, optionally, downloaded once to each build machine and stored in a folder, that is assigned to an environment variable MYDOWNLOADS.

MYDOWNLOADSfolder

To do so, simply

  1. create a folder MYDOWNLOADS, e.g. run "cmd /c MD %USERPROFILE%\MYDOWNLOADS"
  2. windows-R -> control.exe -> User Accounts -> Change my environment variables
  3. create an environment variable MYDOWNLOADS, e.g. MYDOWNLOADS=%USERPROFILE%\MYDOWNLOADS:
  4. create an environment variable MYUSBSHARE, e.g. MYUSBSHARE=F:\ to automatically copy target files to an exchange drive per batch files or Visual Studio build events

envedit.png

Install a Windows 11/10 PC

Windows 11 configuration hint

  1. Restore Classic (Full) Context Menu in Windows
    run in command prompt window:
    reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d "" /f

Install Visual Studio 2022

  1. download: https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes
  2. configure setup: installselection2022

Install/extract the ASL/ACPI compiler to C:\ASL -> https://acpica.org/sites/acpica/files/iasl-win-20160527.zip

NOTE: If Python is installed from the Microsoft AppStore it can not be de-installed anymore!

Install Netwide Assembler ver. 2.15.05 to C:\NASM

NOTE: change default installation path to C:\NASM

https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe

Install the Windows 8.1 SDK, needed for the VS2015 based EDK2 buildprocess.

Windows 8.1 SDK is provided in the Microsoft SDK archive at:
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive,
or direct link:
https://go.microsoft.com/fwlink/p/?LinkId=323507
NOTE: Windows 8.1 SDK is removed from VS2022, but still available with VS2017. VS2017 itself is not available anymore for free.

NOTE: Windows 8.1 SDK is just needed to solve one single issue: Provide Ressource Compiler RC.EXE to EDK2 build process. Environment variables WINSDK81x86_PREFIX and WINSDK81_PREFIX are in use in EDK2 build, and could be adjusted to use newer SDK too... installselectionWindows8.1SDK

Install FLEX/BISON to C:\GnuWin32\bin, needed for the ACPI/ACPICA project

https://acpica.org/downloads/windows-source
i. add C:\GnuWin32\bin to path

Nice to have / optional

add to %USERPROFILE%\.gitconfig:

[diff]
  tool = bc4
[difftool "bc4"]
  cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool]
  prompt = false
[merge]
  tool = bc4
[mergetool "bc4"]
  cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
  trustExitCode = true

Install Acrobat Reader DC -> https://get.adobe.com/reader/otherversions/

Install compression tools

i. WinRar -> https://www.rarlab.com/rar/winrar-x64-571.exe
ii. 7Zip -> https://www.7-zip.org/a/7z1900-x64.exe

Install Windows Subsystem for Linux WSL2 / Ubuntu 22.04.2

NOTE: In order to run WSL2 on a HYPER-V virtual machine, enable Nested Virtualization on the Hyper-V Manager for this particular virtual machine, while the VM is in OFF state:

  • run PowerShell as administrator: Set-VMProcessor <"VIRTUALMACHINENAME"> -ExposeVirtualizationExtensions $true
  • in case the Virtual Machine Name includes special characters, e.g. (), use quotation marks

HyperVMgmt

https://docs.microsoft.com/en-us/windows/wsl/install-win10

ubuntuInstall1 ubuntuInstall2

NOTE: In order to start WSL2 you have to run as an administrator: bcdedit /set hypervisorlaunchtype auto

  • download install script:
    wget https://raw.githubusercontent.com/KilianKegel/HowTo-setup-a-YOCTO-Development-PC/master/install.sh
  • set x attribute: chmod +x install.sh
  • run ./install.sh

Disable Microsoft Defender

If the build machine is physically protected from malware, it is possible to disable the virus protection completely to save energy and to speedup build process.

Create DEFDIS.REG registry script below and run it on the platform:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
"DisableAntiVirus"=dword:00000001
"DisableRealtimeMonitoring"=dword:00000001
"DisableRoutinelyTakenAction"=dword:00000001
"DisableSpecialRunningModes"=dword:00000001
"ServiceKeepAlive"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Policy Manager]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection]
"DisableBehaviourMonitoring"=dword:00000001
"DisableRealtimeMonitoring"=dword:00000001
"DisableScanOnRealtimeEnable"=dword:00000001
"DisableOnAccessProtection"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Signature Updates]
"ForceUpdateFromMU"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet]
"DisableBlockAtFirstSeen"=dword:00000001
  • copy BGINFO64.EXE to %USERPROFILE%\AppData\Local\Microsoft\WindowsApps
  • create %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\BGINFO.BAT that contains:
     BGINFO64.EXE /timer:0
    

finally: adjust PATH variable

envedit.png
1: windows-R -> control.exe -> User Accounts -> Change my environment variables
2. add to PATH:

c:\progra~1\beyond~1                           --> bcompare.exe
c:\progra~1\winrar                             --> rar.exe
c:\progra~1\7-zip                              --> 7z.exe
c:\progra~2\teraterm                           --> ttermpro.exe
c:\progra~2\FILECO~1                           --> fcw.exe
c:\progra~1\MICROS~1\2022\COMMUN~1\Common7\ide --> devenv.exe
c:\GnuWin32\bin                                --> FLEX/BISON

Vintage DDK

Microsoft DDK download page

About

Howto setup a UEFI Development PC.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published