diff options
author | Raghavendra Rao Ananta <rananta@codeaurora.org> | 2019-12-09 14:20:41 -0800 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2022-12-20 23:39:28 +0530 |
commit | eff506802b40a4eec0c51ec75577121615a61e11 (patch) | |
tree | b87093b7cd88e94c25bf1cee104735b1e0ca867c | |
parent | ce49689a727ede2e4ed7831596fdfb86800a5651 (diff) |
QcomModulePkg: Add IsBuildUseRecoveryAsBoot() support
Define the IsBuildUseRecoveryAsBoot() function to dynamically
determine if the boot.img has packaged ramdisk-recovery.img. This
is needed to make decisions at runtime to boot into recovery, or
to boot into normal mode.
Change-Id: Ieeb49637cbc1b6442f8bfe470517944e8677e84e
-rw-r--r-- | QcomModulePkg/Include/Library/BootLinux.h | 1 | ||||
-rw-r--r-- | QcomModulePkg/Library/BootLib/BootLinux.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/QcomModulePkg/Include/Library/BootLinux.h b/QcomModulePkg/Include/Library/BootLinux.h index c048af925a..45b101d3ae 100644 --- a/QcomModulePkg/Include/Library/BootLinux.h +++ b/QcomModulePkg/Include/Library/BootLinux.h @@ -208,6 +208,7 @@ LaunchApp (IN UINT32 Argc, IN CHAR8 **Argv); BOOLEAN TargetBuildVariantUser (VOID); BOOLEAN IsLEVariant (VOID); BOOLEAN IsBuildAsSystemRootImage (VOID); +BOOLEAN IsBuildUseRecoveryAsBoot (VOID); EFI_STATUS GetImage (CONST BootInfo *Info, VOID **ImageBuffer, diff --git a/QcomModulePkg/Library/BootLib/BootLinux.c b/QcomModulePkg/Library/BootLib/BootLinux.c index 26044d234d..9d5d452a3a 100644 --- a/QcomModulePkg/Library/BootLib/BootLinux.c +++ b/QcomModulePkg/Library/BootLib/BootLinux.c @@ -1798,6 +1798,18 @@ BOOLEAN IsBuildAsSystemRootImage (VOID) } #endif +#ifdef BUILD_USES_RECOVERY_AS_BOOT +BOOLEAN IsBuildUseRecoveryAsBoot (VOID) +{ + return TRUE; +} +#else +BOOLEAN IsBuildUseRecoveryAsBoot (VOID) +{ + return FALSE; +} +#endif + VOID ResetBootDevImage (VOID) { |