_defconfig="defconfig" is the default logic in pmbootstrap, and thus should not be duplicated in kernel packages. The only use-case for _defconfig is for when the defconfig differs from what is automatically selected. linux-next is not modified because it still uses the old kconfig fragments logic and would break with this change. Signed-off-by: Aster Boese <asterboese@mailbox.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8978>
96 lines
2.3 KiB
Bash
96 lines
2.3 KiB
Bash
maintainer="Clayton Craft <clayton@craftyguy.net>"
|
|
pkgname=linux-postmarketos-asahi
|
|
pkgver=7.0.12_p1
|
|
pkgrel=0
|
|
_rel=${pkgver#*_p}
|
|
_kver=${pkgver%_p*}
|
|
_kver=${_kver//_/-}
|
|
_asahiver=$_kver-$_rel
|
|
pkgdesc="Kernel for Apple M-series devices"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="postmarketos-asahi"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip
|
|
!check
|
|
!tracedeps
|
|
pmb:cross-native
|
|
pmb:kconfigcheck-community
|
|
pmb:kconfigcheck-uefi
|
|
pmb:kconfigcheck-virt
|
|
"
|
|
makedepends="
|
|
bash
|
|
bc
|
|
bison
|
|
clang
|
|
clang-libclang
|
|
devicepkg-dev
|
|
diffutils
|
|
elfutils-dev
|
|
findutils
|
|
flex
|
|
git
|
|
linux-headers
|
|
lld
|
|
llvm
|
|
openssl-dev
|
|
pahole
|
|
perl
|
|
python3
|
|
rust
|
|
rust-bindgen
|
|
rust-src
|
|
rustfmt
|
|
sed
|
|
zstd
|
|
"
|
|
|
|
# Source
|
|
_repository="linux"
|
|
source="
|
|
$pkgname-$_asahiver.tar.gz::https://github.com/AsahiLinux/linux/archive/refs/tags/asahi-$_asahiver.tar.gz
|
|
config-postmarketos-asahi.aarch64
|
|
|
|
0001-nvmem-apple-spmi-nvmem-Fix-CFI-failures.patch
|
|
enable-dynamic-ftrace.patch
|
|
"
|
|
builddir="$srcdir/linux-asahi-$_asahiver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cp "$srcdir/config-$_flavor.$CARCH" .config
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" LLVM=1 \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
|
}
|
|
|
|
package() {
|
|
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
|
|
"$pkgdir/boot/linux.efi"
|
|
|
|
make modules_install dtbs_install \
|
|
ARCH="$_carch" \
|
|
LLVM=1 \
|
|
INSTALL_PATH="$pkgdir"/boot/ \
|
|
INSTALL_MOD_PATH="$pkgdir/usr" \
|
|
INSTALL_MOD_STRIP=1 \
|
|
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs-asahi
|
|
|
|
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="
|
|
4e054f227a9e2d6286c713a8287d434aee214b0c54773d55b37e5a781c8eec1ad97e73f761aee2e2b68aae4d989e04df9abad9c7e5598b84125d8ff4abb0c5ac linux-postmarketos-asahi-7.0.12-1.tar.gz
|
|
62de3220d7e05eed1e8f40e3fa60db2acdb43a27c8fa71bddd939b878d33d0436349b96485a19edc2f1bfcee2ba54a01f8d835187a9e9d6b4170b2c518665548 config-postmarketos-asahi.aarch64
|
|
8d205300cfabe192b53ed1cc644b087e76421eb973e1b2a31d657e4f2676badebdfcf6b0865569c43b4b904935435f6e729c3a8d4a6221fb5792e40ec1017a0f 0001-nvmem-apple-spmi-nvmem-Fix-CFI-failures.patch
|
|
e8b595f3e076896dc38f249c8908d58e2e6a858eaa77fe1e680f27db0e76d3d74c0b5dfebb7a4c57d546fee0b0f6eb81a38b20dfd72f985c9d02f28d79a5eceb enable-dynamic-ftrace.patch
|
|
"
|