Due to tianocore separates packages into different repositories, pull these repositories into submodule and provide GitHub action example for build instruction.
- Build environment
sudo apt-get update
sudo apt-get install -y nasm git acpica-tools build-essential \
crossbuild-essential-i386 crossbuild-essential-amd64 \
crossbuild-essential-arm64 uuid-dev python3 python3-distutils \
python3-pip bc gawk llvm-dev lld clang
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10
git clone https://github.com/saqwed/myedk2.git myedk2 --recursive
sed -i 's+DEF(GCC_IA32_PREFIX)objcopy+ENV(GCC_IA32_PREFIX)objcopy+g' edk2/BaseTools/Conf/tools_def.template
sed -i 's+DEF(GCC_X64_PREFIX)objcopy+ENV(GCC_X64_PREFIX)objcopy+g' edk2/BaseTools/Conf/tools_def.template
sed -i 's+DEF(GCC_IA32_PREFIX)gcc+ENV(GCC_IA32_PREFIX)gcc+g' edk2/BaseTools/Conf/tools_def.template
sed -i 's+DEF(GCC_X64_PREFIX)gcc+ENV(GCC_X64_PREFIX)gcc+g' edk2/BaseTools/Conf/tools_def.template
export GCC_IA32_PREFIX=i686-linux-gnu-
export GCC_X64_PREFIX=x86_64-linux-gnu-
export GCC_AARCH64_PREFIX=aarch64-linux-gnu-
make -C edk2/BaseTools
export WORKSPACE=$PWD
ln -s $WORKSPACE/edk2-test/uefi-sct/SctPkg/ $WORKSPACE/SctPkg
export PACKAGES_PATH=$WORKSPACE/edk2
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-platforms
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-platforms/Platform/Intel
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-platforms/Silicon/Intel
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-platforms/Features/Intel
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-libc
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/edk2-test
export PACKAGES_PATH=$PACKAGES_PATH:$WORKSPACE/SctPkg
source edk2/edksetup.sh
build -a X64 -t GCC -p ShellPkg/ShellPkg.dsc -b RELEASE
-
Install Python 3.x
-
Install NASM 2.16.03 (edk2_stable202205 or above)
git clone https://github.com/saqwed/myedk2.git myedk2 --recursive
rem Open "x86 Native Tools Command Prompt for VS 2019" via start menu
set WORKSPACE=%CD%
cd %WORKSPACE%\edk2
set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
edksetup.bat VS2019
cd %WORKSPACE%\edk2\BaseTools
toolsetup.bat
nmake
Exit this command prompt windows and reopen another one for next steps.
REM open a new command prompt
set WORKSPACE=%CD%
mklink /D %WORKSPACE%\SctPkg %WORKSPACE%\edk2-test\uefi-sct\SctPkg
set PACKAGES_PATH=%WORKSPACE%/edk2
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-platforms
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-platforms/Platform/Intel
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-platforms/Silicon/Intel
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-platforms/Features/Intel
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-libc
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/edk2-test
set PACKAGES_PATH=%PACKAGES_PATH%;%WORKSPACE%/SctPkg
edk2\edksetup.bat VS2019
build -a X64 -t VS2019 -p ShellPkg/ShellPkg.dsc -b RELEASE
- Install Edk2code extension
- Pass
-Y COMPILE_INFO -y BuildReport.log
for the extension requirement. - Open WORKSPACE, run command
EDK2: Rebuild index database
from the command palette, selectBuild
folder.- Detail can be found in Index source code