From a5cd46c442dd207a20d7729d3c0a4b20ac95f4e7 Mon Sep 17 00:00:00 2001
From: Sophon <strongtz@yeah.net>
Date: Sat, 22 Jan 2022 23:43:17 +0800
Subject: [PATCH] Drop Qualcomm Mass Storage App

An entry to the new BuiltinLinuxKrl will be added to SimpleInit later
---
 sdm845Pkg/Binary                                          | 2 +-
 sdm845Pkg/Devices/845.fdf                                 | 2 --
 sdm845Pkg/Devices/beryllium.fdf                           | 1 -
 sdm845Pkg/Devices/dipper.fdf                              | 2 --
 sdm845Pkg/Devices/enchilada.fdf                           | 2 --
 sdm845Pkg/Devices/fajita.fdf                              | 1 -
 sdm845Pkg/Devices/m1892.fdf                               | 2 --
 sdm845Pkg/Devices/odin.fdf                                | 2 --
 sdm845Pkg/Devices/perseus.fdf                             | 2 --
 sdm845Pkg/Devices/polaris.fdf                             | 1 -
 sdm845Pkg/Devices/trident.fdf                             | 1 -
 sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c     | 8 +-------
 .../PlatformBootManagerLib/PlatformBootManagerLib.inf     | 1 -
 sdm845Pkg/sdm845Pkg.dec                                   | 1 -
 sdm845Pkg/sdm845Pkg.dsc                                   | 2 --
 15 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/sdm845Pkg/Binary b/sdm845Pkg/Binary
index 8ef0c1c..b3a69de 160000
--- a/sdm845Pkg/Binary
+++ b/sdm845Pkg/Binary
@@ -1 +1 @@
-Subproject commit 8ef0c1c3f33bac3423482561f553cfb5321ce36d
+Subproject commit b3a69de2d3eec03d1055b5a79f4d92e5fff889fc
diff --git a/sdm845Pkg/Devices/845.fdf b/sdm845Pkg/Devices/845.fdf
index 6916b76..2bda0f5 100644
--- a/sdm845Pkg/Devices/845.fdf
+++ b/sdm845Pkg/Devices/845.fdf
@@ -566,8 +566,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
-
   #
   # Bds
   #
diff --git a/sdm845Pkg/Devices/beryllium.fdf b/sdm845Pkg/Devices/beryllium.fdf
index c7bf33c..075b15f 100644
--- a/sdm845Pkg/Devices/beryllium.fdf
+++ b/sdm845Pkg/Devices/beryllium.fdf
@@ -563,7 +563,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
   INF sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf
 
   #
diff --git a/sdm845Pkg/Devices/dipper.fdf b/sdm845Pkg/Devices/dipper.fdf
index ed2fcc1..d313cc4 100644
--- a/sdm845Pkg/Devices/dipper.fdf
+++ b/sdm845Pkg/Devices/dipper.fdf
@@ -554,8 +554,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
-
   #
   # Bds
   #
diff --git a/sdm845Pkg/Devices/enchilada.fdf b/sdm845Pkg/Devices/enchilada.fdf
index 5043089..7a56bf0 100644
--- a/sdm845Pkg/Devices/enchilada.fdf
+++ b/sdm845Pkg/Devices/enchilada.fdf
@@ -575,8 +575,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-
-  INF sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
   INF sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf
 
 
diff --git a/sdm845Pkg/Devices/fajita.fdf b/sdm845Pkg/Devices/fajita.fdf
index 18536ce..8fa49e0 100644
--- a/sdm845Pkg/Devices/fajita.fdf
+++ b/sdm845Pkg/Devices/fajita.fdf
@@ -579,7 +579,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
   INF sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf
 
   #
diff --git a/sdm845Pkg/Devices/m1892.fdf b/sdm845Pkg/Devices/m1892.fdf
index 5b7ee96..a9abeff 100644
--- a/sdm845Pkg/Devices/m1892.fdf
+++ b/sdm845Pkg/Devices/m1892.fdf
@@ -572,8 +572,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
-
   #
   # Bds
   #
diff --git a/sdm845Pkg/Devices/odin.fdf b/sdm845Pkg/Devices/odin.fdf
index 8990db6..d82112e 100644
--- a/sdm845Pkg/Devices/odin.fdf
+++ b/sdm845Pkg/Devices/odin.fdf
@@ -553,8 +553,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
-
   #
   # Bds
   #
