Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aSsj8-0000TZ-Pc for mharc-grub-devel@gnu.org; Mon, 08 Feb 2016 15:48:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSsj5-0000SL-WC for grub-devel@gnu.org; Mon, 08 Feb 2016 15:48:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSsj5-0001VM-4H for grub-devel@gnu.org; Mon, 08 Feb 2016 15:48:03 -0500 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:45490 helo=homiemail-a91.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSsj4-0001Ue-VG for grub-devel@gnu.org; Mon, 08 Feb 2016 15:48:03 -0500 Received: from homiemail-a91.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a91.g.dreamhost.com (Postfix) with ESMTP id 7FFB2AE072; Mon, 8 Feb 2016 12:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=shealevy.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=shealevy.com; bh=RvxUKyaxGkTaXzesaeXvmBvJkWY=; b=hSFh4eYG1biWMH20jtJAdFD4TUTM l8w4c3xCJ5eSW1s65Vono1T34FYdE+h92Y6diPPvyZzxlJ6WeZiCGcWqmIhundy7 UnTGAhhc7YZkxSW3QCEX3fAwTDcGle6w0yBoEyanBB1pxO5aG0WnpOC5QULRNIpv pxOTlKQeTsYCwTE= Received: from shlevy-laptop.hsd1.nh.comcast.net. (c-73-186-74-217.hsd1.nh.comcast.net [73.186.74.217]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: shea@shealevy.com) by homiemail-a91.g.dreamhost.com (Postfix) with ESMTPSA id 24769AE059; Mon, 8 Feb 2016 12:47:59 -0800 (PST) From: Shea Levy To: The development of GNU GRUB Subject: [PATCH v3 3/3] Add support for loading initrd from android bootimg Date: Mon, 8 Feb 2016 15:47:39 -0500 Message-Id: <1454964459-28213-4-git-send-email-shea@shealevy.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454964459-28213-1-git-send-email-shea@shealevy.com> References: <1454964459-28213-1-git-send-email-shea@shealevy.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 208.113.200.129 Cc: Shea Levy X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2016 20:48:05 -0000 --- grub-core/loader/linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c index be6fa0f..4c5537a 100644 --- a/grub-core/loader/linux.c +++ b/grub-core/loader/linux.c @@ -4,6 +4,7 @@ #include #include #include +#include struct newc_head { @@ -199,7 +200,11 @@ grub_initrd_init (int argc, char *argv[], newc = 0; } grub_file_filter_disable_compression (); - initrd_ctx->components[i].file = grub_file_open (fname); + if (grub_memcmp (fname, "android_bootimg:", sizeof "android_bootimg:" - 1) == 0) + grub_android_bootimg_load_initrd (fname + sizeof "android_bootimg:" - 1, + &initrd_ctx->components[i].file); + else + initrd_ctx->components[i].file = grub_file_open (fname); if (!initrd_ctx->components[i].file) { grub_initrd_close (initrd_ctx); -- 2.7.0