2024-03-30 15:07:53 +00:00
|
|
|
# Kernel config based on defconfig and exynos7870.config
|
2023-03-04 20:58:56 +00:00
|
|
|
pkgname=linux-postmarketos-exynos7870
|
2024-03-30 15:07:53 +00:00
|
|
|
pkgver=6.8.1
|
2024-06-06 21:29:31 +00:00
|
|
|
pkgrel=1
|
2024-03-30 15:07:53 +00:00
|
|
|
pkgdesc="Close-to-mainline kernel for Samsung Exynos 7870 devices"
|
2023-03-04 20:58:56 +00:00
|
|
|
arch="aarch64"
|
|
|
|
_carch="arm64"
|
2024-03-30 15:07:53 +00:00
|
|
|
_flavor="postmarketos-exynos7870"
|
|
|
|
url="https://gitlab.com/exynos7870-mainline/linux"
|
2023-03-04 20:58:56 +00:00
|
|
|
license="GPL-2.0-only"
|
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
|
|
|
makedepends="
|
|
|
|
bash
|
|
|
|
bc
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
openssl-dev
|
|
|
|
perl
|
2024-06-06 21:29:31 +00:00
|
|
|
postmarketos-installkernel
|
2023-03-04 20:58:56 +00:00
|
|
|
"
|
|
|
|
|
2024-03-30 15:07:53 +00:00
|
|
|
_owner="exynos7870-mainline"
|
|
|
|
_repo="mainline-patches"
|
|
|
|
_commit="6608cbe5d3b29c44a177d12c14c7f1b070584363"
|
2023-03-04 20:58:56 +00:00
|
|
|
_config="config-$_flavor.aarch64"
|
2024-03-30 15:07:53 +00:00
|
|
|
|
2023-03-04 20:58:56 +00:00
|
|
|
# Source
|
|
|
|
source="
|
|
|
|
$_config
|
2024-03-30 15:07:53 +00:00
|
|
|
linux-$pkgver.tar.gz::https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.gz
|
|
|
|
patches-$_commit.tar.gz::https://gitlab.com/$_owner/$_repo/-/archive/$_commit/$_repo-$_commit.tar.gz
|
2023-03-04 20:58:56 +00:00
|
|
|
"
|
|
|
|
builddir="$srcdir/linux-$pkgver"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
2024-03-30 15:07:53 +00:00
|
|
|
cp "$srcdir/$_config" .config
|
|
|
|
|
|
|
|
# Apply the patches to the mainline kernel.
|
|
|
|
for i in "$srcdir"/$_repo-*/patches/*; do
|
2023-03-04 20:58:56 +00:00
|
|
|
patch -p1 < "$i"
|
|
|
|
done
|
2024-03-30 15:07:53 +00:00
|
|
|
|
|
|
|
# Delete the minimal devicetrees
|
|
|
|
rm -f "$srcdir"/$_repo-*/*-minimal-dts.dts
|
|
|
|
|
|
|
|
# Move the devicetrees in the kernel tree
|
|
|
|
for i in "$srcdir"/$_repo-*/*dts*; do
|
|
|
|
cp $i "arch/arm64/boot/dts/exynos/"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Add the devicetrees in the Makefile
|
|
|
|
for i in "$srcdir"/$_repo-*/*.dts; do
|
|
|
|
# Get the file name, and change .dts to .dtb
|
|
|
|
i="$(echo $(basename $i) | sed 's/.$/b/')"
|
|
|
|
echo "dtb-\$(CONFIG_ARCH_EXYNOS) += $i" >> \
|
|
|
|
"$builddir/arch/arm64/boot/dts/exynos/Makefile"
|
|
|
|
done
|
2023-03-04 20:58:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2024-03-30 15:07:53 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS"
|
2023-03-04 20:58:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p "$pkgdir/boot" "$pkgdir/lib/modules"
|
|
|
|
|
|
|
|
# The bootloader does not support zipped kernels
|
2024-03-30 15:07:53 +00:00
|
|
|
make install modules_install dtbs_install \
|
2023-03-04 20:58:56 +00:00
|
|
|
ARCH="$_carch" \
|
2024-03-30 15:07:53 +00:00
|
|
|
INSTALL_PATH="$pkgdir/boot" \
|
2023-03-04 20:58:56 +00:00
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
2024-03-30 15:07:53 +00:00
|
|
|
INSTALL_MOD_STRIP=1 \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
2023-03-04 20:58:56 +00:00
|
|
|
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
|
|
|
|
2024-03-30 15:07:53 +00:00
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
2023-03-04 20:58:56 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
2024-03-30 15:07:53 +00:00
|
|
|
install -Dm644 "$builddir/arch/$_carch/boot/Image" \
|
|
|
|
"$pkgdir/boot/vmlinuz"
|
2023-03-04 20:58:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2024-03-30 15:07:53 +00:00
|
|
|
ffdea8c886fe106cf551d2dcf7ed78b790e13ad0fcea2afc6eff03ff5216d8cb984506e8cfa309bbdee3a3b89fc5f1d9e8f59f08100c90a94da004354cced884 config-postmarketos-exynos7870.aarch64
|
|
|
|
a08c966b4c3cce22fa4963b2b17b42966ceb959ccb0280f83a67fa84abed773ec5e155df7678df121c7825772a9ba82df71fa142734754d3847e73b7e65488f7 linux-6.8.1.tar.gz
|
|
|
|
275b3a8be2e089348ed18d12ff07118bf66574be46aeb0004950f8a46e46609e5312a2e792ab85a9a8eef0ace9fec7eb4066f839f76efd688e0ee5e09623cdc6 patches-6608cbe5d3b29c44a177d12c14c7f1b070584363.tar.gz
|
2023-03-04 20:58:56 +00:00
|
|
|
"
|