Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve EDK2 build process script for simplicity and reliability #2669

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions EDK2/buildedk.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
#!/bin/sh

# Remove old EDK2 directory and unzip new one
rm -rf edk2-edk2-stable201911

unzip edk2-edk2-stable201911.zip > /dev/null

/bin/cp -a ./edk2_mod/edk2-edk2-stable201911 ./
# Copy modified EDK2 files
/bin/cp -a ./edk2_mod/edk2-edk2-stable201911 ./

cd edk2-edk2-stable201911
# Build BaseTools
cd edk2-edk2-stable201911 || exit 1
make -j 4 -C BaseTools/
cd ..

echo '======== build EDK2 for i386-efi ==============='
sh ./build.sh ia32 || exit 1

echo '======== build EDK2 for arm64-efi ==============='
sh ./build.sh aa64 || exit 1

echo '======== build EDK2 for x86_64-efi ==============='
sh ./build.sh || exit 1

# Function to build EDK2 for different architectures
build_edk2() {
local arch=$1
echo "======== build EDK2 for $arch-efi ==============="
sh ./build.sh "$arch" || exit 1
}

# Build for different architectures
build_edk2 "ia32"
build_edk2 "aa64"
build_edk2 "" # default to x86_64