On Tue, Feb 14, 2017 at 03:51:03PM +0800, Haojian Zhuang wrote:
On 10 February 2017 at 23:57, Leif Lindholm leif.lindholm@linaro.org wrote:
On Thu, Feb 09, 2017 at 10:11:50PM +0800, Haojian Zhuang wrote:
Add the platform boot manager to boot Android Fastboot.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
OpenPlatformPkg.dec | 1 + .../Library/PlatformBootManagerLib/PlatformBm.c | 485 +++++++++++++++ .../Library/PlatformBootManagerLib/PlatformBm.h | 59 ++ .../PlatformBootManagerLib.inf | 88 +++ .../Library/PlatformBootManagerLib/QuietBoot.c | 680 +++++++++++++++++++++ 5 files changed, 1313 insertions(+) create mode 100644 Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c create mode 100644 Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.h create mode 100644 Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf create mode 100644 Platforms/Hisilicon/Library/PlatformBootManagerLib/QuietBoot.c
diff --git a/OpenPlatformPkg.dec b/OpenPlatformPkg.dec index 2db143d..e82b4d4 100644 --- a/OpenPlatformPkg.dec +++ b/OpenPlatformPkg.dec @@ -39,5 +39,6 @@ [PcdsFixedAtBuild] ## Indicates the size in MB for RAM disk. gOpenPlatformTokenSpaceGuid.PcdRamDiskMaxSize|0|UINT32|0x00000001
- gOpenPlatformTokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x00000002
[PcdsFeatureFlag] diff --git a/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c b/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c new file mode 100644 index 0000000..03b764d --- /dev/null +++ b/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c @@ -0,0 +1,485 @@ +/** @file
- Implementation for PlatformBootManagerLib library class interfaces.
From ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
Like the fastboot duplication, this also looks like a lot of opportunity for unifying into a common version.
It looks to me like the only differences from the original are:
- Deleting code specific to PCI systems.
- Deleting the Connect() function (unused with PCI bits gone).
- Updating EFI_D_ to DEBUG_ in order to keep PatchCheck.py happy.
- A call to PlatformRegisterFvBootOption().
Ard: would you be happy for us to start introducing a few compile-time settings that would let this platform just reuse the ArmPkg Platform boot manager?
I have one question on BootNext. Does it mean that I have to update BootNext variable in platform boot manager? Could I update BootNext variable out of platform boot manager?
Yes, that could make sense. If there is not an easier way of doing it.
In HiKey, we detect GPIO pins to determine boot to either android fastboot app or grub.
Yes, that sounds like an excellent input for a boot policy. I'd be happy to put some hooks into the common on to support boot mode detection.
/ Leif