[BL] Compiling with upgraded BL3 was Re: CNet NIC problems

baslinux at lists.ibiblio.org baslinux at lists.ibiblio.org
Tue Dec 22 01:25:39 EST 2009


> Okay, I could make dep now, but I can't make modules or make bzImage -
> they pretty much give me the same error.


make menuconfig first and set it to make IP_TABLES as a module.

make menuconfig
make clean
make dep
make modules

The Makefile is telling it to compile each module with a long list of 
-fno-strict-aliasing etc but I suppose I could have copied over one such 
line and made just one module that way.


http://keesan.freeshell.org/bl/2.4.31/ip_tables.o

>>> Nevertheless, I found ip_tables.c and tried to compile it, which
>>>
>>> throws several pages of errors at me, ending in the following:
>>>
>>> ip_tables.c:1849: parse error before
>>> 'this_object_must_be_defined_as_export_objs_in_the_Makefile'
>>> ip_tables.c:1849: warning: data definition has ny type or storage class

Compile it as above, not singly with gcc unless you know more than I do.

> Well, that's sort of the problem: There is no instructions for
> ip_tables.c, and finding anything online is hard because 99% of all
> distros seem to ship with it.

I don't normally make kernel modules one at a time, just by the above 
procedure which usually works.

You could use a kernel and modules to match from some other distro.

> Iptables is in slackware 8
> (ftp://ftp.slackware-brasil.com.br/slackware-8.0/slakware/n1/iptables.tgz),
> and I am able to install it, however if I try to do anything, I get
> the following error:
>
> iptables v1.2.2: can't initialize iptables table 'filter': iptables
> who? (do you need to insmod?)
> Perhaps iptables or your kernel needs to be upgraded.

No, you need to insmod ip_tables.o into my kernel.  It might need other 
things compiled in too.  Poke around in the kernel source documentation. 
ip_tables.c is also in kernel source.  You don't need to download it from 
some place else - newer versions might not compile for SW81 anyway.

My kernel needs the module because it was not compiled with iptables 
support.  It was compiled with ipchains support built in.
You can read my kernel config file confvsp.431 and search on IP_TABLES
and IP_CHAINS.  'is not set' means no support for a feature.  Y is built 
in and M is module.

You don't upgrade kernels, you recompile them to support different things.
The distros have larger kernels than BL.

> This, and the fact that the only listed requirement for iptables is
> ip_tables.o, leads me to believe that ip_tables is the only thing I'm
> missing. If you could compile it, it'd be great, so I can at least be
> sure that's what's missing.

Try the one I posted and if no luck, read the manual.

And look in kernel source first for modules that will compile with the gcc 
from the same version of SW.

Very few BL users ever compile anything for BL.  You are braver than most.
Individuals have contributed mutt, timidity, lynx, mplayer, minihttpd....
When you get good at this try to compile for libc5 (either figure out how 
to point the compiler at libc5 or set up a separate partition with BL3 and 
no upgrades).  And uclibc-static.

Sindi



More information about the BasLinux mailing list