From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EZmaD-0006sb-Kc for mharc-grub-devel@gnu.org; Wed, 09 Nov 2005 04:49:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EZma5-0006rp-Py for grub-devel@gnu.org; Wed, 09 Nov 2005 04:49:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EZma1-0006r9-Ir for grub-devel@gnu.org; Wed, 09 Nov 2005 04:49:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZmPa-0006Iu-7C for grub-devel@gnu.org; Wed, 09 Nov 2005 04:38:36 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EZmPZ-0001QD-6f for grub-devel@gnu.org; Wed, 09 Nov 2005 04:38:33 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 270F5821A for ; Wed, 9 Nov 2005 10:38:31 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 27188-07 for ; Wed, 9 Nov 2005 10:38:30 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 4E003820A for ; Wed, 9 Nov 2005 10:38:30 +0100 (CET) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 20121C047 for ; Wed, 9 Nov 2005 10:38:30 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <87wtjibufi.fsf@student.han.nl> <1097.62.240.162.34.1131522142.squirrel@drak.ucw.cz> From: Marco Gerards Date: Wed, 09 Nov 2005 10:38:32 +0100 In-Reply-To: <1097.62.240.162.34.1131522142.squirrel@drak.ucw.cz> (=?iso-8859-2?Q?Tom=E1=B9?= Ebenlendr's message of "Wed, 9 Nov 2005 08:42:22 +0100 (CET)") Message-ID: <87ek5qw487.fsf@student.han.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: Generating init and fini functions 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: Wed, 09 Nov 2005 09:49:27 -0000 Tom=E1=B9 Ebenlendr writes: >> +cat <> +/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! = */ >> +/* >> + * GRUB -- GRand Unified Bootloader >> + * Copyright (C) 2002 Free Software Foundation, Inc. > > Copyright of autogenerated file... I think 2005 should be there also... You are right, I will go over all files to have a look at the copyright date before committing. >> + * > ... >> + cat grub_modules_init.lst > > This file (grub_modules_init.lst) is used to determine order of modules? > I don't understand following lines, I only know, this may be (or may be > not and should be), how dependecies between modules are solved. It contains all C files with a GRUB_MOD_INIT call. When generating the C files for the initializations, I filter out the relevant statements. >> + for i in $*; do >> + echo $i':' >> + done >> +) | sort -r | uniq -d -W1 -t':' | sed -n '/GRUB_MOD_INIT >> *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_init >> ();/;p;}' >> + > ... >> + cat grub_modules_init.lst >> + for i in $*; do >> + echo $i':' >> + done >> +) | sort -r | uniq -d -W1 -t':' | sed -n '/GRUB_MOD_INIT >> *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_fini > > I think GRUB_MOD_FINI should be here... What I did is making the assumption that whenever GRUB_MOD_INIT occurs, a GRUB_MOD_FINI is in the same file with the same name. In that case this is an easier and faster solution. > I do not proofread the modules ... When you read one, you read them all I guess. > (the .rmk file seems to be good) > > When loading modules dynamicaly dependecies between symbols orders them > such that the required module is loaded and INITIALIZED first. I think, > here it is not the case. I know that such dependency handling will be > complicated (unless we compile grub also and use the file moddep.lst or > how it is called...) True. It's not an issue at the moment because no modules depends on the initialization of another module. So I don't think it is a problem now. This code is for utils like grub-emu that just have to do the initialization. So the most important thing here is that this is not about real modules, but just about the initialization of the modules. Please tell me if you think there is a real problem. -- Marco