From 0ce458cbd2b8c3b69cb28855934a037e6c1776ad Mon Sep 17 00:00:00 2001 From: Mikhail Kobuk Date: Sun, 7 Apr 2024 03:43:57 +0300 Subject: updated build and install, cleaned version, fixed typo --- Makefile | 18 +++++++++++++++--- build.sh | 2 +- mkcp.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100755 mkcp.sh diff --git a/Makefile b/Makefile index 35920e4..ec1ba4f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ VERSION=linux-6.8.4 VERSION_DISTR = $(VERSION)-vmkos -VERSION_BUILD = $(VERSION_DISTR)=-night +VERSION_BUILD = $(VERSION_DISTR)-night +CLEAN_BUILD = $(subst linux-,,$(VERSION_BUILD)) TRUSTED_KEYS = ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds TRUSTED_KEYS += 647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman @@ -9,6 +10,7 @@ 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' @@ -39,7 +41,12 @@ pre_install: interliner $(VERSION).tar @printf "> MAKING::$@::DONE\n" install: interliner $(VERSION) clear.ok patch patch.ok build build.ok - # @printf "> MAKING::$@\n" + @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" @@ -84,7 +91,12 @@ patch: ./patch.sh build: ./build.sh @printf "\t> MAKING::$@\n" - ./build.sh $(VERSION) $(VERSION_BUILD) | sed 's/^/\t==> /g' $(SED_SUBST) $(OUT_FMT) + ./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 diff --git a/build.sh b/build.sh index cce1d75..0b86287 100755 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ if [ "$?" != "0" ]; then exit 1 fi -sudo make KERNELRELEASE="$2" -j16 modules_install | sed 's/^/--> /g' +sudo ZSTD_CLEVEL=13 make KERNELRELEASE="$2" -j16 INSTALL_MOD_STRIP=1 modules_install | sed 's/^/--> /g' if [ "$?" != "0" ]; then echo "MAKE FAIL [modules_install]" diff --git a/mkcp.sh b/mkcp.sh new file mode 100755 index 0000000..89362e4 --- /dev/null +++ b/mkcp.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +# cd $1 + +if [ "$(diff /etc/mkinitcpio.d/linux-VMKOS.preset ./linux-VMKOS.preset)" != "" ]; then + echo "kernel preset does not match package-provided" + option="" + read -p "(keep local = k / use package provided = p): " option + + case option in + k) + echo "keeping local version" + ;; + p) + echo "using package-provided" + sudo install -C -m544 ./linux-VMKOS.preset /etc/mkinitcpio.d/linux-VMKOS.preset + ;; + *) + echo "err" + exit 1 + ;; + esac +fi + +sudo mkinitcpio -v -p linux-VMKOS + +touch ../mkcp.ok -- cgit v1.2.3