sdm845Pkg: Library: add simple-init
authorBigfootACA <bigfoot@classfun.cn>
星期五, 27 Aug 2021 05:54:04 +0000 (13:54 +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/CommonDsc.dsc.inc
sdm845Pkg/Devices/845.fdf
sdm845Pkg/Library/SimpleInit [new submodule]

index 131affff94734b5b80df7b80ca4ab03f87b9dbd6..51362eedb0e26ca56a127c2379fcb9c7567d7859 100644 (file)
@@ -13,3 +13,6 @@
 [submodule "sdm845Pkg/Library/StdLib"]
        path = sdm845Pkg/Library/StdLib
        url = https://github.com/tianocore/edk2-libc.git
+[submodule "sdm845Pkg/Library/SimpleInit"]
+       path = sdm845Pkg/Library/SimpleInit
+       url = https://github.com/BigfootACA/simple-init.git
index 21a35d7a4a42198e51fe566312091ec102e23286..676a6b09e6a0c41bd08a8d65ac17b1da4d30d57d 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -134,11 +134,20 @@ then      set -e
                git submodule init;git submodule update
                git checkout .gitmodules
                popd
+               pushd sdm845Pkg/Library/SimpleInit
+               git submodule set-url libs/lvgl     https://hub.fastgit.org/lvgl/lvgl.git
+               git submodule set-url libs/lodepng  https://hub.fastgit.org/lvandeve/lodepng.git
+               git submodule set-url libs/freetype https://hub.fastgit.org/freetype/freetype.git
+               git submodule init;git submodule update
+               popd
                git checkout .gitmodules
        else    git submodule init;git submodule update --depth 1
                pushd edk2
                git submodule init;git submodule update
                popd
+               pushd sdm845Pkg/Library/SimpleInit
+               git submodule init;git submodule update
+               popd
        fi
        set +e
 fi
@@ -160,19 +169,30 @@ do        if [ -n "${i}" ]&&[ -d "${i}/Platform" ]
                break
        fi
 done
+for i in "${SIMPLE_INIT}" sdm845Pkg/Library/SimpleInit ./simple-init ../simple-init
+do     if [ -n "${i}" ]&&[ -f "${i}/SimpleInit.inc" ]
+       then    _SIMPLE_INIT="$(realpath "${i}")"
+               break
+       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"
+[ -n "${_SIMPLE_INIT}" ]||_error "SimpleInit 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:$_EDK2_LIBC:$PWD"
+export PACKAGES_PATH="$_EDK2:$_EDK2_PLATFORMS:$_EDK2_LIBC:$_SIMPLE_INIT:$PWD"
 export WORKSPACE="${PWD}/workspace"
 GITCOMMIT="$(git describe --tags --always)"||GITCOMMIT="unknown"
 export GITCOMMIT
 echo > ramdisk
 set -e
 python3 assets/generate-logo.py "${GITCOMMIT}"
+mkdir -p "${_SIMPLE_INIT}/build"
+bash "${_SIMPLE_INIT}/scripts/gen-rootfs-source.sh" \
+       "${_SIMPLE_INIT}" \
+       "${_SIMPLE_INIT}/build"
 if [ "${DEVICE}" == "all" ]
 then   E=0
        for i in "${DEVICES[@]}"
index da55e3e7064db1489edc131eacae4a758fbe75cd..ea4414296d4a8deaf824de8483f4f398696e62a8 100644 (file)
@@ -14,6 +14,7 @@
 #
 
 !include MdePkg/MdeLibs.dsc.inc
+!include sdm845Pkg/Library/SimpleInit/SimpleInit.inc
 
 [LibraryClasses.common]
 !if $(TARGET) == RELEASE
index 3adc7619abdd7b0e2d8cb8ef6073a09de188f908..1f7d4f74b29f021ec803e2e465d33eb952400ed2 100644 (file)
@@ -572,6 +572,10 @@ APRIORI DXE {
   INF MdeModulePkg/Application/UiApp/UiApp.inf
   INF sdm845Pkg/Drivers/LogoDxe/LogoDxe.inf
 
+  #
+  # Simple Init GUI
+  #
+  INF src/main/SimpleInitMain.inf
 
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 8
diff --git a/sdm845Pkg/Library/SimpleInit b/sdm845Pkg/Library/SimpleInit
new file mode 160000 (submodule)
index 0000000..02b63b6
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 02b63b617ba4490ade4dcbfad30f4b0369394a46