From: BigfootACA Date: 星期一, 7 Feb 2022 14:08:37 +0000 (+0800) Subject: build.sh: add --uart X-Git-Tag: v2.0rc1~26 X-Git-Url: https://git.renegade-project.org/?a=commitdiff_plain;h=99790615072ab115d0fa543fe196364a6718401c;p=edk2-sdm845.git build.sh: add --uart --- diff --git a/build.sh b/build.sh index 9cdd382..1d71de7 100755 --- a/build.sh +++ b/build.sh @@ -41,6 +41,7 @@ function _help(){ echo " --chinese, -c: use github.com.cnpmjs.org for submodule cloning." echo " --release MODE, -r MODE: Release mode for building, default is 'RELEASE', 'DEBUG' alternatively." echo " --toolchain TOOLCHAIN: Set toolchain, default is 'GCC5'." + echo " --uart, -u: compile with UART support, print debug messages to uart debug port." 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." @@ -77,6 +78,7 @@ function _build(){ -p "sdm845Pkg/Devices/${DEVICE}.dsc" \ -b "${_MODE}" \ -D FIRMWARE_VER="${GITCOMMIT}" \ + -D USE_UART="${USE_UART}" \ ||return "$?" gzip -c \ < "workspace/Build/sdm845Pkg/${_MODE}_${TOOLCHAIN}/FV/SDM845PKG_UEFI.fd" \ @@ -110,9 +112,10 @@ CHINESE=false CLEAN=false DISTCLEAN=false TOOLCHAIN=GCC5 +USE_UART=0 export OUTDIR="${PWD}" export GEN_ACPI=false -OPTS="$(getopt -o t:d:hacACDO:r: -l toolchain:,device:,help,all,chinese,acpi,clean,distclean,outputdir:,release: -n 'build.sh' -- "$@")"||exit 1 +OPTS="$(getopt -o t:d:hacACDO:r:u -l toolchain:,device:,help,all,chinese,acpi,uart,clean,distclean,outputdir:,release: -n 'build.sh' -- "$@")"||exit 1 eval set -- "${OPTS}" while true do case "${1}" in @@ -125,6 +128,7 @@ do case "${1}" in -O|--outputdir)OUTDIR="${2}";shift 2;; -r|--release)MODE="${2}";shift 2;; -t|--toolchain)TOOLCHAIN="${2}";shift 2;; + -u|--uart)USE_UART=1;shift;; -h|--help)_help 0;shift;; --)shift;break;; *)_help 1;; diff --git a/sdm845Pkg/sdm845Pkg.dsc b/sdm845Pkg/sdm845Pkg.dsc index dfb2316..2150c15 100644 --- a/sdm845Pkg/sdm845Pkg.dsc +++ b/sdm845Pkg/sdm845Pkg.dsc @@ -33,10 +33,10 @@ DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf -!if $(TARGET) != RELEASE +!if $(USE_UART) == 1 SerialPortLib|sdm845Pkg/Library/QcomGeniSerialPortLib/QcomGeniSerialPortLib.inf !else - SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf + SerialPortLib|sdm845Pkg/Library/FrameBufferSerialPortLib/FrameBufferSerialPortLib.inf !endif RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf @@ -61,7 +61,7 @@ # # Secure Boot dependencies # - + # Cryptographic libraries RngLib|MdePkg/Library/DxeRngLib/DxeRngLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -151,7 +151,7 @@ # Make VariableRuntimeDxe work at emulated non-volatile variable mode. # gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE - + gsdm845PkgTokenSpaceGuid.PcdMipiFrameBufferAddress|0x9d400000 gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 @@ -200,13 +200,13 @@ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf - -!if $(TARGET) != RELEASE + +!if $(TARGET) != RELEASE MdeModulePkg/Universal/SerialDxe/SerialDxe.inf !endif MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf - + ArmPkg/Drivers/ArmGic/ArmGicDxe.inf ArmPkg/Drivers/TimerDxe/TimerDxe.inf