Skip to Content.
Sympa Menu

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

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: [BL] Compiling with upgraded BL3 was Re: CNet NIC problems
  • Date: Tue, 22 Dec 2009 00:25:09 +0000 (UTC)

On Mon, 21 Dec 2009, baslinux AT lists.ibiblio.org wrote:

There are some other packages you should upgrade to compile with - see the
BL site and/or archives.
I couldn't find them, could you be a little more specific?

The BL1 site linked to BL3 site lists what you need for BL1 (libc5, Slackware 3 or 4) but the packages are different for Slackware 8.1.
Steven, can you list them at the BL3 site as a link?
It took me a long time for find the info again.

For Slackware 7 you need egcs or gcc, binutils, gmake, linuxinc and glibc.

Slackware 8.1 (which uses long file names and bigger packages) uses gcc*2.95.3*.tgz, binutils*.tgz, make*.tgz, kernel-headers*.tgz, and glibc* make-3.79.1*tgz


I'd love to be able to compile my own stuff - after all, I'm sure
you'd be sick of compiling for me at some point =P

I owe a LOT of help. Other people compiled all sorts of stuff for BL and for me personally.


I've downloaded the 2.4.31 kernel source now. I've configured
successfully, but make modules gives the following errors:

Make: /bin/pwd: Command not found

pwd is in busybox (big surprise).

Many of the other busybox commands are already linked to /bin but
this was omitted.

ln -sf /bin/busybox /bin/pwd
(if it is /bin/busybox - I forget where BL3 busybox resides.)

AC @Ac @gcc -Wall-prototypes -O2 -fomit-frame-pointer -o
scripts/split-include scripts/split-include.c
scripts/split-include.c:22: sys/types.h: No such file or directory
scripts/split-include.c:23: sys/stat.h: No such file or directory
scripts/split-include.c:25: ctype.h: No such file or directory
scripts/split-include.c:26: error.h: No such file or directory
scripts/split-include.c:27: fcntl.h: No such file or directory
scripts/split-include.c:28: stdio.h: No such file or directory
scripts/split-include.c:29: stdlib.h: No such file or directory
scripts/split-include.c:30: string.h: No such file or directory
scripts/split-include.c:31: unistd.h: No such file or directory
make: *** [scripts/split-include] Error 1

I have a /usr/include/linux-2.4.31/include/linux/string.h and ctype.h but not error.h or fntctl.h of stdio.h or sys/types.h.

When I compile I do 'make config' and 'make dep' and 'make bzImage' and 'make modules' in that order. I don't know how to compile just one module or if you need the other steps first. You could try skipping the make bzImage (kernel) step. It can take 20 min at 200MHz.

Try upgrading binutils etc. and then compile again, doing all the above.
Make dep might tell the compiler where to look for things.
(But I don't even find the files you are missing, on my computer).

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

Could this have something to do with the other packages you were
talking about? Or the errors in make?

Maybe. Upgrade and try again. Slackware 4 probably does not even include iptables (in ipv4), so probably you are missing some pieces.

I don't understand how compiling works, just try to follow instructions and blunder through. I had help getting started.

make consults Makefile and instructs gcc what to do.
Smaller programs can just be compiled CLI with gcc.
C++ programs need an additional library (cxx or cpp).


What do you use ip_tables for?  I have never set up a server.  Can you
explain the basic theory?

ip_tables.o is a requirement for iptables, which is a seperate
program. Iptables allows you to set rules for incoming/outgoing
packets, and is often used as a firewall. For example, you could say
that if the incoming package is on port 80, accept it, else drop it.
It is very flexible, and I intend to use it for NAT. NAT is a system
where a lot of computers on a private net can get the same IP on the
internet - most people have it build into a small router box which
handles most of the network stuff.


There was a long discussion about using BL3 this way.

Search the archives on ipchains or 'gateway between two laptops'.
circa 2008. iptables replaced ipchains in kernel 2.4 (you had a choice of both). SW41 does not have iptables, only ipchains.

Steven worked out a very simple solution that let me share my dialup connection between two computers.

See gw-on and ip-on scripts at my site, which use ipchains and set default gateway. I also posted ipchains-glibc21.gz - unzip and rename it ipchains. My vsp desktop kernel has the ipchains driver compiled in already so you don't need ipchains.o. So does the BL3 'big' kernel.

3c59x is my NIC module. Substitute your NIC module(s).

ip-on

Run on the gateway ('big' or bare.i kernel or my 2.4.31 bzimavsp.431),
and gw-on on other computers (different IP number for each - 2, 3, etc.)

echo 1 > /proc/sys/net/ipv4/ip_forward
insmod 3c59x
ifconfig eth0 192.168.1.1
ipchains -P forward DENY
ipchains -A forward -s 192.168.1.0/24 -j MASQ


gw-on

insmod 3c59x
ifconfig eth0 192.168.1.2
route add default gw 192.168.1.2

Sindi


Archive powered by MHonArc 2.6.24.

Top of Page