blob: 58c594e63daa24dacba42e7789d04db6a5b79f8c (
plain) (
tree)
|
|
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
# KEEP THIS IN SYNC with the other easy-kernel packages.
_kflavour=""
_patchver=4 # must match 1000-version.patch
_pkgname=easy-kernel$_kflavour
pkgver=5.15.98
pkgrel=0
pkgname=$_pkgname-$pkgver-mc$_patchver
pkgdesc="The Linux kernel, packaged for your convenience"
url="https://kernel.org/"
arch="all"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends="kernel-boot"
makedepends="bc bison flex gzip kmod lzop openssl-dev xz"
provides="easy-kernel$_kflavour=$pkgver-r$pkgrel"
replaces="easy-kernel-power8 easy-kernel-power8-64k"
subpackages="$_pkgname-modules-$pkgver-mc$_patchver:modules
$_pkgname-src-$pkgver-mc$_patchver:src
linux-headers:headers"
_pkgmajver=${pkgver%%.*}
_pkgminver=${pkgver%.*}
source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgminver}.tar.xz
config-aarch64
config-armv7
config-m68k
config-pmmx
config-ppc
config-ppc64
config-sparc64
config-x86_64
kernel.h
0100-linux-5.15.98.patch
0120-XATTR_USER_PREFIX.patch
0122-link-security-restrictions.patch
0124-bluetooth-keysize-check.patch
0126-sign-file-libressl.patch
0200-x86-compile.patch
0255-ultra-ksm.patch
0260-reduce-swappiness.patch
0300-tmp513-regression-fix.patch
0500-print-fw-info.patch
0502-gcc9-kcflags.patch
1000-version.patch
no-require-gnu-tar.patch
no-require-lilo.patch
no-autoload-fb.conf
mkimage-missing-not-fatal.patch
"
builddir="$srcdir/linux-${_pkgminver}"
prepare() {
default_prepare
cd "$srcdir"
cp config-$CARCH linux-${_pkgminver}/.config
cp -pr linux-${_pkgminver} linux-src
if [ -f $HOME/kernel_key.pem ]; then
cp $HOME/kernel_key.pem "$builddir"/certs/signing_key.pem
fi
}
build() {
make LDFLAGS=""
cd "$srcdir/linux-src"
make LDFLAGS="" modules_prepare clean
cp "$builddir/Module.symvers" .
# Kernel bug: crtsavres.o is required to build modules, but modules_prepare doesn't create it.
if [ $CARCH = ppc ]; then
cp "$builddir/arch/powerpc/lib/crtsavres.o" arch/powerpc/lib/
fi
}
package() {
mkdir -p "$pkgdir"/boot
make INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
install modules_install
if [ -f "$pkgdir"/boot/vmlinuz ]; then
mv "$pkgdir"/boot/vmlinuz \
"$pkgdir"/boot/vmlinuz-$pkgver-mc$_patchver-easy$_kflavour
fi
if [ -f "$pkgdir"/boot/vmlinux ]; then
mv "$pkgdir"/boot/vmlinux \
"$pkgdir"/boot/vmlinux-$pkgver-mc$_patchver-easy$_kflavour
fi
if [ -f "$pkgdir"/boot/System.map ]; then
mv "$pkgdir"/boot/System.map \
"$pkgdir"/boot/System.map-$pkgver-mc$_patchver-easy$_kflavour
fi
case $CARCH in
aarch64|arm*) make INSTALL_PATH="$pkgdir"/boot dtbs_install ;;
esac
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/easy-$pkgver-mc$_patchver$_kflavour/kernel.release
}
modules() {
pkgdesc="Modules / device drivers for easy-kernel"
provides="easy-kernel$_kflavour-modules=$pkgver-r$pkgrel"
autodeps=0 # modules should not depend on src just for symlink
mkdir -p "$subpkgdir"/lib
mv "$pkgdir"/lib/modules "$subpkgdir"/lib
rm "$subpkgdir"/lib/modules/$pkgver-mc$_patchver-easy$_kflavour/build
rm "$subpkgdir"/lib/modules/$pkgver-mc$_patchver-easy$_kflavour/source
ln -s "../../../usr/src/linux-$pkgver-mc$_patchver$_kflavour" \
"$subpkgdir"/lib/modules/$pkgver-mc$_patchver-easy$_kflavour/build
ln -s "../../../usr/src/linux-$pkgver-mc$_patchver$_kflavour" \
"$subpkgdir"/lib/modules/$pkgver-mc$_patchver-easy$_kflavour/source
mkdir -p "$subpkgdir"/etc/modprobe.d
install -m644 "$srcdir"/no-autoload-fb.conf \
"$subpkgdir"/etc/modprobe.d/no-autoload-fb.conf
}
headers() {
pkgdesc="System headers provided by the Linux kernel"
mkdir -p "$subpkgdir"/usr
make -C "$builddir" headers
find "$builddir"/usr/include -name '.*' -delete
rm "$builddir"/usr/include/Makefile
cp -rv "$builddir"/usr/include "$subpkgdir/usr"
find "$subpkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \
rm -f {} \;
# provided by libdrm
rm -rf "$subpkgdir"/usr/include/drm
# needed for spl, VMware on x86, etc
install -D -m644 "$builddir"/include/generated/utsrelease.h \
"$subpkgdir"/usr/include/linux/utsrelease.h
install -m644 "$srcdir"/kernel.h "$subpkgdir"/usr/include/linux/kernel.h
}
src() {
pkgdesc="Kernel source code used to build the kernel"
provides="easy-kernel$_kflavour-src=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/src
mv "$srcdir"/linux-src "$subpkgdir"/usr/src/linux-$pkgver-mc$_patchver$_kflavour
}
sha512sums="d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a linux-5.15.tar.xz
72eb26a8c0ce4ddfeae9c37425280b79ee1669d6434b445525da251247c683af64151ce3b46e7c9c7fbb31abfb3038c14d42864bbe17c797dc44ddf506d43c2b config-aarch64
109cd698c92429c311fda768f8cde491dbde44457172d822b9a9096618e25fde61c46c3f34f3847a82ac9506d56b7222f93580ecd5dc0d77950e649c49c968f1 config-armv7
da6b532f9e4faa1a7406eecf47fab7e1ddc5a0414ad3cf4d2acd44ff19cebb63ffab0b463e57edde1901088f0e3d8a088a7e9337dc4a2072e70172d129f71d17 config-m68k
3e337aa5e468103b782ff201570970576b8f4a105824867295365c7c6378439e8cbc8ca146b3ac4d1e38e2c3a157c8d4481891dd13c93a81e7b66d36cb26fa34 config-pmmx
0bf9faf114a337acf172656efb2c52a0f618c59a76c20b30a133840f62aabd8b3cfc4dc905f07b118cf50c29439d8e710ebd04ea8b16cd4176596530d42835c0 config-ppc
5f4ce1e31b7c1ad9bc1a2188a3c0fc6a55a2afe206f33b426bbea377e9287aa2ca43fee456e17448564bb60d7ff9a452d402ab804db60d3004dfc3cbff5764b9 config-ppc64
d1cd7a398dc65d814c8b4b9fb01e87dcf14f42eae237369be54520c133cf7b84415f6959feb56b8cd98dc6eadd7904977241cf12aadd257ecae4c3acd3d2cb7f config-sparc64
9a1aa926172b86c37666127c4c06947d7c28c98d8e4d95b86fcb724c9846935881093ada10f5c68ee17706bc642d5a9731cc33e7cad303a9d8a6a422a12fc038 config-x86_64
1ca1bc094a8106b33176ab6cfb55c9514e7d69f1ed30c580eee419a3c422a2e6625d71c4581702e911f36c4bbac175010f46b7123bb81fda3303d4decdc57287 kernel.h
0222e2313f17f869d356d54813e0868f6003c4d2f2a63972c073afbe2b40355057cbe878bdc18425fee66f6ff873a9086730abf9de47e3be55b22df87f1b9910 0100-linux-5.15.98.patch
3ed100909f9aed72836a3c712e45e0116cd3c4331961a76a27b867a7098d0df9458387b656c9ea01385c3c37585436e48168ac35666b0e46dca7da05e5e38a61 0120-XATTR_USER_PREFIX.patch
c97a3799a2d5e4da9c9dfe129756da629fba8183479b02ca82f9b6d9993f17a165a96bd35ac50eb25fb293785b9b529a95165b1a2eb79c05134bee8ccf22a5d3 0122-link-security-restrictions.patch
dc47b18749d95a456f8bc47fd6a0618c286b646b38466c3d950dfbeb25adf3fc1a794e95552e4da1abb58e49f0bd841f7222e71c4d04cb0264ca23476ca9caef 0124-bluetooth-keysize-check.patch
79eaf814d76402a445efc961666a7c7c74207e552b0cb32d93d5cb828da580f7dbe93509dc9f53321c7844663205a8dce4e518ba047e4c57fc55f5c3498088ec 0126-sign-file-libressl.patch
16b8b8333fe89a68bc7f9a49b1bae263ab830692c12981640ac3dd9a0fb687f90b53783be05d47e5b38759ace4d99e82b59edd537a85a7ee27e21e65bbfa40a6 0200-x86-compile.patch
ed92b74c9ea406eb65a304b3c5b93de69167569c70d4d5027ae0a83c59159596ce88bd433573832e36bc1d7fb66b31d20921aa2bc583c7fbd9bf5563075c4c41 0255-ultra-ksm.patch
5f74e6a72876d3cf3b3188a43b999b981b6ea0ca401ad72b3c7d5cc65bf505f50e7ee17d435ec95b7a012dc92e6540aea1bdb501f48690c242705c47d2403513 0260-reduce-swappiness.patch
4e637935c2f37cc18f347293e3c94b18f90e2caccca726304a95c4891257a5b2bb3093aee7a97571038b29c0c987cc60a9a80aefd0d4c9a063b33d102f03579e 0300-tmp513-regression-fix.patch
dfd940af1d14e8a2cc1fcffbfa0fa8db52accf67cad3a7f435fc84047c945ba64dc3c45eb8dbbcc82715d8b8f2fbafa1e22b123158029016c5506cc134a7842c 0500-print-fw-info.patch
f0e532539e93d19fc65b417b4a0663e3757823340b968f63bd3a2665f99524feebb843ecf88ccf6909f93a8e7e9290721677c8f43bc3a2a37d99a51c1281a469 0502-gcc9-kcflags.patch
407b7ee1cd1a7273c914be3ff5388d55d407b95aadd7032a6dd228438c61cc50233c061e006538f9c7a2b989602003bdd5c189e67afe8e5cbc2c2c1196263f31 1000-version.patch
03a73db9eda84a52315499cb511f730946939d2de1b3aa52c60f9bd3a364377a65ddf2b62f505689a84d3e2f0fc7da5ca90429629d93d9909360ee0c3c599bbe no-require-gnu-tar.patch
aadf8a3cc46a08e3a396ebd45656aee235103db7a2155cc6980df20b750151a9938b8b73c9319c6cd1b5f8aba6ce707f857a47dabf69df8d91dd93d440cffcb5 no-require-lilo.patch
7bb07eb22002cc48caf0cd55d17ce4097aa583e0ca4048c11c92e1519761b2ae982ffe98311543d4b0dfc991c8bc411b2e1c7be9488b6c6f19ffaa08e69e2f47 no-autoload-fb.conf
b0e0634c84440a480be208da5157b03cb914790faab08fd3fdc2faeceed2c0a03d52c0e029084190708190f80028648923c4fd6feb11ec68ab4f740488161b0a mkimage-missing-not-fatal.patch"
|