Root/package/boot/kexec-tools/Makefile

1#
2# Copyright (C) 2006-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=kexec-tools
11PKG_VERSION:=2.0.3
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec
16PKG_MD5SUM:=b3ced2097ce3981abba38ceedc84f939
17
18PKG_FIXUP:=autoreconf
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/kexec-tools
23  SECTION:=utils
24  CATEGORY:=Utilities
25  DEPENDS:=@armeb||@arm||@i386||@powerpc64||@mipsel||@mips +zlib
26  TITLE:=Kernel boots kernel
27  URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
28  MAINTAINER:=Florian Fainelli <florian@openwrt.org>
29  MENU:=1
30endef
31
32define Package/kexec-tools/description
33 kexec is a set of systems call that allows you to load
34 another kernel from the currently executing Linux kernel.
35endef
36
37define Package/kexec-tools/config
38    source "$(SOURCE)/Config.in"
39endef
40
41KEXEC_TARGET_NAME:=$(call qstrip,$(CONFIG_KEXEC_TOOLS_TARGET_NAME))-linux-$(TARGET_SUFFIX)
42
43CONFIGURE_ARGS = \
44        --target=$(KEXEC_TARGET_NAME) \
45        --host=$(REAL_GNU_TARGET_NAME) \
46        --build=$(GNU_HOST_NAME) \
47        --program-prefix="" \
48        --program-suffix="" \
49        --prefix=/usr \
50        --exec-prefix=/usr \
51        --bindir=/usr/bin \
52        --sbindir=/usr/sbin \
53        --libexecdir=/usr/lib \
54        --sysconfdir=/etc
55
56CONFIGURE_VARS += \
57    BUILD_CC="$(HOSTCC)" \
58    TARGET_CC="$(TARGET_CC)"
59
60kexec-extra-sbin-$(CONFIG_KEXEC_TOOLS_kdump) += kdump
61
62define Build/Compile
63    $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
64endef
65
66define Package/kexec-tools/install
67    $(INSTALL_DIR) $(1)/usr/sbin
68    $(INSTALL_BIN) \
69        $(addprefix $(PKG_INSTALL_DIR)/usr/sbin/, \
70            $(kexec-extra-sbin-y)) \
71        $(kexec-extra-bin-y) \
72        $(PKG_INSTALL_DIR)/usr/sbin/kexec \
73        $(1)/usr/sbin
74
75# make a link for compatability with other distros
76    $(INSTALL_DIR) $(1)/sbin
77    ln -s /usr/sbin/kexec $(1)/sbin/kexec
78endef
79
80$(eval $(call BuildPackage,kexec-tools))
81

Archive Download this file



interactive