mirror of
https://github.com/pygos/build.git
synced 2024-11-05 03:27:10 +01:00
5128a00400
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
43 lines
No EOL
1.6 KiB
Text
Executable file
43 lines
No EOL
1.6 KiB
Text
Executable file
VERSION="1.20180417-1"
|
|
SRCDIR="linux-raspberrypi-kernel_${VERSION}"
|
|
TARBALL="raspberrypi-kernel_${VERSION}.tar.gz"
|
|
URL="https://github.com/raspberrypi/linux/archive"
|
|
SHA256SUM="7808fe8fe260f6a8b1781cbd5585d739d900af57b6784aa04af3425d3632b03f"
|
|
DEPENDS="initrd"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local INITRDLIST="$PKGDEPLOYDIR/initrd/initrd.list"
|
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="arm" CROSS_COMPILE="${TARGET}-" mrproper
|
|
|
|
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
|
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
|
|
|
|
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
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
install -m 755 "arch/arm/boot/zImage" "$DEPLOY/vmlinuz"
|
|
}
|
|
|
|
check_update() {
|
|
local version=$(echo $VERSION | sed 's/-/./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"
|
|
} |