summaryrefslogtreecommitdiffstats
path: root/remote/modules/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/kernel')
-rw-r--r--remote/modules/kernel/kernel.build19
1 files changed, 9 insertions, 10 deletions
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index 6e988434..6376ceb3 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -96,19 +96,17 @@ update_config() {
patch_aufs() {
pinfo "Cloning aufs3 standalone git"
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
+ [ -d "aufs3-standalone/.git" ] && rm -rf "aufs3-standalone" # if already there, kill it.
+ # git: --depth 1 won't work here due to later "checkout origin/branch"
+ git clone "git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git" || perror "Cloning aufs3 failed."
# get the needed version
[ ! -z ${KERNEL_CURRENT_VERSION} ] && local NEEDED_BRANCH=$(echo $KERNEL_CURRENT_VERSION | awk -F "." '{print $1"."$2}') \
|| perror "KERNEL_CURRENT_VERSION not set, this should not happen!"
pinfo "Getting branch origin/$NEEDED_BRANCH"
cd "$MODULE_DIR/aufs3-standalone" || perror "Could not CD to aufs3-standalone"
- git checkout "origin/aufs$NEEDED_BRANCH"
+ git checkout "origin/aufs$NEEDED_BRANCH" || perror "Could not checkout needed branch."
pinfo "Starting to patch... $NEEDED_BRANCH"
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"
@@ -120,14 +118,15 @@ patch_aufs() {
fi
pinfo "Using $AUFSH"
- cp "$AUFSH" "$MODULE_DIR/ksrc/include/uapi/linux/" || perror "could not copy $AUFSH"
+# cp "$AUFSH" "$MODULE_DIR/ksrc/include/uapi/linux/" || perror "could not copy $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!"
- [ -f "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" ] && patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" \
- || pinfo "aufs3-mmap.patch: $? (hunk failed?)"
-
+ if [ -f "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" ]; then
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" || pinfo "aufs3-mmap.patch: (hunks failed?)"
+ fi
pinfo "Patched kernel source with aufs-${NEEDED_BRANCH}"
cd "$MODULE_DIR"
}