grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] Improve genmoddep.awk


From: Bean
Subject: Re: [PATCH 1/3] Improve genmoddep.awk
Date: Wed, 1 Jul 2009 13:22:29 +0800

On Wed, Jul 1, 2009 at 12:51 PM, Pavel Roskin<address@hidden> wrote:
> Quoting Bean <address@hidden>:
>
>> Perhaps you could also take a look at my previous patch
>>
>> [PATCH] Use symbol database to maintain module dependence
>>
>> It add a program grub-symdb to maintain symbol database and therefore
>> eliminate def- and unf- files, it also allows incremental build.
>
> grub-symdb would need to be compiled by a native C compiler.  Otherwise, it
> won't work when cross-compiling the utilities.
>
> It's not that it's a big deal per se, but it is will add complexity if we
> try to use autoconf to look for it.
>
> Adding grub-symdb to bin_UTILITIES would result in it being installed along
> with the utilities that are actually used after the build.  I think it's
> wrong.  Temporary build tools don't belong there.

Hi,

Actually, that's the intention. grub-symdb and the symbol database is
supposed to be installed in the target system. They can be used to
support external grub modules. To install new package, we can just
copy the modules files and use rerun grub-symdb to update the
database.

>
> I think awk is a better choice than native C, as it's assumed to be
> available on the build system.  I could rewrite genmoddep.awk in shell
> script, if we want to eliminate awk from the build.  But I'm not sure every
> shell would handle the needed amount of environment variables to emulate
> arrays.  And it would be almost certainly slower.
>
> The awk script could be changed to run nm and to parse output of different
> kinds on nm.  We could probably remove another Apple hack from the makefiles
> by having awk do the parsing.

With grub-symdb, there is no need to relied on nm, I think this would
make it more portable.

>
> I think we could specify the dependencies manually and have the script check
> them rather than generate them.  That would mean that no dependencies will
> be created unknowingly.  Chances are it will allow more incremental builds.

With the build system, there is a lot of unnecessary rebuilds, as it
relies on a central moddep.lst:

pre-*.o => moddep.lst => mod-*.c => *.mod

As you can see, modification to any source file would cause all the
modules files to be rebuild. Although for most of them, it's only the
trunk, but there is still a lot of necessary work.

-- 
Bean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]