Patch: remove DB dependence of linux-2.4.9/drives/scsi/aic7xxx/aicasm

From: Adam J. Richter (adam@yggdrasil.com)
Date: Thu Aug 16 2001 - 23:22:20 EST


        First of all, thanks for the quick reply, Justin.

>> = Adam Richter
> = Justin Gibbs

>> Currently, building Justin Gibbs's otherwise excellent
>>aic7xxx driver requires the Berkeley DB library, because the
>>aic7xxx assembler that is used in the build process uses db
>>basically just to implement associative arrays in memory.
>
>You don't need to use the assembler. Compiled firmware is
>provided in every distrubution I've made, including the one
>in the 2.4.9 kernel. The default is to *not* build the
>firmware. Just make sure that you don't have this option
>inadvertantly turned on in your config and you should be happy.

        I understand, and that is helpful, but I want to build
everything from sources.

>A wise CS proff once said, "Smart programmers are lazy. They
>re-use stuff rather than write it over and over again." In this
>case, I was able to implement my symbol table in all of 5 mintues
>without the need to debug the code that implements its core. It
>may seem like overkill, but it allowed me to focus on the important
>things, like making the assembler useful. The assember dates from
>1995, which might explain why it uses the dbv1 interface.
>
>"If it ain't broke, don't fix it."

        That was probably a good use of your time, and those are
good reasons in the absense of arguments to the contrary. However,
in this case, there are arguments to the contrary, so it is a question
of which arguments outweigh the others. The arguments for accepting
a trival DB implementation (I'm not asking you to write it) are:

        1. It eliminates another dependence for doing a complete source build.

        2. It potentially eliminates a dependence on a GPL'ed library,
           a policy preference of at least one Linux distribution that I
           can think of (Debian), and probably a preference of some users.

        3. (New) it's a handy fallback in case somone finds a buggy
           DB implementation.

        Anyhow, I've done it. I have verified that the following
patch builds and produces the same aic7xxx_seq.h file, and produces
a aic7xxx_regs.h file that differs only in the order that the
"#define" statements are emitted (I checked by sorting both files and
seeing that the results were identical). The new trivialdb.{c,h} files
compile under gcc-3.0 without complaint, even with "-Wall".

        I ask that you please include this patch, and/or tell Linus that
you think it's OK to apply. If you don't like this patch, how about
using this patch, but with the "CONFIG_AICASM_TRIVALDB=y" line in
the Makefile commented out? That will produce the old behavior but
allow use of trivialdb.{c,h} by just uncommenting one line.

-- 
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:21 EST