-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
91 lines (78 loc) · 2.15 KB
/
PKGBUILD
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
90
91
# Maintainer: Benjamin Schneider <[email protected]>
buildarch=8
pkgname=linux-a3700-lts
pkgver=6.6.71
pkgrel=1
pkgdesc='Kernel and modules for Marvell Armada A3700 SoC'
arch=(aarch64)
url='https://www.kernel.org/'
license=('GPL-2.0 WITH Linux-syscall-note')
makedepends=(
bc
tar
xz
)
install=$pkgname.install
options=('!strip')
_srcname=linux-$pkgver
source=(
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
config
cpufreq.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
# https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256sums=('219715ba2dcfa6539fba09ad3f9212772f3507189eb60d77f8e89b06c32e724e'
'SKIP'
'798455fa7bc845ac5af114f23b83d0182c50e4e4e60c71de62f3b86ee6c43a0f'
'a1514b9bf05a2b25a2737971f034feb2ec650e8c9b102afac0f3c47080267e46')
prepare() {
cd $_srcname
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = *.patch ]] || continue
patch -Np1 < "../$src"
done
echo "Setting config..."
cp ../config .config
make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd ${_srcname}
unset LDFLAGS
make ${MAKEFLAGS} Image modules
}
package() {
pkgdesc="$pkgdesc"
depends=(
coreutils
kmod
)
optdepends=(
'linux-firmware-marvell: wifi and bluetooth driver (mwifiex)'
'wireless-regdb: to set the correct wireless channels of your country'
)
provides=(WIREGUARD-MODULE)
cd $_srcname
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
echo "Installing boot image..."
install -Dm644 arch/arm64/boot/Image -t "$modulesdir"
echo "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build link
rm "$modulesdir"/build
}