2006-12-19 14:24:27 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# kexec
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
KEXEC_VERSION:=1.101
|
|
|
|
KEXEC_SOURCE:=kexec-tools_$(KEXEC_VERSION)-kdump10.orig.tar.gz
|
|
|
|
KEXEC_PATCH:=kexec-tools_$(KEXEC_VERSION)-kdump10-2.diff.gz
|
2006-12-19 14:24:27 +01:00
|
|
|
KEXEC_SITE:=ftp://ftp.debian.org/debian/pool/main/k/kexec-tools/
|
2007-07-11 16:06:06 +02:00
|
|
|
KEXEC_DIR:=$(BUILD_DIR)/kexec-tools-$(KEXEC_VERSION)
|
2006-12-19 14:24:27 +01:00
|
|
|
KEXEC_CAT:=$(ZCAT)
|
|
|
|
KEXEC_BINARY:=kexec
|
|
|
|
KEXEC_TARGET_BINARY:=sbin/kexec
|
|
|
|
|
|
|
|
KEXEC_CONFIG_OPTS:=
|
|
|
|
KEXEC_DEPS_y:=
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
KEXEC_DEPS_$(KEXEC_PACKAGE_KEXEC) += zlib
|
2006-12-19 14:24:27 +01:00
|
|
|
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_KEXEC_ZLIB)),y)
|
|
|
|
KEXEC_CONFIG_OPTS += --with-zlib
|
|
|
|
else
|
|
|
|
KEXEC_CONFIG_OPTS += --without-zlib
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(KEXEC_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(KEXEC_SITE)/$(KEXEC_SOURCE)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(KEXEC_PATCH):
|
|
|
|
$(WGET) -P $(DL_DIR) $(KEXEC_SITE)/$(KEXEC_PATCH)
|
|
|
|
|
|
|
|
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),)
|
2007-08-22 14:35:41 +02:00
|
|
|
(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; \
|
2007-07-27 09:34:44 +02:00
|
|
|
done)
|
2006-12-19 14:24:27 +01:00
|
|
|
endif
|
2007-07-24 16:06:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
|
2007-01-23 12:47:05 +01:00
|
|
|
touch $@
|
2006-12-19 14:24:27 +01:00
|
|
|
|
|
|
|
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
|
|
|
|
(cd $(KEXEC_DIR); rm -rf config.cache; \
|
2007-01-14 04:52:21 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2006-12-19 14:24:27 +01:00
|
|
|
./configure \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/ \
|
|
|
|
$(KEXEC_CONFIG_OPTS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-23 12:47:05 +01:00
|
|
|
touch $@
|
2006-12-19 14:24:27 +01:00
|
|
|
|
2007-01-24 20:11:13 +01:00
|
|
|
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
|
2007-07-09 10:30:38 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(KEXEC_DIR)
|
2007-01-24 20:11:13 +01:00
|
|
|
touch -c $@
|
2006-12-19 14:24:27 +01:00
|
|
|
|
2007-01-24 20:11:13 +01:00
|
|
|
$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY)
|
2006-12-19 14:24:27 +01:00
|
|
|
cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
|
|
|
|
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
|
|
|
|
$(TARGET_DIR)/sbin/
|
2007-08-21 03:53:57 +02:00
|
|
|
$(STRIP) $(STRIP_STRIP_ALL) $(TARGET_DIR)/sbin/k{exec,dump}
|
2006-12-19 14:24:27 +01:00
|
|
|
|
2006-12-20 15:41:04 +01:00
|
|
|
kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
|
2006-12-19 14:24:27 +01:00
|
|
|
|
|
|
|
kexec-clean:
|
|
|
|
-$(MAKE) -C $(KEXEC_DIR) clean
|
|
|
|
rm -f $(TARGET_DIR)/sbin/k{exec,dump}
|
|
|
|
|
|
|
|
kexec-dirclean:
|
|
|
|
rm -rf $(KEXEC_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_KEXEC)),y)
|
|
|
|
TARGETS+=kexec
|
|
|
|
endif
|