51c564d256
Add clock controller, USB, GPU, exynos-reboot & hardware buttons support [ci:skip-build]: Already built successfully in CI
84 lines
2.6 KiB
Text
84 lines
2.6 KiB
Text
# Kernel config based on defconfig
|
|
|
|
pkgname=linux-postmarketos-exynos7870
|
|
pkgver=6.3.9
|
|
pkgrel=0
|
|
pkgdesc="Close-to-mainline kernel for Samsung Galaxy A6 2018"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="exynos7870"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
|
makedepends="
|
|
bash
|
|
bc
|
|
bison
|
|
dtbtool-exynos
|
|
flex
|
|
openssl-dev
|
|
perl
|
|
"
|
|
|
|
_patches_repo="https://gitlab.com/sleirsgoevy/a6lte-mainline"
|
|
_patches_repo_commit="a3d286c155a70e8075d611cffe17c579360b5d9b"
|
|
_config="config-$_flavor.aarch64"
|
|
# Source
|
|
source="
|
|
linux-$pkgver.tar.gz::https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.gz
|
|
$_config
|
|
patches-$_patches_repo_commit.tar.gz::$_patches_repo/-/archive/master/a6lte-mainline-$_patches_repo_commit.tar.gz
|
|
"
|
|
builddir="$srcdir/linux-$pkgver"
|
|
_outdir="."
|
|
|
|
prepare() {
|
|
default_prepare
|
|
for i in "$srcdir"/a6lte-mainline-*/patches/*; do
|
|
patch -p1 < "$i"
|
|
done
|
|
cp "$srcdir"/$_config .config
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
|
|
# Build out-of-tree devicetrees
|
|
rm -f "$srcdir/"a6lte-mainline-*/*-minimal-dts.dts
|
|
for i in "$srcdir/"a6lte-mainline-*/*.dts; do
|
|
scripts/dtc/dtc "$i" -o "$_outdir/arch/$_carch/boot/dts/$(basename -s .dts "$i").dtb"
|
|
done
|
|
|
|
# Master DTB (deviceinfo_bootimg_qcdt)
|
|
dtbTool-exynos -o "$_outdir/arch/$_carch/boot"/dt.img \
|
|
$(find "$_outdir/arch/$_carch/boot/dts/" -name 'exynos7870-*.dtb')
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir/boot" "$pkgdir/lib/modules"
|
|
|
|
# The bootloader does not support zipped kernels
|
|
make install modules_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_PATH="$pkgdir"/boot \
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
INSTALL_MOD_STRIP=1
|
|
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
|
|
|
install -D include/config/kernel.release \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
# Install dt.img
|
|
install -Dm066 "$_outdir/arch/$_carch/boot/"dt.img "$pkgdir/boot/dt.img"
|
|
|
|
# Rename /boot/vmlinux-... to make postmarketos-mkinitfs happy
|
|
mv "$pkgdir/boot/vmlinux-$pkgver" "$pkgdir/boot/vmlinuz-$pkgver"
|
|
}
|
|
|
|
sha512sums="
|
|
e5f98f9e60b3020f5177585e0c7812932afc06f788d572c122eb1cc3343f876a4cc8d99f06a7834aa8f8821b4340b9c475c15d07f5322e11d25622813306bf50 linux-6.3.9.tar.gz
|
|
867187f7dab4a103b6cf015f7d231a1ea930646e8176c8b9a5f70b95d5fa793fa1321cfdd52d8b19e64a2f91c6d2f2c6e07228b59b454096566b318f17f33959 config-exynos7870.aarch64
|
|
9e50e192402671ac003a4f1725b62cd4f3ad97909fdfb2f60f89498659b5f94850ccec7348d9fb32eee053f5a08657c17d1390229215671d9069107e52cec4cf patches-a3d286c155a70e8075d611cffe17c579360b5d9b.tar.gz
|
|
"
|