mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
update kernel builder for linux next
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
parent
19a1b1c917
commit
d9eac7df4a
|
@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
kernel-package \
|
kernel-package \
|
||||||
make \
|
make \
|
||||||
libncurses5-dev \
|
libncurses5-dev \
|
||||||
|
libssl-dev \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,49 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
linux_next(){
|
||||||
|
(
|
||||||
|
cd /usr/src
|
||||||
|
|
||||||
|
# check if we already have the source checked out
|
||||||
|
if [[ -d linux ]]; then
|
||||||
|
cd linux
|
||||||
|
|
||||||
|
git checkout master
|
||||||
|
|
||||||
|
git remote update
|
||||||
|
else
|
||||||
|
# clone the source files
|
||||||
|
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||||
|
|
||||||
|
# add the linux-next remote
|
||||||
|
cd linux
|
||||||
|
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
|
||||||
|
|
||||||
|
# fetch linux-next and tags
|
||||||
|
git fetch linux-next
|
||||||
|
git fetch --tags linux-next
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout -b next-$(date +%Y%m%d) next-$(date +%Y%m%d)
|
||||||
|
|
||||||
|
if [[ ! -f .config ]] && [[ -f ../config ]]; then
|
||||||
|
cp ../config .config
|
||||||
|
fi
|
||||||
|
|
||||||
|
nice -19 make -j$JOBS KDEB_PKGVERSION=$PKGVERSION INSTALL_MOD_STRIP=1 deb-pkg
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
install_kernel(){
|
install_kernel(){
|
||||||
local VERSION=$1
|
local VERSION=$1
|
||||||
|
|
||||||
if [[ -z $VERSION ]]; then
|
if [[ -z $VERSION ]]; then
|
||||||
echo "Please specify a kernel version."
|
echo "Please specify a kernel version."
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [[ "$VERSION" == "next" ]]; then
|
||||||
|
linux_next
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local MAJOR_VERSION=${VERSION:0:1}
|
local MAJOR_VERSION=${VERSION:0:1}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user