Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D9uO8-0002PO-LD for mharc-grub-devel@gnu.org; Fri, 11 Mar 2005 19:21:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D9uO6-0002Me-KW for grub-devel@gnu.org; Fri, 11 Mar 2005 19:21:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D9uLu-0001bP-0s for grub-devel@gnu.org; Fri, 11 Mar 2005 19:19:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9uLs-0001T4-4W for grub-devel@gnu.org; Fri, 11 Mar 2005 19:19:32 -0500 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D9tsa-0001fs-N2 for grub-devel@gnu.org; Fri, 11 Mar 2005 18:49:16 -0500 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 4E279FFC1FE0 for ; Sat, 12 Mar 2005 00:49:14 +0100 (CET) Received: from 127.0.0.1 ([127.0.0.1] helo=localhost) by ASSP-nospam ; 11 Mar 05 23:49:14 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sat, 12 Mar 2005 00:49:13 +0100 User-Agent: KMail/1.7.1 References: <423173E6.2070602@auto.ucl.ac.be> In-Reply-To: <423173E6.2070602@auto.ucl.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503120049.13873.okuji@enbug.org> Subject: Re: network support 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: Sat, 12 Mar 2005 00:21:51 -0000 On Friday 11 March 2005 11:33 am, Vincent Guffens wrote: > In grub legacy, there was this problem when compiling a lot of drivers > in. How do we avoid it here ? I was thinking that it could be possible > to use the lspci to find out the device id and initialize only the right > driver, but maybe it is not practical ? Is it done anywhere else like > that or do they probe the card by trying the iniliazation routine of the > driver ? Each driver should be one module. You can preload as many modules as you want with grub-mkimage. But I think you should not load all modules, because this might overflow the loaded memory region. Normally, it is safe to probe PCI devices, thanks to PCI IDs. So it should be enough to iterate all probing routines of device drivers, to detect a device. > Also, if we add a tftp command, what should we do with the downloaded > file. Maybe it would be convenient to have some kind of ramfs to be able > to copy the files there ? It should not be a command, but a network device should be associated with a GRUB device (say, nd0). The interface should be consistent between disk devices and network devices for the user. I don't think ramfs is useful. When you open a file, whether it is on a disk or a network, you read data to a buffer, don't you? > What should I do now ? It is not practical to send a patch as they are > many news files coming directly from etherboot. Would it be an idea to > have a new netboot branch in the cvs so that it would be possible to > experiment with it without breaking anything else ? Do not hesitate to break the code. Any piece of source code has bugs, anyway. Network support is divided into two parts: a network device framework and device drivers. The framework is more important at the moment, because it is not implemented. The current code has a template written by me, but we must design it seriously. The fundamental difference between disk devices and network devices is that disks consist of blocks and have unique filesystems, while network devices consist of paths and can support multiple filesystems at a time. So, unlike disks, the user must specify what protocol should be used to network devices, and the cache system must be differently implemented. The template code supposes that the user "bind"s a filesystem to a network device. I don't know if this is really good, but probably it is acceptable. The default filesystem should be tftp, because this is the most common for netbooting. The cache system would be designed to use the set of a network device identifier, a filesystem idenfier, a path and a starting offset as a key. Okuji