# Maintainer: PktSurf app=linux version=5.15.193 build=1sml homepage="https://kernel.org" download="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-$VERSION.tar.xz" desc="Linux kernel for the x86_64 CPU architecture" requires="musl ncurses perl mpc mpfr" ignorebinlib=1 prepbuilddir() { mkandenterbuilddir rm -rf $app-$version tar xf $srcdir/$app-$version.tar.?z* cd $app-$version fixbuilddirpermissions export KBUILD_BUILD_VERSION="$build-smlinux" # Ensure build directory is clean make mrproper make clean cp $srcdir/linux.config .config make olddefconfig # Prevent inclusion of incompatible host linux headers in objtool build cp arch/x86/include/uapi/asm/{byteorder.h,swab.h} tools/arch/x86/include/asm/ ( cd tools/objtool mv objtool.c objtool.c.orig cp $srcdir/objtool.c . cat objtool.c.orig >> objtool.c ) } build() { make bzImage make modules make INSTALL_MOD_PATH=$pkg modules_install install -Dm 0644 arch/x86/boot/bzImage "$pkg/boot/vmlinuz-$version" cp System.map "$pkg/boot/System.map-$version" cp .config $pkg/boot/config-$version rm -v $pkg/lib/modules/$version/{build,source} ( cd $pkg/boot ; ln -s vmlinuz-$version vmlinuz ) ( cd $pkg/boot ; ln -s System.map-$version System.map ) ( cd $pkg ; find . -name "*.cmd" -exec rm -fv "{}" \+ ) ( cd $pkg ; mkdir -p usr ; mv lib usr/ ) mkfinalpkg } sha512sums=" 5728422e0e93c5705c0c661d539a2e0a08e5f86cceb3bd389ae8f05d173f0564367f69010151b3a005804579f6a2f40a2e16e38a7fa113323a90bb337d32c8b2 linux-5.15.193.tar.lz 8a69568f1c690a9038b893f19267551f18b5af502f1e389d950c22792daa594e8606a165117d023584b9d279e917da56563c5c079c683148f54ec6a6b58217a9 objtool.c "