blob: 40f5040847aa31b3cbcc5ac18a2112fca1b3289e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
_pkgname=easy-kernel-power8
pkgver=4.14.88
pkgrel=13
pkgname=$_pkgname-$pkgver-mc$pkgrel
pkgdesc="The Linux kernel, packaged for POWER8 and POWER9 computers"
url="https://kernel.org/"
arch="ppc64"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends=""
makedepends="bc gzip kmod lzop openssl-dev xz"
install=""
provides="easy-kernel-power8=$pkgver-r$pkgrel"
subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules
$_pkgname-src-$pkgver-mc$pkgrel:src"
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-p8
fi
if [ -f "$pkgdir"/boot/vmlinux ]; then
mv "$pkgdir"/boot/vmlinux \
"$pkgdir"/boot/vmlinux-$pkgver-mc$pkgrel-easy-p8
fi
# This allows coexistence of both kernel flavours on media.
mv "$pkgdir"/boot/System.map "$pkgdir"/boot/System.map-p8
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/easy-$pkgver-mc$pkgrel-p8/kernel.release
}
modules() {
pkgdesc="Modules / device drivers for easy-kernel"
provides="easy-kernel-power8-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-p8/build
rm "$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-p8/source
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel-p8" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-p8/build
ln -s "../../../usr/src/linux-$pkgver-mc$pkgrel-p8" \
"$subpkgdir"/lib/modules/$pkgver-mc$pkgrel-easy-p8/source
}
src() {
pkgdesc="Kernel source code used to build the kernel"
provides="easy-kernel-power8-src=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/src
mv "$srcdir"/linux-src "$subpkgdir"/usr/src/linux-$pkgver-mc$pkgrel-p8
}
sha512sums="77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 linux-4.14.tar.xz
b9ec95e20b8ef1f99ab393c285f99c8630915ad688ea1f6eaf170b180f0aea65a24a8875f7a7ccc0c1a35b1e54a0b1ff2e6d04fb5f0fc2cbd5857082128a04a8 linux-4.14-mc13.patch.xz
e41d9111219342ad13367902242444ecdd847a93575c3f9709d6c6a075bc650f4a15be9db1a8798435fc0a0b56d41705829bfe0d2c2d88f8d1c28931e27ef5be ast-endianness.patch
7eaa8840cbcb78afcc95a2e57a0fe92d6016f0ee6b5e1530e647ddb2799dae709ff57ac86bdfdefd32be1f3b1aec789cdc6b49f81c3186291672a8945bc474dd config-ppc64
64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch"
|