2018-02-15 11:33:05 +01:00
|
|
|
VERSION="1.20171029-1"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="linux-raspberrypi-kernel_${VERSION}"
|
2018-02-15 11:33:05 +01:00
|
|
|
TARBALL="raspberrypi-kernel_${VERSION}.tar.gz"
|
|
|
|
URL="https://github.com/raspberrypi/linux/archive"
|
|
|
|
SHA256SUM="348b9f0c770271ecc95603a495f2a2197a1056efc5d81b42ebd155cddcfee4ee"
|
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"
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="arm" CROSS_COMPILE="${TARGET}-" mrproper
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-20 21:30:34 +01:00
|
|
|
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
2018-02-16 23:22:04 +01:00
|
|
|
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'",'
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="arm" CROSS_COMPILE="${TARGET}-" oldconfig
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
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="arm" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS zImage dtbs
|
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 19:15:20 +01:00
|
|
|
install -m 755 "arch/arm/boot/zImage" "$DEPLOY/vmlinuz"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
local version=$(echo $VERSION | sed 's/-[0-9]*$//g')
|
|
|
|
|
|
|
|
curl --silent -L "https://github.com/raspberrypi/linux/releases" | \
|
|
|
|
grep -o "raspberrypi-kernel_[0-9.]*-[0-9]" | \
|
|
|
|
sed 's/raspberrypi-kernel_//g' | sed 's/-/./g' | \
|
|
|
|
verson_find_greatest "$version"
|
|
|
|
}
|