2018-09-16 15:53:45 +00:00
|
|
|
_flavor=postmarketos-allwinner
|
|
|
|
_config="config-${_flavor}.${CARCH}"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
|
2019-04-28 23:03:02 +00:00
|
|
|
pkgver=5.0.0_git20190426
|
2019-04-24 13:50:00 +00:00
|
|
|
pkgrel=0
|
2018-09-16 15:53:45 +00:00
|
|
|
|
|
|
|
arch="aarch64"
|
2019-04-08 14:12:45 +00:00
|
|
|
pkgdesc="Kernel fork with PinePhone Don't be evil patches"
|
2018-09-16 15:53:45 +00:00
|
|
|
url="https://kernel.org/"
|
|
|
|
depends=""
|
2019-04-08 14:12:45 +00:00
|
|
|
makedepends="devicepkg-dev perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex"
|
2018-09-16 15:53:45 +00:00
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
install=
|
2019-04-28 23:03:02 +00:00
|
|
|
_commit="4957078e8cae0186d92172528c5a5f403239db58"
|
2018-09-16 15:53:45 +00:00
|
|
|
source="
|
2019-04-08 14:12:45 +00:00
|
|
|
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
|
2018-09-16 15:53:45 +00:00
|
|
|
config-${_flavor}.aarch64
|
2019-04-18 20:59:11 +00:00
|
|
|
sun50i-a64-dontbeevil.dts
|
2018-09-16 15:53:45 +00:00
|
|
|
"
|
|
|
|
|
2019-04-08 14:12:45 +00:00
|
|
|
subpackages=""
|
2018-09-16 15:53:45 +00:00
|
|
|
|
|
|
|
license="GPL2"
|
|
|
|
_abi_release=$_pkgver
|
|
|
|
_carch=${CARCH}
|
|
|
|
case "$_carch" in
|
|
|
|
aarch64*) _carch="arm64" ;;
|
|
|
|
arm*) _carch="arm" ;;
|
|
|
|
ppc*) _carch="powerpc" ;;
|
|
|
|
s390*) _carch="s390" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
|
2019-04-08 14:12:45 +00:00
|
|
|
builddir="$srcdir/linux-${_commit}"
|
2018-09-16 15:53:45 +00:00
|
|
|
|
|
|
|
prepare() {
|
2019-04-08 14:12:45 +00:00
|
|
|
default_prepare
|
2019-04-18 20:59:11 +00:00
|
|
|
|
|
|
|
cp "$srcdir"/sun50i-a64-dontbeevil.dts "$builddir"/arch/arm64/boot/dts/allwinner/
|
|
|
|
|
2019-04-08 14:12:45 +00:00
|
|
|
REPLACE_GCCH=0 \
|
|
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
2018-09-16 15:53:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-${_flavor}" \
|
|
|
|
CFLAGS_MODULE=-fno-pic
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2019-04-08 14:12:45 +00:00
|
|
|
# kernel.release
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
|
|
|
# zImage (find the right one)
|
|
|
|
cd "$builddir/arch/$_carch/boot"
|
|
|
|
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
|
|
|
[ -e "$_zimg" ] || continue
|
|
|
|
msg "zImage found: $_zimg"
|
|
|
|
install -Dm644 "$_zimg" "$_target"
|
|
|
|
break
|
|
|
|
done
|
|
|
|
if ! [ -e "$_target" ]; then
|
|
|
|
error "Could not find zImage in $PWD!"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$builddir"
|
2018-09-16 15:53:45 +00:00
|
|
|
local _install
|
|
|
|
case "$CARCH" in
|
|
|
|
aarch64*|arm*) _install="modules_install dtbs_install" ;;
|
|
|
|
*) _install="modules_install" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
make -j1 $_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
|
|
|
}
|
|
|
|
|
2019-04-28 23:03:02 +00:00
|
|
|
sha512sums="61e3d0e1d46af80bb908bef36cfaa02f90915744cfada2cbb222b69a79ca54f447c94fbebc236ba3af909d83224cbd4ef2e8c2554f1af8e37424f011ebe67d51 linux-postmarketos-allwinner-4957078e8cae0186d92172528c5a5f403239db58.tar.gz
|
|
|
|
f0202130524298d9d4aab22ac97a7a2913bfa8bc81906789e20ae16bfa1075d6a59e2de16b25235ceb40d107fc11f154fa744a7c0b8cf816eeab5a9f0df3784d config-postmarketos-allwinner.aarch64
|
|
|
|
260ef303ec9f50c2a46943ba0664130da0cd98ea21d536875bd6123f30b0c859af8cfdaad38c4b28ac17b0ce0baf87899ab248cc5a1580025594eae53f24a0a4 sun50i-a64-dontbeevil.dts"
|