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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/linux
/utils
/kernel
/kexec
16 PKG_HASH
:=e113142dee891638ad96e0f72cf9277b244477619470b30c41999d312e8e8702
18 PKG_CONFIG_DEPENDS
:= CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/kexec-tools
/Default
25 URL
:=http
://kernel.org
/pub
/linux
/kernel
/people
/horms
/kexec-tools
/
28 define Package
/kexec-tools
29 $(call Package
/kexec-tools
/Default
)
30 TITLE
:=kexec-tools transition meta package
34 define Package
/kexec-tools
/description
35 kexec is a set of system calls that allows you to load
36 another kernel from the currently executing Linux kernel.
37 The kexec utility allows to load and boot another kernel.
41 $(call Package
/kexec-tools
/Default
)
42 TITLE
:=Kernel boots kernel
44 @
(armeb||arm||i386||x86_64||powerpc64||mipsel||mips
) \
45 +KEXEC_ZLIB
:zlib
+KEXEC_LZMA
:liblzma @KERNEL_KEXEC
48 define Package
/kexec
/description
49 The kexec utility allows to load and boot another kernel.
52 define Package
/kexec
/config
53 source
"$(SOURCE)/Config.in"
56 KEXEC_TARGET_NAME
:=$(ARCH
)-linux-
$(TARGET_SUFFIX
)
59 --target
=$(KEXEC_TARGET_NAME
) \
60 --host
=$(REAL_GNU_TARGET_NAME
) \
61 --build
=$(GNU_HOST_NAME
) \
68 --libexecdir
=/usr
/lib \
70 $(if
$(CONFIG_KEXEC_ZLIB
),--with
,--without
)-zlib \
71 $(if
$(CONFIG_KEXEC_LZMA
),--with
,--without
)-lzma \
72 TARGET_LD
="$(TARGET_CROSS)ld"
74 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
75 TARGET_LDFLAGS
+= -Wl
,--gc-sections
78 BUILD_CC
="$(HOSTCC)" \
79 TARGET_CC
="$(TARGET_CC)"
82 $(MAKE
) -C
$(PKG_BUILD_DIR
) DESTDIR
="$(PKG_INSTALL_DIR)" all install
85 define Package
/kexec-tools
/install
89 define Package
/kexec
/install
90 $(INSTALL_DIR
) $(1)/usr
/sbin
91 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kexec
$(1)/usr
/sbin
93 # make a link for compatability with other distros
94 $(INSTALL_DIR
) $(1)/sbin
95 $(LN
) ..
/usr
/sbin
/kexec
$(1)/sbin
/kexec
98 $(eval
$(call BuildPackage
,kexec-tools
))
99 $(eval
$(call BuildPackage
,kexec
))