diff options
author | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2005-01-14 19:53:48 +0000 |
---|---|---|
committer | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2005-01-14 19:53:48 +0000 |
commit | eb58ba04e02ae24fe01debb64c1edd6e96d12810 (patch) | |
tree | 654e184d6dc708fd4ec005bced777c5bb8e35058 /packages | |
parent | 8758c420d31de08695b946a8e11921ff2cff6b7b (diff) |
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded
2005/01/14 13:53:47-06:00 ti.com!kergoth
Clean up the unionfs modules build to use the KERNEL_OBJECT_SUFFIX variable.
2005/01/14 13:40:24-06:00 ti.com!kergoth
Fix the unionfs modules to build and install correctly when building for 2.6.
BKrev: 41e8234cp9Vrd2hKjFkWoeegw6g0JA
Diffstat (limited to 'packages')
-rw-r--r-- | packages/unionfs/unionfs-1.0.7/make.patch | 98 | ||||
-rw-r--r-- | packages/unionfs/unionfs-modules.inc | 23 | ||||
-rw-r--r-- | packages/unionfs/unionfs-modules_1.0.7.bb | 4 |
3 files changed, 125 insertions, 0 deletions
diff --git a/packages/unionfs/unionfs-1.0.7/make.patch b/packages/unionfs/unionfs-1.0.7/make.patch index e69de29bb2..583947e82f 100644 --- a/packages/unionfs/unionfs-1.0.7/make.patch +++ b/packages/unionfs/unionfs-1.0.7/make.patch @@ -0,0 +1,98 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- unionfs-1.0.7/Makefile~make.patch ++++ unionfs-1.0.7/Makefile +@@ -3,10 +3,20 @@ + # + + # this should point to where your kernel headers are +-LINUXSRC = /lib/modules/`uname -r`/build ++KERNELVER := $(shell uname -r) ++KERNELMAJVER := $(shell echo ${KERNELVER} | cut -d. -f1,2) ++LINUXSRC = /lib/modules/${KERNELVER}/build + TOPINC = -I${LINUXSRC}/include ++ + # This is where the make install target will put stuff +-PREFIX = /usr/local ++DESTDIR = ++prefix = /usr/local ++sbindir = ${prefix}/sbin ++mandir = ${prefix}/man ++man4dir = ${mandir}/man4 ++man8dir = ${mandir}/man8 ++moduledir = /lib/modules/${KERNELVER} ++ + VERSION = 1.0.7 + TAROPTS = czvf + +@@ -22,8 +32,8 @@ + endif + + CC = gcc +-KERNELVERSION=$(shell uname -r | cut -d. -f1,2) +-ifeq ($(KERNELVERSION),2.4) ++LD = ld ++ifeq (${KERNELMAJVER},2.4) + CFLAGS = -D__KERNEL__ -DMODULE -DFISTGEN -I. ${TOPINC} -Wall -Wno-unused-label -Werror -g ${EXTRACFLAGS} -O2 + endif + EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DFISTGEN -I. ${TOPINC} -Wall -Werror -g ${EXTRACFLAGS} -O2 +@@ -35,7 +45,7 @@ + + BINS := unionctl uniondbg + +-all: readthereadme unionfs$(KERNELVERSION) ++all: readthereadme unionfs$(KERNELMAJVER) + + readthereadme: + @echo "******************************************************************************" +@@ -43,13 +53,15 @@ + @echo "******************************************************************************" + @echo "" + +-unionfs2.6: ${BINS} ++unionfs2.6: unionfs.ko ${BINS} ++ ++unionfs.ko: + make -C ${LINUXSRC} SUBDIRS=$(PWD) FISTDEVMK=$(PWD)/fistdev.mk modules + + unionfs2.4: ${obj-m} ${BINS} + + ${obj-m}: ${unionfs-objs} +- ld -o ${obj-m} -r ${unionfs-objs} ++ ${LD} -o ${obj-m} -r ${unionfs-objs} + + unionctl: unionctl.c + ${CC} -o $@ $? ${UCFLAGS} +@@ -74,15 +86,20 @@ + ${unionfs-objs}: unionfs.h fist.h + + install: all +- mkdir -p ${PREFIX}/sbin +- cp unionctl ${PREFIX}/sbin +- cp uniondbg ${PREFIX}/sbin +- mkdir -p ${PREFIX}/man/man4 +- mkdir -p ${PREFIX}/man/man8 +- cp man/unionfs.4 ${PREFIX}/man/man4 +- cp man/unionctl.8 ${PREFIX}/man/man8 +- cp man/uniondbg.8 ${PREFIX}/man/man8 +- if [ -f unionfs.ko ] ; then cp unionfs.ko /lib/modules/`uname -r`/kernel/fs ; else cp unionfs.o /lib/modules/`uname -r`/kernel/fs ; fi ++ mkdir -p ${DESTDIR}${sbindir} ++ cp unionctl ${DESTDIR}${sbindir} ++ cp uniondbg ${DESTDIR}${sbindir} ++ mkdir -p ${DESTDIR}${man4dir} ++ mkdir -p ${DESTDIR}${man8dir} ++ cp man/unionfs.4 ${DESTDIR}${man4dir} ++ cp man/unionctl.8 ${DESTDIR}${man8dir} ++ cp man/uniondbg.8 ${DESTDIR}${man8dir} ++ mkdir -p ${DESTDIR}${moduledir}/kernel/fs ++ifeq (${KERNELMAJVER},2.4) ++ cp unionfs.o ${DESTDIR}${moduledir}/kernel/fs ++else ++ cp unionfs.ko ${DESTDIR}${moduledir}/kernel/fs ++endif + + + release: unionfs-${VERSION}.tar.gz diff --git a/packages/unionfs/unionfs-modules.inc b/packages/unionfs/unionfs-modules.inc index e69de29bb2..ab7852a2c8 100644 --- a/packages/unionfs/unionfs-modules.inc +++ b/packages/unionfs/unionfs-modules.inc @@ -0,0 +1,23 @@ +unionutils = "unionctl uniondbg" + +include unionfs.inc +inherit module +CFLAGS =+ "-D__KERNEL__ -DMODULE -I${STAGING_KERNEL_DIR}/include" +EXTRA_OEMAKE = "'CC=${KERNEL_CC}' 'LD=${KERNEL_LD}' \ + 'KERNELVER=${KERNEL_VERSION}' \ + 'LINUXSRC=${STAGING_KERNEL_DIR}' \ + 'CROSS_COMPILE=${TARGET_PREFIX}' \ + 'OS=${TARGET_OS}'" + +do_compile () { + unset CFLAGS LDFLAGS + oe_runmake unionfs${KERNEL_OBJECT_SUFFIX} +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/fs + install -m 0644 unionfs${KERNEL_OBJECT_SUFFIX} ${D}/lib/modules/${KERNEL_VERSION}/kernel/fs/ + + install -d ${D}/${mandir}/man4 + install -m 0644 man/unionfs.4 ${D}/${mandir}/man4/ +} diff --git a/packages/unionfs/unionfs-modules_1.0.7.bb b/packages/unionfs/unionfs-modules_1.0.7.bb index e69de29bb2..1c702489d6 100644 --- a/packages/unionfs/unionfs-modules_1.0.7.bb +++ b/packages/unionfs/unionfs-modules_1.0.7.bb @@ -0,0 +1,4 @@ +include unionfs-modules.inc +include unionfs_${PV}.inc + +PR = "r2" |