Commit 3e48427e authored by worstperson's avatar worstperson Committed by John Wu

Add support for the new NOOK_MAGIC

The new cmdline value that's been in use since Marshmallow
parent 31360c34
......@@ -124,7 +124,8 @@ int parse_img(const char *image, boot_img *boot) {
fprintf(stderr, "PXA_BOOT_HDR\n");
boot->hdr = malloc(sizeof(pxa_boot_img_hdr));
memcpy(boot->hdr, head, sizeof(pxa_boot_img_hdr));
} else if (memcmp(((boot_img_hdr*) head)->cmdline, NOOK_MAGIC, 12) == 0) {
} else if (memcmp(((boot_img_hdr*) head)->cmdline, NOOK_MAGIC, 12) == 0
|| memcmp(((boot_img_hdr*) head)->cmdline, NOOK_NEW_MAGIC, 26) == 0) {
boot->flags |= NOOK_FLAG;
fprintf(stderr, "NOOK_GREEN_LOADER\n");
head += NOOK_PRE_HEADER_SZ - 1;
......
......@@ -39,6 +39,7 @@ typedef enum {
#define SEANDROID_MAGIC "SEANDROIDENFORCE"
#define TEGRABLOB_MAGIC "-SIGNED-BY-SIGNBLOB-"
#define NOOK_MAGIC "Green Loader"
#define NOOK_NEW_MAGIC "eMMC boot.img+secondloader"
#define NOOK_PRE_HEADER_SZ 1048576
#define SUP_LIST ((char *[]) { "gzip", "xz", "lzma", "bzip2", "lz4", "lz4_legacy", NULL })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment