# ScrapLinux-small-kernel - monolithic, no module loader, boots in a blink.
# Everything a normal x86_64 machine needs is compiled in, so there is no
# initramfs and no module directory. Exotic hardware will not be supported.
name=ScrapLinux-small-kernel
version=7.1.3
release=1
desc="ScrapLinux kernel, monolithic and minimal, no modules"
url="https://kernel.org/"
license="GPL-2.0-only"
depend="glibc"
makedepend="clang lld bmake"
provides="kernel"
source="https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-$version.tar.xz
	scraplinux-small.config"
sha256="SKIP
	SKIP"
options="!strip"

build() {
	cd "linux-$version"
	cp ../scraplinux-small.config .config
	scripts/config --disable MODULES
	scripts/config --set-str LOCALVERSION "-scraplinux-small"
	make olddefconfig
	make -j"$JOBS" bzImage
}

package() {
	cd "linux-$version"
	install -Dm644 arch/x86/boot/bzImage "$pkgdir/boot/vmlinuz-scraplinux-small"
	install -Dm644 .config "$pkgdir/boot/config-scraplinux-small"
}
