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

Bridge utilities



Has anyone successfully used the network bridge with the 100LX/100LX MCM?  I
am trying to port the bridge utilities(brctl and libbridge) so I can
configure the bridge on the devboard82.  I keep getting "relocation
truncated to fit: R_CRIS_8 no symbol" My current Makefile for brctl is this:

AXIS_USABLE_LIBS = GLIBC UCLIBC
include $(APPS)/Rules.elinux

INCLUDE=-I../libbridge
LIBS= -L ../libbridge -lbridge

INSTDIR		= $(prefix)/bin/
INSTMODE	= 0755
INSTOWNER	= root
INSTGROUP	= root

common_SOURCES= brctl_cmd.c brctl_disp.c
brctl_SOURCES=  brctl.c $(common_SOURCES)
brctld_SOURCES= brctld.c $(common_SOURCES)

common_OBJECTS= $(common_SOURCES:.c=.o)
brctl_OBJECTS= $(brctl_SOURCES:.c=.o)
brctld_OBJECTS= $(brctld_SOURCES:.c=.o)

OBJECTS= $(common_OBJECTS) $(brctl_OBJECTS) $(brctld_OBJECTS)

PROGRAMS= brctl brctld


all:	$(PROGRAMS)

install: $(PROGRAMS)
	mkdir -p $(INSTDIR)
	$(INSTALL) -m 755 $(PROGRAMS) $(INSTDIR)

brctl:	$(brctl_OBJECTS)
	$(CC) $(brctl_OBJECTS) $^ $(LIBS) -o brctl

brctld:	$(brctld_OBJECTS)
	$(CC) $(brctld_OBJECTS) $^ $(LIBS) -o brctld

%.o: %.c brctl.h
	$(CC) $(CFLAGS) $(INCLUDE) -c $<

clean:
			rm -f *.o
			rm -f brctl
			rm -f brctld
			rm -f core



This is what seems to be giving me the problem.  My Makefile for the
libbridge appears to be working, but I am not sure if this is correct
either.

AXIS_USABLE_LIBS = GLIBC UCLIBC
include $(APPS)/Rules.elinux

INSTDIR		= $(prefix)/bin/
INSTMODE	= 0755
INSTOWNER	= root
INSTGROUP	= root

includedir=$(prefix)/include
libdir=$(prefix)/lib

CFLAGS += -D_POSIX_VERSION

COMPAT_SOURCES=  libbridge_compat.c

libbridge_SOURCES= \
	$(COMPAT_SOURCES) \
	libbridge_devif.c \
	libbridge_if.c \
	libbridge_init.c \
	libbridge_misc.c

libbridge_OBJECTS=$(libbridge_SOURCES:.c=.o)

all:	libbridge.a


install: libbridge.a
	mkdir -p $(includedir)
	install -m 644 libbridge.h $(includedir)
	mkdir -p $(libdir)
	install -m 644 libbridge.a $(libdir)

clean:
	rcsclean *
	rm -f *~
	rm -f *.o
	rm -f libbridge.a

libbridge.a:	$(libbridge_OBJECTS)
	ar rcs $@ $(libbridge_OBJECTS)
	$(RANLIB) $@

%.o: %.c libbridge.h libbridge_private.h
	$(CC) $(CFLAGS) $(INCLUDE) -c $<

libbridge_compat.o:	libbridge_compat.c if_index.c
	$(CC) $(CFLAGS) -c libbridge_compat.c

Any help would be appreciated.

Thanks,

Eric Lane