diff --git a/sdm845Pkg/Devices/perseus.fdf b/sdm845Pkg/Devices/perseus.fdf
index 2ca88e7..f74c2fd 100644
--- a/sdm845Pkg/Devices/perseus.fdf
+++ b/sdm845Pkg/Devices/perseus.fdf
@@ -553,8 +553,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
-
   #
   # Bds
   #
diff --git a/sdm845Pkg/Devices/polaris.fdf b/sdm845Pkg/Devices/polaris.fdf
index 2524c05..db350ce 100644
--- a/sdm845Pkg/Devices/polaris.fdf
+++ b/sdm845Pkg/Devices/polaris.fdf
@@ -561,7 +561,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
   INF sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf
 
   #
diff --git a/sdm845Pkg/Devices/trident.fdf b/sdm845Pkg/Devices/trident.fdf
index b15ee84..4acccd3 100644
--- a/sdm845Pkg/Devices/trident.fdf
+++ b/sdm845Pkg/Devices/trident.fdf
@@ -571,7 +571,6 @@ APRIORI DXE {
   INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-  INF  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
 
   #
   # Bds
diff --git a/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c b/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c
index 60b85a1..cd91f73 100644
--- a/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c
@@ -682,18 +682,12 @@ VOID EFIAPI PlatformBootManagerAfterConsole(VOID)
   PlatformRegisterFvBootOption(
       &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE);
 
-  //
-  // Register Qualcomm Mass Storage App
-  //
-  PlatformRegisterFvBootOption(
-      &gUsbfnMsdAppFileGuid, L"UEFI Mass Storage", LOAD_OPTION_ACTIVE);
-
 #ifdef BUILTIN_LINUX_TEST
   //
   // Register Built-in Linux Kernel
   //
   PlatformRegisterFvBootOption(
-      &gBuiltinLinuxKrlFileGuid, L"Linux Mass Storage", LOAD_OPTION_ACTIVE);
+      &gBuiltinLinuxKrlFileGuid, L"USB Attached SCSI (UAS) Storage", LOAD_OPTION_ACTIVE);
 #endif
 
 #ifdef AB_SLOTS_SUPPORT
diff --git a/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 7fdfd80..9dcfbf5 100644
--- a/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -77,7 +77,6 @@
   gEfiEndOfDxeEventGroupGuid
   gEfiTtyTermGuid
   gUefiShellFileGuid
-  gUsbfnMsdAppFileGuid
   gBuiltinLinuxKrlFileGuid
   gSwitchSlotsAppFileGuid
   gSimpleInitFileGuid
diff --git a/sdm845Pkg/sdm845Pkg.dec b/sdm845Pkg/sdm845Pkg.dec
index ff95c44..12ebcf5 100644
--- a/sdm845Pkg/sdm845Pkg.dec
+++ b/sdm845Pkg/sdm845Pkg.dec
@@ -45,7 +45,6 @@
   gEfiMemCardInfoProtocolGuid       = { 0x85c1f7d2, 0xbce6, 0x4f31, { 0x8f, 0x4d, 0xd3, 0x7e, 0x03, 0xd0, 0x5e, 0xaa } }
 
 [Guids]
-  gUsbfnMsdAppFileGuid                = { 0x1C207232, 0x4086, 0x9BE7, { 0xDB, 0x16, 0x15, 0x9D, 0x66, 0xAB, 0x46, 0x6A } }
   gSwitchSlotsAppFileGuid             = { 0xD5BC0FB1, 0xA833, 0x4607, { 0xB7, 0xB6, 0x5E, 0xF9, 0xD1, 0x0B, 0xEE, 0xB7 } }
   gSimpleInitFileGuid                 = { 0x6D77B2BB, 0x69EB, 0x42AB, { 0xBE, 0xCF, 0x4F, 0x40, 0xC8, 0x95, 0x68, 0xC3 } }
   gBuiltinLinuxKrlFileGuid            = { 0x2a24787e, 0xe09c, 0x43ce, { 0xb5, 0xcf, 0xd0, 0x30, 0x66, 0xf6, 0x09, 0x2f } }
diff --git a/sdm845Pkg/sdm845Pkg.dsc b/sdm845Pkg/sdm845Pkg.dsc
index 2e38eab..8faeece 100644
--- a/sdm845Pkg/sdm845Pkg.dsc
+++ b/sdm845Pkg/sdm845Pkg.dsc
@@ -342,6 +342,4 @@
   ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
 !endif #$(INCLUDE_TFTP_COMMAND)
 
-
-  sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
   sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf
-- 
2.47.1