2017-12-09 21:51:48 +01:00
|
|
|
MAJOR="4"
|
2018-04-16 07:15:10 +02:00
|
|
|
MINOR="16"
|
|
|
|
RELEASE="2"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
VERSION="$MAJOR.$MINOR.$RELEASE"
|
|
|
|
SRCDIR="linux-$VERSION"
|
|
|
|
TARBALL="linux-$VERSION.tar.xz"
|
|
|
|
URL="https://www.kernel.org/pub/linux/kernel/v$MAJOR.x"
|
2018-04-16 07:15:10 +02:00
|
|
|
SHA256SUM="470b1fe3b8ee5d1e8e0be5c4e5928b6d5bc00e9ab6c4cff18ff680d3ef20f894"
|
2018-01-24 12:52:41 +01:00
|
|
|
DEPENDS="initrd"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local INITRDLIST="$PKGDEPLOYDIR/initrd/initrd.list"
|
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
|
2018-02-20 21:30:34 +01:00
|
|
|
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" oldconfig
|
|
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
|
|
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
|
|
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_LOCALVERSION=.*,CONFIG_LOCALVERSION="-'${OS_NAME}-${OS_RELEASE}'",'
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS $LINUX_TGT
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-14 13:07:23 +01:00
|
|
|
install -m 755 "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/vmlinuz"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L https://www.kernel.org/ | \
|
|
|
|
grep -o linux-[0-9.]*tar.xz | \
|
|
|
|
sed 's/linux-//g' | sed 's/.tar.xz//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
|
|
|
}
|