Be quiet!
authorXilin Wu <strongtz@yeah.net>
星期四, 10 Jun 2021 09:21:56 +0000 (17:21 +0800)
committerBigfootACA <bigfoot@classfun.cn>
星期五, 2 Jul 2021 08:30:14 +0000 (16:30 +0800)
Make TARGET default to RELEASE
Disable InMemorySerialPortLib and FrameBufferSerialPortLib when TARGET == RELEASE

Signed-off-by: Xilin Wu <strongtz@yeah.net>
build.sh
sdm845Pkg/sdm845Pkg.dsc

index b023fdcf3fd5d0d2d8d9a088650533d1440ae354..8ad4c142f1d563460efcbb1be771ea4242cd24fa 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -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"
index f5de0b26b5d232992a9ca95c5ca01b948cee5bdb..bb953601dbddf180d411bb4c423017df437e0c09 100644 (file)
   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
 
   # 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
   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