summaryrefslogtreecommitdiff
path: root/package/kexec/kexec.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/kexec/kexec.mk')
-rw-r--r--package/kexec/kexec.mk83
1 files changed, 15 insertions, 68 deletions
diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk
index 2e99ac2fe..1770df853 100644
--- a/package/kexec/kexec.mk
+++ b/package/kexec/kexec.mk
@@ -3,80 +3,27 @@
# kexec
#
#############################################################
-KEXEC_VERSION:=1.101
-KEXEC_SOURCE:=kexec-tools_$(KEXEC_VERSION)-kdump10.orig.tar.gz
-KEXEC_PATCH:=kexec-tools_$(KEXEC_VERSION)-kdump10-2.diff.gz
-KEXEC_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/k/kexec-tools/
-KEXEC_DIR:=$(BUILD_DIR)/kexec-tools-$(KEXEC_VERSION)
-KEXEC_CAT:=$(ZCAT)
-KEXEC_BINARY:=kexec
-KEXEC_TARGET_BINARY:=sbin/kexec
+KEXEC_VERSION = 2.0.0
+KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.bz2
+KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/horms/kexec-tools/
+# no install-strip/install-exec
+KEXEC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
-KEXEC_CONFIG_OPTS:=
-KEXEC_DEPS_y:=
-
-KEXEC_DEPS_$(KEXEC_PACKAGE_KEXEC) += zlib
+KEXEC_DEPENDENCIES = uclibc
ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y)
-KEXEC_CONFIG_OPTS += --with-zlib
+KEXEC_CONF_OPT += --with-zlib
+KEXEC_DEPENDENCIES += zlib
else
-KEXEC_CONFIG_OPTS += --without-zlib
+KEXEC_CONF_OPT += --without-zlib
endif
-$(DL_DIR)/$(KEXEC_SOURCE):
- $(call DOWNLOAD,$(KEXEC_SITE),$(KEXEC_SOURCE))
-
-$(DL_DIR)/$(KEXEC_PATCH):
- $(call DOWNLOAD,$(KEXEC_SITE),$(KEXEC_PATCH))
+$(eval $(call AUTOTARGETS,package,kexec))
-kexec-source: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
-
-$(KEXEC_DIR)/.unpacked: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
- $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-ifneq ($(KEXEC_PATCH),)
- (cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1; \
- for f in `cat debian/patches/00list`; do \
- cat debian/patches/$$f | patch -p2; \
- done)
+$(KEXEC_HOOK_POST_INSTALL): $(KEXEC_TARGET_INSTALL_TARGET)
+ifneq ($(BR2_ENABLE_DEBUG),y)
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kexec
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kdump
endif
- toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
- touch $@
-
-$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
- (cd $(KEXEC_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/ \
- $(KEXEC_CONFIG_OPTS) \
- )
+ rm -rf $(TARGET_DIR)/usr/lib/kexec-tools
touch $@
-
-$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(KEXEC_DIR)
- touch -c $@
-
-$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY)
- cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
- $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
- $(TARGET_DIR)/sbin/
- $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
-
-kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
-
-kexec-clean:
- -$(MAKE) -C $(KEXEC_DIR) clean
- rm -f $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
-
-kexec-dirclean:
- rm -rf $(KEXEC_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_KEXEC),y)
-TARGETS+=kexec
-endif