Verified Commit 5d0ee8c9 authored by A. Wilcox's avatar A. Wilcox
Browse files

system/easy-kernel-power8-64k: new package

parent 86d5952f
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
_pkgname=easy-kernel-power8-64k
pkgver=4.14.56
pkgrel=9
pkgname=$_pkgname-$pkgver-mc$pkgrel
_kflavour=power8-64k
pkgdesc="The Linux kernel, packaged for POWER8 and POWER9 computers (with 64K page size)"
url="https://kernel.org/"
arch="ppc64"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends=""
makedepends="bc gzip lzop openssl-dev xz"
install=""
provides="easy-kernel-power8=$pkgver-r$pkgrel"
subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules"
source="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.tar.xz
https://distfiles.adelielinux.org/source/linux-4.14-mc$pkgrel.patch.xz
ast-endianness.patch
config-ppc64
futex-cmpxchg.patch
"
builddir="$srcdir/linux-4.14"
prepare() {
default_prepare
cd "$srcdir"
cat linux-4.14-mc$pkgrel.patch.xz | unxz -> linux-4.14-mc$pkgrel.patch
cd "$builddir"
patch -Np1 <../linux-4.14-mc$pkgrel.patch
cd "$srcdir"
cp config-$CARCH linux-4.14/.config
cp -pr linux-4.14 linux-src
}
build() {
cd "$builddir"
make LDFLAGS=""
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/boot
make INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
install modules_install
if [ -f "$pkgdir"/boot/vmlinuz ]; then
mv "$pkgdir"/boot/vmlinuz \
"$pkgdir"/boot/vmlinuz-$pkgver-mc$pkgrel-easy-$_kflavour
fi
if [ -f "$pkgdir"/boot/vmlinux ]; then
mv "$pkgdir"/boot/vmlinux \
"$pkgdir"/boot/vmlinux-$pkgver-mc$pkgrel-easy-$_kflavour
fi
# This allows coexistence of both kernel flavours on media.
mv "$pkgdir"/boot/System.map "$pkgdir"/boot/System.map-$_kflavour
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/easy-$pkgver-mc$pkgrel-$_kflavour/kernel.release
}
modules() {
pkgdesc="Modules / device drivers for easy-kernel"
provides="easy-kernel-power8-64k-modules=$pkgver-r$pkgrel"
autodeps=0 # modules should not depend on src just for symlink
mkdir -p "$subpkgdir"/lib
mv "$pkgdir"/lib/modules "$subpkgdir"/lib/
rm "$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-$_kflavour/build
rm "$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-$_kflavour/source
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel-p8" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-$_kflavour/build
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel-p8" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-$_kflavour/source
}
sha512sums="77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 linux-4.14.tar.xz
f76ae636da104c6f1d299a6aff18a5aa1166c9c06efbdf3270c911f26adc1760fbb4271ca2338ced47c7787c2ff54880e1945e2d6cf25fda880b5f735029d7a8 linux-4.14-mc9.patch.xz
e41d9111219342ad13367902242444ecdd847a93575c3f9709d6c6a075bc650f4a15be9db1a8798435fc0a0b56d41705829bfe0d2c2d88f8d1c28931e27ef5be ast-endianness.patch
615b66b937aac3b2e5081db5bb0abb51bf32b9b1ba1b2d143d6b29187754ba83428a55944e8c81d58cab32d9f7d2909dc5c6156e9fda25bdad5c9e9db3335004 config-ppc64
64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch"
Author: Elizabeth Myers <elizabeth@adelielinux.org>
I'm certain this fix is wrong fwiw, but it's the best I could come with
--- linux-4.14/drivers/gpu/drm/ast/ast_fb.c.old 2017-11-12 12:46:13.000000000 -0600
+++ linux-4.14/drivers/gpu/drm/ast/ast_fb.c 2018-06-30 20:54:43.530000000 -0500
@@ -109,9 +109,30 @@
unmap = true;
}
for (i = y; i <= y2; i++) {
+ int copy_width = x2 - x + 1;
/* assume equal stride for now */
src_offset = dst_offset = i * afbdev->afb.base.pitches[0] + (x * bpp);
- memcpy_toio(bo->kmap.virtual + src_offset, afbdev->sysram + src_offset, (x2 - x + 1) * bpp);
+ switch (bpp) {
+ case 4:
+ while (copy_width) {
+ iowrite32(*(u32 *)(afbdev->sysram + src_offset),
+ bo->kmap.virtual + src_offset);
+ src_offset += 4;
+ copy_width--;
+ }
+ break;
+ case 2:
+ while (copy_width) {
+ iowrite16(*(u16 *)(afbdev->sysram + src_offset),
+ bo->kmap.virtual + src_offset);
+ src_offset += 2;
+ copy_width--;
+ }
+ break;
+ default:
+ memcpy_toio(bo->kmap.virtual + src_offset, afbdev->sysram + src_offset, (x2 - x + 1) * bpp);
+ break;
+ }
}
if (unmap)
This diff is collapsed.
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9f2b75f..d75d8ea 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -190,6 +190,7 @@ config PPC
select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACER
+ select HAVE_FUTEX_CMPXCHG if FUTEX
select HAVE_GCC_PLUGINS
select HAVE_GENERIC_GUP
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment