EmbeddedPkg/AndroidBoot: boot android kernel from storage

Add an android kernel loader that could load kernel from storage
device.
This android boot image BDS add addtitional cmdline/dtb/ramfs
support besides kernel that is introduced by Android boot header.

This patch is derived from Haojian's code as below link.
https://patches.linaro.org/patch/94683/

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Jun Nie
2017-08-17 20:58:59 +08:00
committed by Leif Lindholm
parent ce13d2d8c8
commit fa74dd2217
8 changed files with 779 additions and 0 deletions

View File

@@ -55,4 +55,17 @@ typedef struct {
* and larger than boot header */
#define IS_VALID_ANDROID_PAGE_SIZE(Val) \
(IS_POWER_OF_2(Val) && (Val > sizeof(ANDROID_BOOTIMG_HEADER)))
EFI_STATUS
AndroidBootImgGetImgSize (
IN VOID *BootImg,
OUT UINTN *ImgSize
);
EFI_STATUS
AndroidBootImgBoot (
IN VOID *Buffer,
IN UINTN BufferSize
);
#endif /* __ABOOTIMG_H__ */