aboutsummaryrefslogtreecommitdiffstats
path: root/package/shfs/patches
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-04-09 02:28:00 +0000
committerNicolas Thill <nico@openwrt.org>2005-04-09 02:28:00 +0000
commit80111df18a8085265176e364769e39d43a985c48 (patch)
tree17cedf7ac223003e267be07f4d87f6e747476821 /package/shfs/patches
parentc22623df04bc18017ed70a285a43d23319e94984 (diff)
downloadupstream-80111df18a8085265176e364769e39d43a985c48.tar.gz
upstream-80111df18a8085265176e364769e39d43a985c48.tar.bz2
upstream-80111df18a8085265176e364769e39d43a985c48.zip
Add shfs package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@593 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/shfs/patches')
-rw-r--r--package/shfs/patches/101-kmod-build.patch103
-rw-r--r--package/shfs/patches/102-utils-build-fixes.patch40
2 files changed, 143 insertions, 0 deletions
diff --git a/package/shfs/patches/101-kmod-build.patch b/package/shfs/patches/101-kmod-build.patch
new file mode 100644
index 0000000000..635900472d
--- /dev/null
+++ b/package/shfs/patches/101-kmod-build.patch
@@ -0,0 +1,103 @@
+--- shfs-0.35-orig/shfs/Linux-2.4/Makefile 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35-2/shfs/Linux-2.4/Makefile 2005-04-09 02:34:35.000000000 +0200
+@@ -1,3 +1,17 @@
++#
++# the original Makefile was trashed and replaced by this one
++# The main reason is that loadable modules should be built with
++# the same compile flags the kernel was built with, so we'd better
++# let the kernel tree build the module for us, like that :
++#
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install
++#
++#
++# $(TOPDIR)/lib/string.o is needed at link time because the memchr function
++# is not exported on mips (insmod: unresolved symbol memchr)
++#
++
+ ifndef KERNEL
+ KERNEL=$(shell uname -r)
+ endif
+@@ -10,67 +24,30 @@
+ KERNEL_SOURCES=${MODULESDIR}/build
+ 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/
++all: all-y
+
+-CC := gcc
+-CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX
+-LINKER := ld
+-LDFLAGS = -r
+-LOADLIBES :=
++O_TARGET := shfs.o
+
+-all: ${ALL_TARGETS}
++shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+
+-%.o: %.c $(wildcard *.h)
+- ${CC} ${CFLAGS} -c $< -o $@
++obj-y := $(shfs-objs)
++obj-m := $(O_TARGET)
+
+-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
+-
+-clean: tidy patch-clean
+- ${RM} shfs.o
++-include $(TOPDIR)/Rules.make
+
++all-y:
++ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules
++
+ install: shfs.o
+ rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o
+ install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+ uninstall:
+ rm -rf ${MODULESDIR}/kernel/fs/shfs
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+-patch:
+- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER};
+- for i in Documentation fs/shfs include/linux; do \
+- mkdir -p ${LINVER}/$$i; \
+- done
+- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation
+- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs
+- cp -r ${LINVER} ${LINVER}.orig
+- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/
+- cp shfs.h shfs_fs* ${LINVER}/include/linux/
+- (cd ${LINVER}; patch -p1 <../kernel-config.diff)
+- find . -type f -name "*.orig" -print | xargs rm -f
+- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true
+-
+-patch-clean:
+- rm -rf ${LINVER} ${LINVER}.orig;
+- rm -f ${LINVER}.diff
+-
+-.PHONY : all tidy clean install uninstall patch patch-clean
++clean:
++ rm -f core *.o *.a *.s
++
++shfs.o: $(shfs-objs)
++ $(LD) -r -o $@ $(shfs-objs) $(TOPDIR)/lib/string.o
++
diff --git a/package/shfs/patches/102-utils-build-fixes.patch b/package/shfs/patches/102-utils-build-fixes.patch
new file mode 100644
index 0000000000..affce43570
--- /dev/null
+++ b/package/shfs/patches/102-utils-build-fixes.patch
@@ -0,0 +1,40 @@
+--- shfs-0.35-orig/shfsmount/Makefile 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35-2/shfsmount/Makefile 2005-04-09 01:27:22.000000000 +0200
+@@ -2,15 +2,16 @@
+ SHFS_VERSION=unknown
+ endif
+
+-SHFSMOUNT := /usr/bin/shfsmount
+-SHFSUMOUNT := /usr/bin/shfsumount
++SHFSMOUNT := /usr/sbin/shfsmount
++SHFSUMOUNT := /usr/sbin/shfsumount
+
+ ALL_TARGETS := shfsmount shfsumount
+
+ SEARCHDIRS := -I- -I. -I../shfs/Linux-2.4/
+
+ CC := gcc
+-CFLAGS = -g -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\"
++OFLAGS = -g
++CFLAGS = $(OFLAGS) -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\"
+
+ LINKER := gcc
+ LDFLAGS =
+@@ -40,12 +41,12 @@
+
+
+ install: shfsmount shfsumount
+- install -m755 -b -D shfsmount ${ROOT}${SHFSMOUNT}
+- install -m755 -b -D shfsumount ${ROOT}${SHFSUMOUNT}
+- if [ ! -d ${ROOT}/sbin ]; then mkdir ${ROOT}/sbin; fi
+- ln -fs ${SHFSMOUNT} ${ROOT}/sbin/mount.shfs
++ install -m755 -D shfsmount ${ROOT}${SHFSMOUNT}
++ install -m755 -D shfsumount ${ROOT}${SHFSUMOUNT}
++ if [ ! -d ${ROOT}/usr/sbin ]; then mkdir ${ROOT}/usr/sbin; fi
++ ln -fs ${SHFSMOUNT} ${ROOT}/usr/sbin/mount.shfs
+
+ uninstall:
+- rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/sbin/mount.shfs
++ rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/usr/sbin/mount.shfs
+
+ .PHONY : all tidy clean install uninstall