Hi,
i have updated my wrt54gs with my own build openwrt, and wanted to add shfs kernel module to it....
so i modified the Makefile for shfs like THAT:
ndef KERNEL
KERNEL=2.4.20
endif
#ifndef MODULESDIR
#MODULESDIR=${ROOT}/lib/modules/${KERNEL}
#endif
ifndef KERNEL_SOURCES
KERNEL_SOURCES=/root/tmp/buildroot/build_mipsel/linux
endif
ifeq (${MODVERSIONS},detect)
ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0)
MODVERSIONS=yes
endif
endif
ifeq (${MODVERSIONS},yes)
MVER=-DMODVERSIONS -DEXPORT_SYMTAB
endif
LINVER=linux-${KERNEL}
ALL_TARGETS := shfs.o
#SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/
SEARCHDIRS := -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/
CC=mipsel-linux-uclibc-gcc
LD=mipsel-linux-uclibc-ld
#CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX
CFLAGS = -static -DUSE_UCLIBC -Llib -lc -nostdlib -DCROSS_COMPILE -fno-common -mips2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE -D__KERNEL__ -DLINUX
#LINKER := ld
LINKER = mipsel-linux-uclibc-ld
LDFLAGS = -r
LOADLIBES :=
all: ${ALL_TARGETS}
%.o: %.c $(wildcard *.h)
${CC} ${CFLAGS} -c $< -o $@
shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
tidy:
${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
---> further lines are only compile rules ....
and it compiles without problems .... but insmod on openwrt gives THAT back:
Using ./shfs.o
insmod: unresolved symbol atomic_sub_return
insmod: unresolved symbol memchr
insmod: unresolved symbol strcmp
insmod: unresolved symbol atomic_add
insmod: unresolved symbol strcpy
insmod: unresolved symbol strncpy
insmod: unresolved symbol atomic_add_return
insmod: unresolved symbol _gp_disp
insmod: unresolved symbol strncmp
Please help me, shfs is a really cool thing for mounting anything you have a shell on !
Cant be that difficult to find this mistake ...
Thanks !
Simon