Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aP9n5-0001Kd-5R for mharc-grub-devel@gnu.org; Fri, 29 Jan 2016 09:12:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9my-0001KP-Vk for grub-devel@gnu.org; Fri, 29 Jan 2016 09:12:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aP9mv-0000Tc-Od for grub-devel@gnu.org; Fri, 29 Jan 2016 09:12:40 -0500 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:49542 helo=homiemail-a42.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9mv-0000TR-CN for grub-devel@gnu.org; Fri, 29 Jan 2016 09:12:37 -0500 Received: from homiemail-a42.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTP id 9D86168C05F for ; Fri, 29 Jan 2016 06:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=shealevy.com; h= mime-version:content-type:content-transfer-encoding:date:from:to :subject:in-reply-to:references:message-id; s=shealevy.com; bh=p o19MAOF350kgL0B6fqhh4s6TzY=; b=AqSecSRC9goxMhR5XOBCi8TdjNXNqiyUi tqHRRN/pXEtwW10bHFGWDEbhpCZ4jfIRkctNcY2ugBeuqF2YlmXKLva0wDcExsEh 8xMjW068NGNBI8gC/NtFljuJLRkBsn5Mq6weSe4/w0YKvKBQJn7D+2l3tvB2ruKJ 3BWxFsa7As= Received: from webmail.shealevy.com (caiajhbihbdd.dreamhost.com [208.97.187.133]) (Authenticated sender: shea@shealevy.com) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTPA id 7E06068C05D for ; Fri, 29 Jan 2016 06:12:34 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 29 Jan 2016 09:12:34 -0500 From: Shea Levy To: Subject: Re: [PATCH v2] Initial support for the android bootimg filesystem. In-Reply-To: References: <1cf383303135546a37c29c688f85327142ac55fc@atmail.dreamhost.com> <39de9fe252169e0cb83b1216667ea879e555a70c@atmail.dreamhost.com> Message-ID: <4e65ec6c24e6f28976d3458bdfcb9e15@shealevy.com> X-Sender: shea@shealevy.com User-Agent: Roundcube Webmail/0.8.2 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 208.113.200.129 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: Fri, 29 Jan 2016 14:12:46 -0000 On 2016-01-29 04:18, Andrei Borzenkov wrote: > On Fri, Jan 29, 2016 at 2:48 AM, wrote: >> Is it important that this go the "dedicated loader" route? It looks >> like >> quite a bit of work to abstract out the functionality of the "linux" >> and >> "initrd" commands in a way that enables reuse from other commands. >> > > "It needs work" is rather weak argument against doing something. > > Actually it is not that much work, at least for initial > implementation. You could use "anonymous" files that are instantiated > on the fly (see verify command for example how to do it); that needs > minimal changes to linux/initrd to split out front end part that > opens > files. All further processing would then be shared. > OK, will take this approach. > >> >> The main reason was that it wasn't clear how to easily reuse the >> code in the >> linux module to load the kernel and initrd; a secondary reason is to >> allow >> overriding the kernel command line or whatever provided in the >> bootimg. If > > Dealing with stored command line on grub shell level is not simpler > due to fun with word splitting and quoting. Working with it in C > would > be easier. But here again is the question if we can treat Android as > Linux. E.g. does Android support (or required to support) vga and mem > parameters? If not, this part is obviously redundant. > At least for android-x86 (the part I'm most familiar with), android is just a normal Linux as far as bootloading/command line is concerned. > > Nothing prevents Android command from supporting extra kernel > arguments that override stored command line. > >> there is a relatively straightforward path to fix the first one, >> though, I'm >> happy to do that and figure out ways to override later once the need >> actually arises, if ever. >> >> ~Shea >> >> >> >> ----- Original Message ----- >> From: >> "The development of GNU GRUB" >> >> To: >> "The development of GNU GRUB" >> Cc: >> "Shea Levy" >> Sent: >> Wed, 27 Jan 2016 10:22:34 +0300 >> Subject: >> Re: [PATCH v2] Initial support for the android bootimg filesystem. >> >> >> On Tue, Jan 26, 2016 at 10:42 PM, Shea Levy >> wrote: >>> Currently, the kernel and, if present, the ramdisk are made >>> available as >>> regular files. >> >> ... >>> + >>> +struct boot_img_hdr >>> +{ >>> + uint8_t magic[BOOT_MAGIC_SIZE]; >>> + >>> + uint32_t kernel_size; >>> + uint32_t kernel_addr; >>> + >>> + uint32_t ramdisk_size; >>> + uint32_t ramdisk_addr; >>> + >>> + uint32_t second_size; >>> + uint32_t second_addr; >>> + >>> + uint32_t tags_addr; >>> + uint32_t page_size; >>> + uint32_t unused[2]; >>> + >>> + uint8_t name[BOOT_NAME_SIZE]; >>> + >>> + uint8_t cmdline[BOOT_ARGS_SIZE]; >>> + >>> + uint32_t id[8]; >>> + >>> + uint8_t extra_cmdline[BOOT_EXTRA_ARGS_SIZE]; >>> +} GRUB_PACKED; >>> + >> >> What is the use case for exposing it as filesystem in the first >> place? >> Dedicated android loader that reads them looks more logical. >> >> Should this layout/content ever change in the future it will be near >> to impossible to modify without breaking unknown number of users >> relying on it; while simple >> >> android hd1,msdos4 >> >> can transparently handle any forward and backward compatibility >> without impacting existing grub.cfg. >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel