From 18b55744c087f43b785515a4c86fe5bda366cb1f Mon Sep 17 00:00:00 2001 From: Jolan Rathelot Date: Thu, 21 Nov 2024 10:57:19 +0100 Subject: [PATCH] make rules for subject --- .gitignore | 3 ++- Makefile | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8aa5cad..cc497f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea obj -ps_tester \ No newline at end of file +ps_tester +patch_kernel diff --git a/Makefile b/Makefile index 8469930..eaa0ee4 100644 --- a/Makefile +++ b/Makefile @@ -32,14 +32,21 @@ fclean: clean re: fclean @$(MAKE) -C $$PWD -patch_kernel: +patch_kernel: patch.diff + git -C $(KDIR) apply $$PWD/patch.diff + touch patch_kernel -compile_kernel: #patch_kernel - $(MAKE) -C $(KDIR) LLVM=1 -j 6 +restore_kernel: patch_kernel + git -C $(KDIR) checkout . + rm -rf $(KDIR)/kernel/get_pid_info + rm -rf patch_kernel mount_boot: mount /dev/vda1 +compile_kernel: patch_kernel + $(MAKE) -C $(KDIR) LLVM=1 -j 6 + install_kernel: mount_boot compile_kernel $(MAKE) -C $(KDIR) LLVM=1 modules_install cp -iv $(KDIR)/System.map /boot/System.map-6.12.0-modded @@ -50,4 +57,4 @@ install_kernel: mount_boot compile_kernel install: install_kernel reboot -.PHONY: install compile_kernel install_kernel patch_kernel mount_boot +.PHONY: install compile_kernel install_kernel mount_boot restore_kernel