Be quiet!

Make TARGET default to RELEASE
Disable InMemorySerialPortLib and FrameBufferSerialPortLib when TARGET == RELEASE

Signed-off-by: Xilin Wu <strongtz@yeah.net>
This commit is contained in:
Xilin Wu 2021-06-10 17:21:56 +08:00 committed by BigfootACA
parent 9685b58895
commit ce5bdabbd3
2 changed files with 13 additions and 2 deletions

View File

@ -53,8 +53,8 @@ function _build(){
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"
build -s -n 0 -a AARCH64 -t GCC5 -p "sdm845Pkg/Devices/${DEVICE}.dsc"||return "$?"
gzip -c < workspace/Build/sdm845Pkg/DEBUG_GCC5/FV/SDM845PKG_UEFI.fd > "workspace/uefi-${DEVICE}.img.gz"||return "$?"
build -s -n 0 -a AARCH64 -t GCC5 -p "sdm845Pkg/Devices/${DEVICE}.dsc" -b RELEASE||return "$?"
gzip -c < workspace/Build/sdm845Pkg/RELEASE_GCC5/FV/SDM845PKG_UEFI.fd > "workspace/uefi-${DEVICE}.img.gz"||return "$?"
cat "workspace/uefi-${DEVICE}.img.gz" "device_specific/${DEVICE}.dtb" > "workspace/uefi-${DEVICE}.img.gz-dtb"||return "$?"
abootimg --create "${OUTDIR}/boot-${DEVICE}.img" -k "workspace/uefi-${DEVICE}.img.gz-dtb" -r ramdisk||return "$?"
echo "Build done: ${OUTDIR}/boot-${DEVICE}.img"

View File

@ -33,7 +33,12 @@
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
!if $(TARGET) != RELEASE
SerialPortLib|sdm845Pkg/Library/InMemorySerialPortLib/InMemorySerialPortLib.inf
!else
SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
!endif
RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
@ -56,7 +61,10 @@
# SimpleFbDxe
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
!if $(TARGET) != RELEASE
SerialPortLib|sdm845Pkg/Library/FrameBufferSerialPortLib/FrameBufferSerialPortLib.inf
!endif
PlatformBootManagerLib|sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
MemoryInitPeiLib|sdm845Pkg/Library/MemoryInitPeiLib/PeiMemoryAllocationLib.inf
PlatformPeiLib|sdm845Pkg/Library/PlatformPeiLib/PlatformPeiLib.inf
@ -167,7 +175,10 @@
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
!if $(TARGET) != RELEASE
MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
!endif
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf