Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LqTsN-0007dk-6A for mharc-grub-devel@gnu.org; Sun, 05 Apr 2009 11:03:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqTsK-0007de-RZ for grub-devel@gnu.org; Sun, 05 Apr 2009 11:03:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqTsF-0007dS-CA for grub-devel@gnu.org; Sun, 05 Apr 2009 11:03:07 -0400 Received: from [199.232.76.173] (port=40955 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqTsF-0007dP-7W for grub-devel@gnu.org; Sun, 05 Apr 2009 11:03:03 -0400 Received: from ti-out-0910.google.com ([209.85.142.191]:49098) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LqTsE-0003oK-8q for grub-devel@gnu.org; Sun, 05 Apr 2009 11:03:02 -0400 Received: by ti-out-0910.google.com with SMTP id y8so1468123tia.10 for ; Sun, 05 Apr 2009 08:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=j6G83uIJWQFF572OVDb+DjaX6+1iKP8u6/XLfnZdjrI=; b=cyDmUvkEz7Wkh79MWgghuliJgHQuq9XVj2+sXACfR2c3M5jWm/kolZEtZcS4CLHfIy 0+5phPZV1Mp2zvfW0zXKygXy5Yl91IrwL/+JllJHbBlDvw/jd231CEGNVgdUj0rV5yA2 kKBIXDLT2pOFqJOt2MSVk9CH+Cj4mx6pijGNs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=hghyqqTZdrzOdGyHnQDhRWwfG9OKeYUylZJlMcj+YGS8J1HHijaPT1U5+oTw6Bhn51 57/TAbOVafDiGSvyo9QhpJ5wlcbcQwnWrIwUKl+fCWHgpsrFQD1MzOXxo91hsSOXELbF wWqpabQ+Lr2f3e0ut/ZqrE7/o39fNvvymN2rU= MIME-Version: 1.0 Received: by 10.110.63.6 with SMTP id l6mr4998524tia.12.1238943779118; Sun, 05 Apr 2009 08:02:59 -0700 (PDT) In-Reply-To: <200904052333.02794.okuji@enbug.org> References: <200904040512.15522.okuji@enbug.org> <200904052333.02794.okuji@enbug.org> Date: Sun, 5 Apr 2009 23:02:59 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Split of normal mode (version 2) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2009 15:03:09 -0000 On Sun, Apr 5, 2009 at 10:33 PM, Yoshinori K. Okuji wrote: > On Saturday 04 April 2009 14:06:18 Bean wrote: >> One of the problem for normal.mod dependency is its side effect. For >> example, currently ls.mod depend on normal.mod just for >> grub_normal_print_device_info. If we want to embed ls.mod in core.img, >> we must embedded normal.mod as well, along with a lot of >> initialization actions that we may not want. > > Right, if we can completely merge the ls on rescue mode and that on normal > mode. For now, I am not sure if this is feasible, so I prefer to keep a poor > version of ls for rescue mode, which does not require functions in > normal.mod, until you prove that that is feasible. > Hi, Currently, this is implemented using priority list. The commands has a field that indicate its priority. For normal command, the value is 0, for extended command, it's 1. So if two version of ls is loaded, the extended ls would be used. All commands are in a unify set, so you can run normal commads/extended commands in either rescue or normal mode. >> We can generate a handler.lst by scanning source for >> grub_parser_register, etc, just like commands.lst: >> >> parser.sh: sh >> reader.normal: normal >> menu.textmenu: textmenu >> terminal_outout.gfxterm: gfxterm >> >> We can then read it in normal.mod and set the hooks for all handler >> classes. > > I like if you can merge all kinds of handlers this way, thus eliminating the > command.lst and the fs.lst. > > But I still think that having commands for parsers and menus, since you can > do: > > grub> sh /boot/grub/foo.sh > grub> textmenu > grub> gfxmenu > > They won't be very useful for most people, but could be useful for > development. Yeah, that's possible. We can register a generic command to do the task. -- Bean