From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aVA2R-0005TR-Om for mharc-grub-devel@gnu.org; Sun, 14 Feb 2016 22:41:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVA2O-0005Pg-RV for grub-devel@gnu.org; Sun, 14 Feb 2016 22:41:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVA2J-0005nv-Rt for grub-devel@gnu.org; Sun, 14 Feb 2016 22:41:24 -0500 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:33426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVA2J-0005mu-KI for grub-devel@gnu.org; Sun, 14 Feb 2016 22:41:19 -0500 Received: by mail-lf0-x235.google.com with SMTP id m1so81613504lfg.0 for ; Sun, 14 Feb 2016 19:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=Fa067F+H+55B+eRFBLlhDu7vOgI7M8ebTRw++zA049E=; b=LqR/GyfOJrplP6O9r5nt5RDgD39+k7He22qjsrte7vyb4MXCKUiDARPXZEcJqQn5dp GIPG1DXqa6YSkRiTooLQCd6tBLej6XDZYpByhI0iQlxg/pyhu3QTmMdvTo+5Bfl8zA6D V6Ejj+eS6/luKWulaj3Y819UKO7gqL1Qan5hd7FcOMILCRFoRVA5pXqivjEOsfXrpoSs 1B3nm4QtL68PraPV08vlE8ipOZhjrS/MJNEEdgyJSGzC646ivq/2GUpDblQOY5bQGruY rcY1AXcUQB3UTXXbxd2xRDjLr0/2/9uCcKAxWSDaY38x0Gq1kbWk4bcBVheWQCGu4EED VEEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Fa067F+H+55B+eRFBLlhDu7vOgI7M8ebTRw++zA049E=; b=QP2qw/RjiiDe9bNGN0B323WDFTrEsUs5YrHoJPMU45GI+DTfu/Gb91AZDecbQ/o1MH wWfQlH8MABe9b23q4F50ovefFW5aTbWwcGcRM8I73u2KHiv8XPluHxRu6EALNCZHo0JU QDH1j/Ni8hFmUKqMEOZoi0c9QuDCpXjrI8k2He9WgkFZcnqSlMsPVPOP0OI5zG4vGYNO 2eU0yOxfTm92LzlGp9zycwJZRW5FWa43fNykoMDFXkP3h1lRFGyNF8xKzfdiAExHcoqT wTBLrRSJSbrIbUs+bleVv6rxk/CTfovArgaFr2nxb2NDRwf+JIZQP0ynjeXgLcpmXA3V v42g== X-Gm-Message-State: AG10YOTEfu1Y7wsqvZG8AvjXTHWMH8bcPJ7EbRPEK0ElFSBvmUEpPvNvlPE9UONCdcFmvg== X-Received: by 10.25.205.7 with SMTP id d7mr5763116lfg.70.1455507678695; Sun, 14 Feb 2016 19:41:18 -0800 (PST) Received: from [192.168.1.41] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id ot1sm3365490lbb.26.2016.02.14.19.41.17 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Feb 2016 19:41:17 -0800 (PST) Subject: Re: [PATCH v3 2/3] i386: Add support for loading from android bootimg To: grub-devel@gnu.org References: <1454964459-28213-1-git-send-email-shea@shealevy.com> <1454964459-28213-3-git-send-email-shea@shealevy.com> <56BE1B60.5060900@gmail.com> <7384a36941a77cced1fde7e3d084280a@shealevy.com> <2b7ecf3a0dda2687029878e0e745bd73@shealevy.com> <56BE4BB7.6040203@gmail.com> <68B03F79-6B46-4AEA-A573-9782E56BADE3@oracle.com> From: Andrei Borzenkov Message-ID: <56C148DC.8020305@gmail.com> Date: Mon, 15 Feb 2016 06:41:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <68B03F79-6B46-4AEA-A573-9782E56BADE3@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 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, 15 Feb 2016 03:41:26 -0000 14.02.2016 23:58, Seth Goldberg пишет: > > >> On Feb 14, 2016, at 5:26 AM, Vladimir 'phcoder' Serbinenko >> wrote: >> >> >> >> Le dim. 14 févr. 2016 14:21, Shea Levy a écrit >> : >>> This patch uses grub_file_open, but the android bootimg is a >>> disk, not a file. You mentioned something about file_offset_open, >>> but that also expects an input file, not a disk. Should I modify >>> your patch with my code I wrote to create a grub_file_t from an >>> android_bootimg disk device, or is there another approach? >> >> We already have syntax (hd0,1)+ that we use for >> i.a. chainloader perhaps we should extend it to have (hd0,1)+ >> meaning whole disk as file? Or even allow the disk to be opened >> with GRUB_file_open? I'd like a second opinion on this. Andrei, >> what do you think? > > I think syntax that allows a whole disk to be specified (e.g. To the > multiboot module command so a disk image can be passed that way) is a > great idea. > The problem is that "whole" disk may not have define length which in turn means quite a lot of rewrite everywhere (most loaders assume that file they get has size and this size is what they load). I assume you do know in advance whether you have file or device. In which case what about extending probe to return size and do probe --set size --size $dev multiboot ($dev)+$size