Included one small fix to sudden reboot when inserting USB cable, or when booting with cable inserted that only affect some Xiaomi devices. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6498 Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
70 lines
1.8 KiB
Bash
70 lines
1.8 KiB
Bash
# Maintainer: Alexey Minnekhanov <alexeymin@postmarketos.org>
|
|
# Kernel config based on: arch/arm64/configs/sdm660_defconfig
|
|
|
|
_flavor="postmarketos-qcom-sdm660"
|
|
pkgname=linux-$_flavor
|
|
pkgver=6.14.6
|
|
pkgrel=0
|
|
pkgdesc="Close to mainline linux kernel for Qualcomm Snapdragon 660 SoC"
|
|
arch="aarch64"
|
|
url="https://kernel.org/"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps
|
|
pmb:cross-native
|
|
pmb:kconfigcheck-community
|
|
"
|
|
makedepends="
|
|
bash
|
|
bison
|
|
findutils
|
|
flex
|
|
openssl-dev
|
|
perl
|
|
postmarketos-installkernel
|
|
python3
|
|
zstd
|
|
"
|
|
|
|
_tag="v$pkgver-sdm660"
|
|
|
|
source="
|
|
linux-$_tag.tar.gz::https://github.com/sdm660-mainline/linux/archive/refs/tags/$_tag.tar.gz
|
|
config-$_flavor.aarch64
|
|
"
|
|
|
|
_carch="arm64"
|
|
|
|
# for some reason, the directory inside .tar.gz does not match tag name: leading
|
|
# "v" is missing, so we can't use $_tag here
|
|
builddir="$srcdir/linux-$pkgver-sdm660"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cp -v "$srcdir/config-$_flavor.$CARCH" "$builddir"/.config
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/boot
|
|
|
|
make zinstall modules_install dtbs_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_PATH="$pkgdir"/boot \
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
INSTALL_MOD_STRIP=1 \
|
|
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
|
|
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
}
|
|
sha512sums="
|
|
d0141c811c10080554b4a5c1b2a144cb901678eb4ada9dc76f41dd312419f36b0022c54adf29ffaff60d368e457001fb2adff963d28d306216464729788243a0 linux-v6.14.6-sdm660.tar.gz
|
|
9b9ff989a82439401ecce8a7681b51f6d4e297fbd91c17208f9078a685afb1e1590deaaf4484f3d416ba535d7eb34a5c9f005e88522ddfda853d6f9479ef831c config-postmarketos-qcom-sdm660.aarch64
|
|
"
|