-
Notifications
You must be signed in to change notification settings - Fork 16
/
package-kernel.sh
executable file
·44 lines (38 loc) · 1.16 KB
/
package-kernel.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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh -e
# A script to build the kernel .deb files, as used by Kosagi.
threads=$(($(grep '^processor' /proc/cpuinfo | cut -d: -f2 | tail -n1)+1))
version=4.4-novena-r14
if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
echo "Repo has local changes. Stash or commit them."
exit 1
fi
echo "Building v${version} with ${threads} threads"
git tag -d "v${version}" 2> /dev/null || true
git tag "v${version}"
make novena_defconfig
make -j${threads} \
KBUILD_DEBARCH=armhf \
KBUILD_IMAGE=zImage \
KBUILD_DTB=imx6q-novena.dtb \
KBUILD_DESTDIR=usr/share/linux-novena \
KDEB_PKGVERSION=${version} \
KDEB_PKGNAME="novena" \
KDEB_CHANGELOG_DIST="jessie" \
KDEB_SOURCENAME="linux-image-novena" \
EMAIL="[email protected]" \
NAME="Sean Cross" \
dtbs
# Delete the debian "files" listing, as it tends to be out of date
rm -f debian/files
make -j${threads} \
KBUILD_DEBARCH=armhf \
KBUILD_IMAGE=zImage \
KBUILD_DTB=imx6q-novena.dtb \
KBUILD_DESTDIR=usr/share/linux-novena \
KDEB_PKGVERSION=${version} \
KDEB_PKGNAME="novena" \
KDEB_CHANGELOG_DIST="jessie" \
KDEB_SOURCENAME="linux-image-novena" \
EMAIL="[email protected]" \
NAME="Sean Cross" \
deb-pkg