Skip to content

Instantly share code, notes, and snippets.

@mrsipan
Created August 30, 2013 15:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrsipan/6391314 to your computer and use it in GitHub Desktop.
Save mrsipan/6391314 to your computer and use it in GitHub Desktop.
#!/bin/sh -vex
# needed rpms
yum -y install ncurses-devel git gcc rpmbuild
TEMPDIR="$(mktemp -d)"
HERE="$(pwd)"
printf "building at: %s\n" $TERMDIR
cd $TEMPDIR
# get the linux kernels
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.10.tar.xz
tar -xJvf linux-3.10.10.tar.xz
# get aufs sources
git clone git://git.code.sf.net/p/aufs/aufs3-standalone
cd aufs3-standalone
git checkout origin/aufs3.10
cd ..
patch -d linux-3.10.10 -p1 < aufs3-standalone/aufs3-kbuild.patch
patch -d linux-3.10.10 -p1 < aufs3-standalone/aufs3-base.patch
patch -d linux-3.10.10 -p1 < aufs3-standalone/aufs3-proc_map.patch
patch -d linux-3.10.10 -p1 < aufs3-standalone/aufs3-standalone.patch
rm -rf aufs3-standalone/include/uapi/linux/Kbuild
cp -r aufs3-standalone/{Documentation,fs,include} linux-3.10.10
cd linux-3.10.10
make menuconfig
make rpm-pkg
cd $HERE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment