From 4155e9b35da64e0744993ac6f4e99d9bb468d804 Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Fri, 27 Aug 2021 00:08:21 +0800 Subject: [PATCH] sdm845Pkg: Library: add edk2-libc as StdLib Signed-off-by: BigfootACA --- .gitmodules | 3 +++ build.sh | 14 +++++++++++--- sdm845Pkg/Library/StdLib | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) create mode 160000 sdm845Pkg/Library/StdLib diff --git a/.gitmodules b/.gitmodules index 7b65926..131afff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "sdm845Pkg/AcpiTables"] path = sdm845Pkg/AcpiTables url = https://git.renegade-project.org/edk2-sdm845-acpi.git +[submodule "sdm845Pkg/Library/StdLib"] + path = sdm845Pkg/Library/StdLib + url = https://github.com/tianocore/edk2-libc.git diff --git a/build.sh b/build.sh index 3a53300..21a35d7 100755 --- a/build.sh +++ b/build.sh @@ -117,8 +117,9 @@ then set -e echo "Updating submodules" [ -e sdm845Pkg/AcpiTables/.git ]||git clone https://git.renegade-project.org/edk2-sdm845-acpi.git sdm845Pkg/AcpiTables if "${CHINESE}" - then git submodule set-url edk2 https://hub.fastgit.org/tianocore/edk2.git - git submodule set-url edk2-platforms https://hub.fastgit.org/tianocore/edk2-platforms.git + then git submodule set-url edk2 https://hub.fastgit.org/tianocore/edk2.git + git submodule set-url edk2-platforms https://hub.fastgit.org/tianocore/edk2-platforms.git + git submodule set-url sdm845Pkg/Library/StdLib https://hub.fastgit.org/tianocore/edk2-libc.git git submodule init;git submodule update --depth 1 pushd edk2 @@ -147,6 +148,12 @@ do if [ -n "${i}" ]&&[ -f "${i}/edksetup.sh" ] break fi done +for i in "${EDK2_LIBC}" sdm845Pkg/Library/StdLib ./edk2-libc ../edk2-libc +do if [ -n "${i}" ]&&[ -d "${i}/StdLib" ] + then _EDK2_LIBC="$(realpath "${i}")" + break + fi +done for i in "${EDK2_PLATFORMS}" ./edk2-platforms ../edk2-platforms do if [ -n "${i}" ]&&[ -d "${i}/Platform" ] then _EDK2_PLATFORMS="$(realpath "${i}")" @@ -154,11 +161,12 @@ do if [ -n "${i}" ]&&[ -d "${i}/Platform" ] fi done [ -n "${_EDK2}" ]||_error "EDK2 not found, please see README.md" +[ -n "${_EDK2_LIBC}" ]||_error "EDK2-LibC not found, please see README.md" [ -n "${_EDK2_PLATFORMS}" ]||_error "EDK2 Platforms not found, please see README.md" echo "EDK2 Path: ${_EDK2}" echo "EDK2_PLATFORMS Path: ${_EDK2_PLATFORMS}" export GCC5_AARCH64_PREFIX="${CROSS_COMPILE:-aarch64-linux-gnu-}" -export PACKAGES_PATH="$_EDK2:$_EDK2_PLATFORMS:$PWD" +export PACKAGES_PATH="$_EDK2:$_EDK2_PLATFORMS:$_EDK2_LIBC:$PWD" export WORKSPACE="${PWD}/workspace" GITCOMMIT="$(git describe --tags --always)"||GITCOMMIT="unknown" export GITCOMMIT diff --git a/sdm845Pkg/Library/StdLib b/sdm845Pkg/Library/StdLib new file mode 160000 index 0000000..40de116 --- /dev/null +++ b/sdm845Pkg/Library/StdLib @@ -0,0 +1 @@ +Subproject commit 40de116f18fbb1ac19acc06fabe598441d2488d8 -- 2.45.2