Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

cc: Merge from main to CCv0 - Aug, 14th 2023 #5743

Open
wants to merge 3 commits into
base: CCv0
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
11 changes: 11 additions & 0 deletions .ci/aarch64/install_rom_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TOOLCHAIN_PREFIX="${TOOLCHAIN_ARCHIVE_PREFIX}/bin/aarch64-none-elf-"
TOOLCHAIN_SOURCE_URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/${TOOLCHAIN_VERSION}/binrel/${TOOLCHAIN_ARCHIVE}"

export EDK2_WORKSPACE=$(mktemp -d)
BACKUP_EFI_DIR=$HOME/backup

#tag or commit id of source code
EDK2_REPO_TAG_ID="edk2-stable202202"
Expand All @@ -36,6 +37,7 @@ INSTALL_PATH="${DESTDIR:-}${PREFIX}/share/kata-containers"
EFI_NAME="QEMU_EFI.fd"
EFI_DEFAULT_DIR="${EDK2_WORKSPACE}/qemu-efi-aarch64"
EFI_DEFAULT_PATH="${EFI_DEFAULT_DIR}/${EFI_NAME}"
BACKUP_EFI="${BACKUP_EFI_DIR}/${EFI_NAME}"

FLASH0_NAME="kata-flash0.img"
FLASH1_NAME="kata-flash1.img"
Expand Down Expand Up @@ -143,6 +145,11 @@ main()
exit 0
fi

if [ -f "${BACKUP_EFI}" ]; then
[ ! -d "${EFI_DEFAULT_DIR}" ] && mkdir -p "${EFI_DEFAULT_DIR}"
cp "${BACKUP_EFI}" "${EFI_DEFAULT_PATH}"
fi

#There maybe something wrong with the qemu efi download from linaro
#Just build it from source code until the issue is fixed
if [ ! -e "${EFI_DEFAULT_PATH}" ]; then
Expand All @@ -156,6 +163,10 @@ main()
prepare_uefi_flash
install_uefi_flash "${EDK2_WORKSPACE}/${FLASH0_NAME}" "${EDK2_WORKSPACE}/${FLASH1_NAME}"

# Save EFI file to backup dir
[ ! -d "${BACKUP_EFI_DIR}" ] && mkdir -p "${BACKUP_EFI_DIR}"
[ ! -f "${BACKUP_EFI}" ] && cp "${QEMU_EFI_BUILD_PATH}" "${BACKUP_EFI_DIR}"

echo "Info: install uefi rom image successfully"
clean_up

Expand Down
Loading