Add support for building DSDT using MS asl with wine
authorSophon <strongtz@yeah.net>
星期三, 19 Jan 2022 02:33:36 +0000 (10:33 +0800)
committerSophon <strongtz@yeah.net>
星期三, 19 Jan 2022 02:33:36 +0000 (10:33 +0800)
Signed-off-by: Sophon <strongtz@yeah.net>
build.sh
sdm845Pkg/AcpiTables

index b971e98c1de828d06e4b3a01828318bbb6cc7202..e1a662293dd1efaf28de38fb49db1793f2988b79 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -40,7 +40,7 @@ function _help(){
        echo "  --all, -a:               build all devices."
        echo "  --chinese, -c:           use Fastgit for submodule cloning."
        echo "  --release MODE, -r MODE: Release mode for building, default is 'RELEASE', 'DEBUG' alternatively."
-       echo "  --acpi, -A:              compile acpi. (not implemented yet)"
+       echo "  --acpi, -A:              compile DSDT using MS asl with wine"
        echo "  --clean, -C:             clean workspace and output."
        echo "  --distclean, -D:         clean up all files that are not in repo."
        echo "  --outputdir, -O:         output folder."
@@ -59,8 +59,8 @@ function _build(){
        [ -d "${WORKSPACE}" ]||mkdir "${WORKSPACE}"
        set -x
        make -C "${_EDK2}/BaseTools"||exit "$?"
-       if "${GEN_ACPI}" && ! iasl -ve "sdm845Pkg/AcpiTables/${DEVICE}/Dsdt.asl"
-       then echo "iasl failed with ${?}" >&2;return 1
+       if "${GEN_ACPI}" && ! (cd sdm845Pkg/AcpiTables/${DEVICE}/ && wine ../bin/asl-x64.exe Dsdt.asl && cd ../../..)
+       then echo "asl build failed. Have you installed wine?" >&2;return 1
        fi
        # based on the instructions from edk2-platform
        rm -f "${OUTDIR}/boot-${DEVICE}.img" uefi_img "uefi-${DEVICE}.img.gz" "uefi-${DEVICE}.img.gz-dtb"
index 8f1e956bc4122642bb930ee88695fe524a1a8373..c6978f6f7787b90be3f9ad452e0601add80b9b6b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 8f1e956bc4122642bb930ee88695fe524a1a8373
+Subproject commit c6978f6f7787b90be3f9ad452e0601add80b9b6b