summaryrefslogtreecommitdiffstats
path: root/remote/modules/kernel
diff options
context:
space:
mode:
authorMichael Neves2013-06-04 14:15:17 +0200
committerMichael Neves2013-06-04 14:15:17 +0200
commitb8496fc0b5bd31a43759971b0c6c1ab9c439cad9 (patch)
treee9c4b0eeaaceeca2ba14208d84e47ac7780717ab /remote/modules/kernel
parentinsert sound (diff)
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-b8496fc0b5bd31a43759971b0c6c1ab9c439cad9.tar.gz
tm-scripts-b8496fc0b5bd31a43759971b0c6c1ab9c439cad9.tar.xz
tm-scripts-b8496fc0b5bd31a43759971b0c6c1ab9c439cad9.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/kernel')
-rw-r--r--remote/modules/kernel/kernel.build34
-rw-r--r--remote/modules/kernel/kernel.conf1
2 files changed, 26 insertions, 9 deletions
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index 63b0a336..27e00ac1 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -107,19 +107,35 @@ update_config() {
# helper to patch aufs
patch_aufs() {
pinfo "Cloning aufs3 standalone git"
- git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git || perror "Cloning aufs3 failed."
+ cd "$MODULE_DIR"
+ if [ ! -d "aufs3-standalone/.git" ]; then
+ rm -rf "aufs3-standalone"
+ git clone "git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git" || perror "Cloning aufs3 failed."
+ fi
# get the needed version
[ ! -z ${KERNEL_VERSION} ] && local NEEDED_BRANCH=$(echo $KERNEL_VERSION | awk -F "." '{print $1"."$2}') \
|| perror "KERNEL_VERSION not set, this should not happen!"
pinfo "Getting branch origin/$NEEDED_BRANCH"
- cd aufs3-standalone/
- git checkout origin/aufs$NEEDED_BRANCH
+ cd "$MODULE_DIR/aufs3-standalone" || perror "Could not CD to aufs3-standalone"
+ git checkout "origin/aufs$NEEDED_BRANCH"
pinfo "Starting to patch..."
- tar c include/linux/aufs_type.h Documentation fs | tar x -C ../ksrc
- cd ../ksrc || perror "cd nicht geklappt: ../ksrc"
- patch -p1 < ../aufs3-standalone/aufs3-kbuild.patch || perror "aufs3-standalone/aufs3-kbuild.patch failed"
- patch -p1 < ../aufs3-standalone/aufs3-base.patch || perror "aufs3-standalone/aufs3-base.patch failed"
- patch -p1 < ../aufs3-standalone/aufs3-proc_map.patch || perror "aufs3-standalone/aufs3-proc_map.patch failed"
- cp ../aufs3-standalone/include/linux/aufs_type.h include/linux/
+ tarcopy "Documentation fs" "$MODULE_DIR/ksrc"
+ local AUFSH
+ if [ ! -e "include/linux/aufs_type.h" ]; then
+ [ ! -e "include/uapi/linux/aufs_type.h" ] && perror "No aufs_type.h in aufs3-git"
+ AUFSH="include/uapi/linux/aufs_type.h"
+ elif [ -e "include/uapi/linux/aufs_type.h" -a "$(stat -c %s "include/uapi/linux/aufs_type.h")" -gt "$(stat -c %s "include/linux/aufs_type.h")" ]; then
+ AUFSH="include/uapi/linux/aufs_type.h"
+ else
+ AUFSH="include/linux/aufs_type.h"
+ fi
+ pinfo "Using $AUFSH"
+ cp "$AUFSH" "$MODULE_DIR/ksrc/include/linux/" || perror "could not copy $AUFSH"
+ cd "$MODULE_DIR/ksrc" || perror "Could not CD to kernel-source dir ksrc"
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-kbuild.patch" || perror "aufs3-standalone/aufs3-kbuild.patch failed"
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-base.patch" || perror "aufs3-standalone/aufs3-base.patch failed"
+ #patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-proc_map.patch" || perror "aufs3-standalone/aufs3-proc_map.patch failed"
pinfo "Patched kernel source with aufs-${NEEDED_BRANCH}"
+ cd "$MODULE_DIR"
}
+
diff --git a/remote/modules/kernel/kernel.conf b/remote/modules/kernel/kernel.conf
index 0cd03752..cb7ce13a 100644
--- a/remote/modules/kernel/kernel.conf
+++ b/remote/modules/kernel/kernel.conf
@@ -1,3 +1,4 @@
REQUIRED_BINARIES=""
REQUIRED_LIBRARIES=""
REQUIRED_DIRECTORIES=""
+REQUIRED_INSTALLED_PACKAGES="patch"