pmaports/linux-nokia-rx51/APKBUILD
Clayton Craft e0f26c949a [RX51] Enable DRM in kernel
This enables DRM (Direct Rendering Manager) support in the kernel for
the RX51. This opens up the possibility of using the Weston DRM backend,
which in turn allows for DPMS (I hope) and other cool tricks.

n900:~# glxinfo|head
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4

n900:~# glxgears
94 frames in 5.0 seconds = 18.772 FPS
2017-07-19 09:54:46 -07:00

121 lines
3.1 KiB
Text

# APKBUILD based on linux-vanilla aport. Changes:
# - disabled module installation
# - add !check !tracedeps
# - package: just install zimage and kernel.release, because the kernel config
# does not generate modules or dtb files
# - do not create -dev subpackage (makes no sense without module support)
#
# Kernel config based on: arch/arm/configs/lineageos_mako_defconfig
# Changes:
# - enable devtmpfs (needed for udev -> touch support in weston)
_vendor=nokia
_flavor=nokia-rx51
_hash="7b6fbfd899b4133e4f789843e5967beb139ec4d2"
_config="config-${_flavor}.armhf"
pkgname=linux-${_flavor}
pkgver=4.12.2
case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
pkgrel=3
arch="armhf"
pkgdesc="Mainline Linux for the Nokia N900"
url="https://github.com/pali/linux-n900"
depends="postmarketos-mkinitfs"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev uboot-tools"
options="!strip !check !tracedeps"
install=
source="
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-"$pkgver".tar.xz
$_config
"
subpackages=""
license="GPL2"
_abi_release=${pkgver}
_carch="arm"
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
ksrcdir="$srcdir/linux-$pkgver"
prepare() {
local _patch_failed=
cd "$ksrcdir"
# first apply patches in specified order
for i in $source; do
case $i in
*.patch)
msg "Applying $i..."
if ! patch -s -p1 -N -i "$srcdir"/$i; then
echo $i >>failed
_patch_failed=1
fi
;;
esac
done
if ! [ -z "$_patch_failed" ]; then
error "The following patches failed:"
cat failed
return 1
fi
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
make ARCH="$_carch" menuconfig
cp .config "$startdir"/$_config
}
build() {
cd "$srcdir"/build
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
CFLAGS_MODULE=-fno-pic \
zImage modules omap3-n900.dtb \
|| return 1
}
package() {
cd "$srcdir/build/arch/arm/boot"
cat zImage dts/omap3-n900.dtb > zImage-dtb
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n postmarketos -d zImage-dtb uImage
install -Dm644 "$srcdir/build/arch/arm/boot/uImage" \
"$pkgdir/boot/uImage-$_flavor"
install -Dm644 "$srcdir/build/arch/arm/boot/zImage-dtb" \
"$pkgdir/boot/vmlinuz-$_flavor"
install -Dm644 "$srcdir/build/arch/arm/boot/dts/omap3-n900.dtb" \
"$pkgdir/boot/omap3-n900.dtb"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
cd "$srcdir"/build
make -j1 modules_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
|| return 1
}
sha512sums="683ff447607e1f10af81a539aae8620964173f61fc9fc69b8e108bfdfd49358cc1f5b04a5bd31efcb299f66fac9df2750f92a18ea1b9264a9f0e76d2759b66e9 linux-4.12.2.tar.xz
1a9fc469806b44c9ca4355a9f1ff9cc07c282793bf9bd022acfda26361a51233d9f1ddd14c7f439a13dab28a17b039fa229135aa2c5319e4cc0df1d2d0a14dca config-nokia-rx51.armhf"