summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Tesarik <patrik.tesarik@9elements.com>2022-06-11 21:47:21 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-06-14 13:35:54 +0000
commitf5c2f253a7dc8eced1c616ff9c79c6d196c86350 (patch)
tree68dfda7b6eac3b0bc5259cee5920fc3f2390c004
parented8aef9ccdfd909af25dcf412b1b4dce4c104fbc (diff)
external/LinuxBoot: Fix cleanup mechanism
`make clean` never thoroughly removed LinuxBoot build artifacts. This change checks for kernel directories present in the project directory and deletes all of them, if found. Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com> Change-Id: Ia056ac6608e3631dfc270ba5c2f32216c3e1ac50 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65098 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--payloads/external/LinuxBoot/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile
index c91b1d43da..afe9c9e22c 100644
--- a/payloads/external/LinuxBoot/Makefile
+++ b/payloads/external/LinuxBoot/Makefile
@@ -1,7 +1,7 @@
## SPDX-License-Identifier: GPL-2.0-only
project_dir=linuxboot
-kernel_dir=$(project_dir)/kernel
+kernel_names=$(shell ls $(project_dir) | grep kernel)
unexport $(COREBOOT_EXPORTS)
@@ -52,9 +52,12 @@ endif
linuxboot: kernel initramfs_compressed
clean:
- if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi
+ if [ ! -z "$(kernel_names)" ]; then \
+ rm -rf $(project_dir)/kernel*; \
+ fi
rm -f $(project_dir)/u-root
rm -f $(project_dir)/initramfs*
+ rm -f $(project_dir)/bzImage
distclean:
rm -rf $(project_dir)