mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-12-08 22:32:39 +01:00
@@ -34,7 +34,8 @@ linux_next(){
|
||||
git fetch --tags linux-next
|
||||
)
|
||||
|
||||
local branch="next-$(date +%Y%m%d)"
|
||||
local branch
|
||||
branch="next-$(date +%Y%m%d)"
|
||||
echo "Checking out the correct branch ${branch}..."
|
||||
(
|
||||
cd "$dir"
|
||||
@@ -58,7 +59,7 @@ install_kernel(){
|
||||
|
||||
if [[ "$VERSION" != "next" ]]; then
|
||||
local MAJOR_VERSION=${VERSION:0:1}
|
||||
local V=( ${VERSION//./ } )
|
||||
local V=( "${VERSION//./ }" )
|
||||
local MAJOR_MINOR_VERSION="${V[0]}.${V[1]}"
|
||||
|
||||
# Get the kernel source.
|
||||
@@ -69,7 +70,7 @@ install_kernel(){
|
||||
|
||||
MAJOR_MINOR_VERSION="${MAJOR_VERSION}.x-rcN"
|
||||
else
|
||||
[ -d /usr/src/linux-${VERSION} ] || curl -sSL "https://cdn.kernel.org/pub/linux/kernel/v${MAJOR_VERSION}.x/linux-${VERSION}.tar.xz" | tar -C /usr/src -xJ
|
||||
[ -d "/usr/src/linux-${VERSION}" ] || curl -sSL "https://cdn.kernel.org/pub/linux/kernel/v${MAJOR_VERSION}.x/linux-${VERSION}.tar.xz" | tar -C /usr/src -xJ
|
||||
fi
|
||||
|
||||
# Git clone and apply the patches for the aufs filesystem.
|
||||
@@ -77,7 +78,7 @@ install_kernel(){
|
||||
aufsdir=/aufs4-standalone
|
||||
|
||||
echo "Cloning the git patches for the aufs filesystem..."
|
||||
git clone --depth 1 --branch aufs${MAJOR_MINOR_VERSION} --single-branch https://github.com/sfjro/aufs4-standalone.git $aufsdir
|
||||
git clone --depth 1 --branch "aufs${MAJOR_MINOR_VERSION}" --single-branch https://github.com/sfjro/aufs4-standalone.git "$aufsdir"
|
||||
|
||||
(
|
||||
cd "$DIR"
|
||||
@@ -126,7 +127,7 @@ install_kernel(){
|
||||
cd "$DIR"
|
||||
|
||||
echo "Building the kernel..."
|
||||
make -j$JOBS
|
||||
make -j"$JOBS"
|
||||
echo "Installing the modules..."
|
||||
make modules_install
|
||||
echo "Installing the kernel..."
|
||||
@@ -134,7 +135,7 @@ install_kernel(){
|
||||
)
|
||||
(
|
||||
echo "Stripping the modules..."
|
||||
find /lib/modules/ -name *.ko -exec strip --strip-unneeded {} +
|
||||
find /lib/modules/ -name "*.ko" -exec strip --strip-unneeded {} +
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user