sdm845Pkg: Library: add edk2-libc as StdLib
authorBigfootACA <bigfoot@classfun.cn>
星期四, 26 Aug 2021 16:08:21 +0000 (00:08 +0800)
committerBigfootACA <bigfoot@classfun.cn>
星期一, 13 Sep 2021 03:49:18 +0000 (11:49 +0800)
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
.gitmodules
build.sh
sdm845Pkg/Library/StdLib [new submodule]

index 7b659265d7345a1963cde054f6efca12ce6abd04..131affff94734b5b80df7b80ca4ab03f87b9dbd6 100644 (file)
@@ -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
index 3a5330008980e92fe5a46cfcf641f96ebc55f4c4..21a35d7a4a42198e51fe566312091ec102e23286 100755 (executable)
--- 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 (submodule)
index 0000000..40de116
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 40de116f18fbb1ac19acc06fabe598441d2488d8