VERSION=linux-6.8.8 VERSION_DISTR = $(VERSION)-vmkos VERSION_BUILD = $(VERSION_DISTR)-night CLEAN_BUILD = $(subst linux-,,$(VERSION_BUILD)) TRUSTED_KEYS = ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds TRUSTED_KEYS += 647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman SRC_URL = https://cdn.kernel.org/pub/linux/kernel/v6.x/$(VERSION).tar.xz # PGP_SGN_URL = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.8.4.tar.sign CFLAGS = -std=gnu2x -Wall -Werror -Wno-pointer-sign -Werror=vla C_ARCH = $$(uname -m) ifdef ONELINE_OUTPUT # SED_SUBST = | stdbuf --output=L sed 's/^/\\e[0A\\e[K3<>/gi' SED_SUBST = | stdbuf --output=L ./interliner else SED_SUBST= endif SILENCE= ifdef QUIET SILENCE += >all.log endif ifdef SILENT SILENCE += 2>err.log endif OUT_FMT = $(SED_SUBST) $(SILENCE) default: all all: pre_install install post_install pre_install: interliner $(VERSION).tar @printf "> MAKING::$@\n" tar --skip-old-files -xvf $(VERSION).tar 2>tar.err.log | grep -v "skipping existing file" | sed 's/^/\t=> /g' $(OUT_FMT) @printf "> MAKING::$@::DONE\n" install: interliner $(VERSION) clear.ok patch patch.ok build build.ok @printf "> MAKING::$@\n" sudo install -C -m755 $(VERSION)/arch/$(C_ARCH)/boot/bzImage /boot/vmlinuz-linux-VMKOS ./mkcp.sh $(VERSION) | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) @printf "> MAKING::$@::DONE\n" reinstall: interliner $(VERSION) clear.ok patch patch.ok build build.ok @printf "> MAKING::$@\n" tar -xvf $(VERSION).tar.xz 2>tar.err.log | sed 's/^/\t=> /g' $(OUT_FMT) sudo install -C -m755 $(VERSION)/arch/$(C_ARCH)/boot/bzImage /boot/vmlinuz-linux-VMKOS ./mkcp.sh $(VERSION) | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) @printf "> MAKING::$@::DONE\n" post_install: interliner # @printf "> MAKING::$@\n" @printf "> MAKING::$@::DONE\n" .PHONY: pre_install install post_install clean clean_misc $(VERSION).tar: $(VERSION).tar.xz $(VERSION).tar.sign @printf "\t> MAKING::$@\n" xz -kd $(VERSION).tar.xz | sed 's/^/\t==> /g' $(OUT_FMT) ifdef NO_VERIFY @printf "\t==> Will not verify\n" else ifdef SKIP_VERIFY @printf "\t==> Will not verify\n" else @printf "\t==> Verifying...\n" gpg2 --recv-keys $(TRUSTED_KEYS) $(OUT_FMT) if [ "$$(gpg2 --logger-fd 1 --verify $(VERSION).tar.sign | grep 'Good signature')" == "" ]; then false; fi endif @printf "\t> MAKING::$@::DONE\n" $(VERSION).tar.xz: @printf "\t> MAKING::$@\n" wget https://cdn.kernel.org/pub/linux/kernel/v6.x/$(VERSION).tar.xz | sed 's/^/\t==> /g' $(OUT_FMT) @printf "\t> MAKING::$@::DONE\n" $(VERSION).tar.sign: @printf "\t> MAKING::$@\n" wget https://cdn.kernel.org/pub/linux/kernel/v6.x/$(VERSION).tar.sign | sed 's/^/\t==> /g' $(OUT_FMT) @printf "\t> MAKING::$@::DONE\n" patch: ./patch.sh @printf "\t> MAKING::$@\n" ./patch.sh $(VERSION) skip | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) @printf "\t> MAKING::$@::DONE\n" build: ./build.sh @printf "\t> MAKING::$@\n" ./build.sh $(VERSION) $(CLEAN_BUILD) | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) @printf "\t> MAKING::$@::DONE\n" mkcp: ./mkcp.sh @printf "\t> MAKING::$@\n" ./mkcp.sh $(VERSION) $(CLEAN_BUILD) | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) @printf "\t> MAKING::$@::DONE\n" interliner: interliner.c clean: interliner rm -rf *.tar *.sign *.sign?? *.xz interliner $(VERSION) $(OUT_FMT) clean_misc: interliner rm -rf *.tar *.sign *.sign?? $(OUT_FMT) clear.ok: rm -f *.ok