Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Lnw2K-0004Xb-Kg for mharc-grub-devel@gnu.org; Sun, 29 Mar 2009 10:30:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lnw2J-0004XO-Rz for grub-devel@gnu.org; Sun, 29 Mar 2009 10:30:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lnw2F-0004Ww-HF for grub-devel@gnu.org; Sun, 29 Mar 2009 10:30:55 -0400 Received: from [199.232.76.173] (port=34734 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lnw2F-0004Wt-8I for grub-devel@gnu.org; Sun, 29 Mar 2009 10:30:51 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:18412) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lnw2E-0005b9-IW for grub-devel@gnu.org; Sun, 29 Mar 2009 10:30:51 -0400 Received: by ti-out-0910.google.com with SMTP id y8so1077958tia.10 for ; Sun, 29 Mar 2009 07:30:48 -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=7kFJJiCQUNwACafut34xPcTf34P2tfHdguOrxfW0W1A=; b=A7HOWVntaiY/zLd99rF3OkSieuTVd7T7SfYY3H9kl7NM0qenVpOhKhSkiWVXRuI0Q1 b5uFXqDXc5erfs/fWA5+eWhg1kY65Ll8RYHWMapGSLVGxWTni71n7p4ZC46jUVukfcAt cTY9piDnyNJ1J2tpOyCj5kj5apF31pefgTCS4= 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=ERf9W1BjHpZ9K4Ll6soITqPHsgLKKpBqD2QMI0DmS3+NCef4fT5+aPlBhOWeaVv+Co AXKn99P/FdOiYFK3CpJqp6kkLIDY4uyBBLLlpHAUoJfkCTayanz6Lilxz2V6wl/ScxIx Y7piLPL/X0a3MkwPU4B8pg0zFeTXqjwo4JRJo= MIME-Version: 1.0 Received: by 10.110.10.16 with SMTP id 16mr6726396tij.10.1238337048631; Sun, 29 Mar 2009 07:30:48 -0700 (PDT) In-Reply-To: <200903292320.38804.okuji@enbug.org> References: <200903292210.34870.okuji@enbug.org> <200903292320.38804.okuji@enbug.org> Date: Sun, 29 Mar 2009 22:30:48 +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 the normal mode 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, 29 Mar 2009 14:30:56 -0000 On Sun, Mar 29, 2009 at 10:20 PM, Yoshinori K. Okuji wrote: >> >> 2, Speaking of linux, it's actually doing the same thing. The kernel >> >> is in vmlinuz, while the initialization script is in initrd.img. We >> >> don't want the user to enter those commands manually, a default >> >> boot.cfg should be used by grub-mkimage. >> > >> > Mmh, I hardly agree on this. The purpose of initrd.img is, although it >> > could be abused, to bootstrap an OS environment for further work, which >> > is analogous to core.img in GRUB. For the rest of the work, ifplugd, >> > udev, etc. take care of loading appropriate modules on demand. >> >> Sometime we need to setup the environment before it can access boot >> media. For example, locating the boot partition using label/uuid, >> setting the network address, etc, this is where boot.cfg can be quite >> useful. > > If you use a label, label support should be loaded automatically. > If you use an uuid, uuid support should be loaded automatically. > If you set up a network, network support should be loaded automatically. > > So I see no reason to stop automatic loading. But how to store the parameters ? Boot media is not available, so we can't read file, and we can't embed them in code. > >> >> 3. Currently, the structure of normal.mod just mix things together to >> >> a point that make modification difficult, if not impossible. For >> >> example, the current bash script engine is not quite suitable for gui >> >> interaction. With the split mode, we could develop a new parser >> >> without interfere with existing function. >> > >> > I prefer that you replace the existing code with a better implementation >> > in this case. From my point of view, fancy menu support is a key feature >> > in GRUB, thus if the current engine is not good enough, we need to >> > improve it rather than to provide an alternative. >> >> If I were to fix this problem, I'd separate parser and reader code >> anyway. In fact, colin already separate the menu viewer code. The >> problem is to still keep them in a single normal.mod, or to move them >> to logical independent modules. I see no problem with the later. > > Views can be separete. I don't deny this. But the scripting engine itself > should stay in normal mode. What is wrong with this? The script engine is quite large, if we put them all in normal.mod, it'd be messy. -- Bean