2018-09-16 15:53:45 +00:00
|
|
|
_flavor=postmarketos-allwinner
|
|
|
|
_config="config-${_flavor}.${CARCH}"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
|
2019-07-18 12:13:55 +00:00
|
|
|
pkgver=5.1.0_git20190715
|
|
|
|
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-07-18 12:13:55 +00:00
|
|
|
_commit="b8ed98706f36cb5bb8686f4dd4dfef0fb774c36b"
|
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-06-01 15:18:59 +00:00
|
|
|
touch-dts.patch
|
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
|
|
|
|
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-07-18 12:07:54 +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
|
2019-04-08 14:12:45 +00:00
|
|
|
|
|
|
|
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-07-18 12:13:55 +00:00
|
|
|
sha512sums="fca78f23f27029b3c26fa53257b4108fc23c35357f9ec4889a571d24dc460f5ed2383ce50103211978855f38214d237b99f6bf8bc6031811df8be6b239ed1a8a linux-postmarketos-allwinner-b8ed98706f36cb5bb8686f4dd4dfef0fb774c36b.tar.gz
|
|
|
|
a863c88352353de09802d9b3daa59650ee477238ec072796e81933765a75a6d002b10ece3d245e438d4330b630b7d9532abc92442509e6c2e4b79c8381620b8e config-postmarketos-allwinner.aarch64
|
2019-06-01 15:18:59 +00:00
|
|
|
5f2285e4eb262a9429c73599871c3fecbb858a388774bc7cba7631987ed1dc4a14cd7606e8fefc655c5128851fc853132f0a081e3d710c9266739af92f4d37e8 touch-dts.patch"
|