forked from linuxkit/linuxkit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainline.sh
executable file
·31 lines (26 loc) · 989 Bytes
/
mainline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <org/repo> <base url> <kernel version> <version> <date>"
echo
echo "Example:"
echo "$0 foobar/kernel-mainline v4.14.11 041411 201801022143"
echo
echo "This will create a local LinuxKit kernel package:"
echo "foobar/kernel-mainline:4.14.11"
echo "which you can then push to hub or just use locally"
exit 1
fi
REPO=$1
VER=$2
VER1=$3
DATE=$4
BASE_URL=http://kernel.ubuntu.com/~kernel-ppa/mainline
ARCH=amd64
# Strip leading 'v'
KVER=${VER:1}
URL="${BASE_URL}/${VER}"
KERNEL_DEB="${URL}/linux-image-${KVER}-${VER1}-generic_${KVER}-${VER1}.${DATE}_${ARCH}.deb"
HEADERS_DEB="${URL}/linux-headers-${KVER}-${VER1}-generic_${KVER}-${VER1}.${DATE}_${ARCH}.deb"
HEADERS_ALL_DEB="${URL}/linux-headers-${KVER}-${VER1}_${KVER}-${VER1}.${DATE}_all.deb"
DEB_URLS="${KERNEL_DEB} ${HEADERS_DEB} ${HEADERS_ALL_DEB}"
docker build -t "${REPO}:${KVER}" -f Dockerfile.deb --no-cache --build-arg DEB_URLS="${DEB_URLS}" .