Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .github/workflows/bbr-sct_build_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
echo "CapsuleApp.efi not found for EBBR, raising an error."
exit 1
fi
- name: Check for UefiDump.efi (EBBR)
run: |
if [ ! -e "bbr-acs/ebbr/scripts/edk2/Build/MdeModule/DEBUG_GCC5/AARCH64/UefiDump.efi" ]; then
echo "UefiDump.efi not found for EBBR, raising an error."
exit 1
fi
- name: Get required source codes and tools for SBBR
run: |
cd $GITHUB_WORKSPACE # Go back to the root directory of the repository
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/daily_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
echo "CapsuleApp.efi not found for EBBR, raising an error."
exit 1
fi
- name: Check for UefiDump.efi (EBBR)
run: |
if [ ! -e "bbr-acs/ebbr/scripts/edk2/Build/MdeModule/DEBUG_GCC5/AARCH64/UefiDump.efi" ]; then
echo "UefiDump.efi not found for EBBR, raising an error."
exit 1
fi
- name: Get required source codes and tools for SBBR
run: |
cd $GITHUB_WORKSPACE # Go back to the root directory of the repository
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ bbr-acs/<ebbr|sbbr>/scripts/edk2-test/uefi-sct/<SBBR|EBBR>-SCT # e.g. SBBR-SCT
**Notes:**
- The UEFI application `CapsuleApp.efi` is also built and can be found at:
`bbr-acs/<ebbr|sbbr>/scripts/edk2/Build/MdeModule/DEBUG_GCC5/AARCH64`
- For **EBBR** builds only, `UefiDump.efi` is also built and can be found at:
`bbr-acs/ebbr/scripts/edk2/Build/MdeModule/DEBUG_GCC5/AARCH64/UefiDump.efi`
It dumps the EBBR profile table to `\acs_results_template\acs_results\uefi_dump\ebbr_profile_table.log`, and falls back to `ebbr_profile_table.log` in the current working directory if that path does not exist.
- The standalone build does not include the BBSR SCT suite, as some BBSR tests depend on the KEYS_DIR. These tests are only supported when built through the arm-systemready repository.

---
Expand Down
59 changes: 46 additions & 13 deletions common/scripts/build-uefi-apps.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright (c) 2021, 2023-2024, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2021, 2023-2024, 2026 Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -84,7 +84,7 @@ do_build()
fi

export EDK2_TOOLCHAIN=$UEFI_TOOLCHAIN
export PACKAGES_PATH=$TOP_DIR/$UEFI_PATH
export PACKAGES_PATH=$TOP_DIR/$UEFI_PATH:$BBR_DIR
export PYTHON_COMMAND=/usr/bin/python3
export WORKSPACE=$TOP_DIR/$UEFI_PATH

Expand All @@ -98,6 +98,11 @@ do_build()
# package and place it as EFI/BOOT/bootaa64.efi for UEFI boot.
build -a AARCH64 -t GCC5 -p ShellPkg/ShellPkg.dsc
fi

# Build the standalone generic UEFI dump application.
if [[ $BUILD_PLAT = EBBR ]]; then
build -a $TARGET_ARCH -t $UEFI_TOOLCHAIN -p ebbr/uefi_app/UefiDump.dsc
fi
popd
}

Expand All @@ -115,24 +120,52 @@ do_clean()

do_package ()
{
BUILD_PATH="$TOP_DIR/$UEFI_PATH/Build/MdeModule"
UEFI_BUILD_DIR="$BUILD_PATH/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}"
CAPSULE_APP="$UEFI_BUILD_DIR/CapsuleApp.efi"
UEFIDUMP_APP="$UEFI_BUILD_DIR/UefiDump.efi"
SHELL_DIR="$TOP_DIR/$UEFI_PATH/Build/Shell/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}"
SHELL_APP="$SHELL_DIR/ShellPkg/Application/Shell/Shell/$UEFI_BUILD_MODE/Shell.efi"
UEFI_SCT_BOOT="$TOP_DIR/edk2-test/uefi-sct/${BUILD_PLAT}-SCT/EFI/BOOT/bootaa64.efi"

echo "Packaging CapsuleApp...";

if [ $BUILD_TYPE = F ]; then
sbsign --key $KEYS_DIR/TestDB1.key --cert $KEYS_DIR/TestDB1.crt $TOP_DIR/$UEFI_PATH/Build/MdeModule/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}/CapsuleApp.efi --output $TOP_DIR/$UEFI_PATH/Build/MdeModule/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}/CapsuleApp.efi
if [ -f "$CAPSULE_APP" ]; then
echo "CapsuleApp.efi successfully generated at $CAPSULE_APP"
if [ "$BUILD_TYPE" = "F" ]; then
sbsign \
--key "$KEYS_DIR/TestDB1.key" \
--cert "$KEYS_DIR/TestDB1.crt" \
"$CAPSULE_APP" \
--output "$CAPSULE_APP"
fi
else
echo "Error: CapsuleApp.efi could not be generated. Please check the logs"
fi

if [ -f $TOP_DIR/$UEFI_PATH/Build/MdeModule/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}/CapsuleApp.efi ]; then
echo "CapsuleApp.efi successfully generated at $TOP_DIR/$UEFI_PATH/Build/MdeModule/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}/CapsuleApp.efi"
else
echo "Error: CapsuleApp.efi could not be generated. Please check the logs"
if [[ "$BUILD_PLAT" = "EBBR" ]]; then
if [ -f "$UEFIDUMP_APP" ]; then
echo "UefiDump.efi successfully generated at $UEFIDUMP_APP"
if [ "$BUILD_TYPE" = "F" ]; then
sbsign \
--key "$KEYS_DIR/TestDB1.key" \
--cert "$KEYS_DIR/TestDB1.crt" \
"$UEFIDUMP_APP" \
--output "$UEFIDUMP_APP"
fi
else
echo "Error: UefiDump.efi could not be generated. Please check the logs"
fi
fi

if [ $BUILD_TYPE = S ]; then
# Shell.efi is required to run the standalone SCT. Copy it into the SBBR/EBBR-SCT
# package and place it as EFI/BOOT/bootaa64.efi for UEFI boot.
cp $TOP_DIR/$UEFI_PATH/Build/Shell/${UEFI_BUILD_MODE}_${UEFI_TOOLCHAIN}/${TARGET_ARCH}/ShellPkg/Application/Shell/Shell/$UEFI_BUILD_MODE/Shell.efi $TOP_DIR/edk2-test/uefi-sct/${BUILD_PLAT}-SCT/EFI/BOOT/bootaa64.efi
if [ "$BUILD_TYPE" = "S" ]; then
# Shell.efi is required to run the standalone SCT. Copy it into the SBBR/EBBR-SCT
# package and place it as EFI/BOOT/bootaa64.efi for UEFI boot.
cp \
"$SHELL_APP" \
"$UEFI_SCT_BOOT"
fi
}

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/framework.sh $@
source "$DIR/framework.sh" "$@"
Loading
Loading