2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2.0.14-rc1
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/linux
/utils
/kernel
/kexec
16 PKG_HASH
:=3fc505ff8d8a2d24c68aac5e6b4783997d5a086966ff3de8b05a0ceb27e5e23b
20 PKG_CONFIG_DEPENDS
:= CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/kexec-tools
27 DEPENDS
:=@armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips
+KEXEC_ZLIB
:zlib
+KEXEC_LZMA
:liblzma
28 TITLE
:=Kernel boots kernel
29 URL
:=http
://kernel.org
/pub
/linux
/kernel
/people
/horms
/kexec-tools
/
30 MAINTAINER
:=Florian Fainelli
<florian@openwrt.org
>
34 define Package
/kexec-tools
/description
35 kexec is a set of systems call that allows you to load
36 another kernel from the currently executing Linux kernel.
39 define Package
/kexec-tools
/config
40 source
"$(SOURCE)/Config.in"
43 KEXEC_TARGET_NAME
:=$(ARCH
)-linux-
$(TARGET_SUFFIX
)
46 --target
=$(KEXEC_TARGET_NAME
) \
47 --host
=$(REAL_GNU_TARGET_NAME
) \
48 --build
=$(GNU_HOST_NAME
) \
55 --libexecdir
=/usr
/lib \
57 $(if
$(CONFIG_KEXEC_ZLIB
),--with
,--without
)-zlib \
58 $(if
$(CONFIG_KEXEC_LZMA
),--with
,--without
)-lzma \
59 TARGET_LD
="$(TARGET_CROSS)ld"
61 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
62 TARGET_LDFLAGS
+= -Wl
,--gc-sections
65 BUILD_CC
="$(HOSTCC)" \
66 TARGET_CC
="$(TARGET_CC)"
68 kexec-extra-sbin-
$(CONFIG_KEXEC_TOOLS_kdump
) += kdump
71 $(MAKE
) -C
$(PKG_BUILD_DIR
) DESTDIR
="$(PKG_INSTALL_DIR)" all install
74 define Package
/kexec-tools
/install
75 $(INSTALL_DIR
) $(1)/usr
/sbin
77 $(addprefix $(PKG_INSTALL_DIR
)/usr
/sbin
/, \
78 $(kexec-extra-sbin-y
)) \
79 $(kexec-extra-bin-y
) \
80 $(PKG_INSTALL_DIR
)/usr
/sbin
/kexec \
83 # make a link for compatability with other distros
84 $(INSTALL_DIR
) $(1)/sbin
85 $(LN
) ..
/usr
/sbin
/kexec
$(1)/sbin
/kexec
88 $(eval
$(call BuildPackage
,kexec-tools
))