Skip to contentSkip to conversation

Clean kernel when "make linux-clean" is called

PATCH New Stephan Hoffmann 2 participants 4 messages Aug 27, 2012 – Jan 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Clean kernel when "make linux-clean" is called

When "make linux-clean" is typed one expects that the kernel tree gets cleaned. Before this patch, only the stamp files had been removed.

---
 linux/linux.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
linux/linux.mk +2 -0
index c4bdf90..e9a5da9 100644
@@ -268,6 +268,8 @@ linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig li
 linux-savedefconfig linux26-savedefconfig: dirs linux-configure
 	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \
 		$(subst linux-,,$(subst linux26-,,$@))
+linux-clean:
+	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) clean
 
 ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
 linux-update-config linux26-update-config: linux-configure $(LINUX_DIR)/.config
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 Clean kernel when "make linux-clean" is called

Le Mon, 27 Aug 2012 16:20:03 +0200,
Stephan Hoffmann <[email protected]> a ?crit :

linux/linux.mk linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig li · line 272

Quoted 2 lines
linux/linux.mk +2 -0
+linux-clean:
+	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) clean

No, you should be implementing LINUX_CLEAN_CMDS instead of overriding the linux-clean target, which is declared by the generic-package infrastructure.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 Clean kernel when "make linux-clean" is called

When "make linux-clean" is typed one expects that the kernel tree gets cleaned. Before this patch, only the stamp files had been removed.

---
 linux/linux.mk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
linux/linux.mk +3 -0
index c4bdf90..e517d1d 100644
@@ -221,6 +221,9 @@ define LINUX_BUILD_CMDS
 	$(LINUX_APPEND_DTB)
 endef
 
+define LINUX_CLEAN_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) clean
+endef
 
 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
 define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 1/1 Clean kernel when "make linux-clean" is called

ping
Am 07.12.2012 14:20, schrieb Stephan Hoffmann:

Quoted 23 lines

When "make linux-clean" is typed one expects that the kernel tree gets cleaned. Before this patch, only the stamp files had been removed.

---
 linux/linux.mk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
linux/linux.mk +3 -0
index c4bdf90..e517d1d 100644
@@ -221,6 +221,9 @@ define LINUX_BUILD_CMDS
 	$(LINUX_APPEND_DTB)
 endef
 
+define LINUX_CLEAN_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) clean
+endef
 
 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
 define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
Signature · 4 lines
reLinux     -    Stephan Hoffmann
Am Schmidtgrund 124    50765 K?ln
Tel. +49.221.95595-19    Fax: -64
www.reLinux.de     sho at reLinux.de