(testing)Add built-in mainline Linux kernel
authorSophon <strongtz@yeah.net>
星期三, 19 Jan 2022 10:13:39 +0000 (18:13 +0800)
committerSophon <strongtz@yeah.net>
星期三, 19 Jan 2022 10:13:39 +0000 (18:13 +0800)
The built-in Linux kernel will automatically set up USB
Mass Storage gadget. Bootconsole (efifb) is currently
enabled for debugging.
Only tested on polaris.

Signed-off-by: Sophon <strongtz@yeah.net>
Linux kernel and initrd by
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
sdm845Pkg/Binary
sdm845Pkg/Devices/polaris-8g.dsc
sdm845Pkg/Devices/polaris.dsc
sdm845Pkg/Devices/polaris.fdf
sdm845Pkg/Library/PlatformBootManagerLib/PlatformBm.c
sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
sdm845Pkg/sdm845Pkg.dec
sdm845Pkg/sdm845Pkg.dsc

index 38c7c37133d5d2c2117c5b674379f44920ec7ed3..82296a90c9296f1686d87f9fe33409c34faff91c 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 38c7c37133d5d2c2117c5b674379f44920ec7ed3
+Subproject commit 82296a90c9296f1686d87f9fe33409c34faff91c
index 2346f07920fa946c5acd524ef0b83b1277bf0753..4301f3852665cd9579681cbb4bc2f2b4716d4be5 100644 (file)
@@ -12,7 +12,7 @@
 !include sdm845Pkg/sdm845Pkg.dsc
 
 [BuildOptions.common]
-  GCC:*_*_AARCH64_CC_FLAGS = -DXIAOMI_PIL_FIXED=1 -DMEMORY_8G=1 -DDISPLAY_DPI=440 -DENABLE_SIMPLE_INIT
+  GCC:*_*_AARCH64_CC_FLAGS = -DXIAOMI_PIL_FIXED=1 -DMEMORY_8G=1 -DDISPLAY_DPI=440 -DENABLE_SIMPLE_INIT -DBUILTIN_LINUX_TEST=1
 
 [PcdsFixedAtBuild.common]
   # System Memory (7GB)
index 233bc771218865d60558854a2a974f11e031cb47..54f08dbb92ba0e86171e1c4cf0635471f5514e92 100644 (file)
@@ -12,7 +12,7 @@
 !include sdm845Pkg/sdm845Pkg.dsc
 
 [BuildOptions.common]
-  GCC:*_*_AARCH64_CC_FLAGS = -DXIAOMI_PIL_FIXED=1 -DDISPLAY_DPI=440 -DENABLE_SIMPLE_INIT
+  GCC:*_*_AARCH64_CC_FLAGS = -DXIAOMI_PIL_FIXED=1 -DDISPLAY_DPI=440 -DENABLE_SIMPLE_INIT -DBUILTIN_LINUX_TEST=1
 
 [PcdsFixedAtBuild.common]
   # System Memory (5GB)
index 0e03239c55ae22609ad1984a932718a5b99e0ff3..2524c05131ecbb12d51deaed253183bec3020ce5 100644 (file)
@@ -562,6 +562,7 @@ APRIORI DXE {
 !endif #$(INCLUDE_TFTP_COMMAND)\r
 \r
   INF sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf\r
+  INF sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf\r
 \r
   #\r
   # Bds\r
index baf8c9116c4f0d40028b5c09be4b99a9f459d6b0..60b85a11cf06be52fb66fdc3475f5e1b4758788c 100644 (file)
@@ -683,10 +683,18 @@ VOID EFIAPI PlatformBootManagerAfterConsole(VOID)
       &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE);
 
   //
-  // Register Mass Storage App
+  // Register Qualcomm Mass Storage App
   //
   PlatformRegisterFvBootOption(
-      &gUsbfnMsdAppFileGuid, L"Mass Storage", LOAD_OPTION_ACTIVE);
+      &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);
+#endif
 
 #ifdef AB_SLOTS_SUPPORT
   //
index c67d83f2ad5df456ffffc5a89627cbce775bc3fc..7fdfd8097b79504cd21c0e5f20fe0d9e9e0b2398 100644 (file)
@@ -78,6 +78,7 @@
   gEfiTtyTermGuid
   gUefiShellFileGuid
   gUsbfnMsdAppFileGuid
+  gBuiltinLinuxKrlFileGuid
   gSwitchSlotsAppFileGuid
   gSimpleInitFileGuid
 
index 3fca7eebdef58b2124f076f63d8e0913bfa088d6..ff95c444e90039a08a854f03c957d3214b49848b 100644 (file)
@@ -48,6 +48,7 @@
   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 } }
 
 [PcdsFixedAtBuild.common]
   # Simple FrameBuffer
index a549f45bcc06a0735fb0cab94fa43e427a6f733d..2e38eabd9a16b5bccb9ecd425d217cea8f8aecc3 100644 (file)
 
 
   sdm845Pkg/Binary/845/UsbfnMsdApp/UsbfnMsdApp.inf
+  sdm845Pkg/Binary/845/BuiltinLinuxKrl/BuiltinLinuxKrl.inf