aboutsummaryrefslogtreecommitdiffstats
path: root/package/kexec-tools
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-10-14 18:39:20 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-10-14 18:39:20 +0000
commit6fb4cf938a160edee3fcd249224197474c7716f8 (patch)
tree33c1ef654d24c3c8d7e28199238c2cd0b8074020 /package/kexec-tools
parentd1cff2795400501434da8f26b0d76622dfde7478 (diff)
downloadupstream-6fb4cf938a160edee3fcd249224197474c7716f8.tar.gz
upstream-6fb4cf938a160edee3fcd249224197474c7716f8.tar.bz2
upstream-6fb4cf938a160edee3fcd249224197474c7716f8.zip
Allow kexec to directly use the kernel exposed in a mtd partition and reboot using the right command line
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9322 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kexec-tools')
-rw-r--r--package/kexec-tools/Makefile1
-rw-r--r--package/kexec-tools/files/kexec.sh5
2 files changed, 6 insertions, 0 deletions
diff --git a/package/kexec-tools/Makefile b/package/kexec-tools/Makefile
index d31aeaa856..6274cb81c3 100644
--- a/package/kexec-tools/Makefile
+++ b/package/kexec-tools/Makefile
@@ -48,6 +48,7 @@ define Package/kexec-tools/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kexec $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdump $(1)/usr/bin/
+ $(INSTALL_BIN) ./files/kexec.sh $(1)/usr/bin/kexec.mtd
endef
$(eval $(call BuildPackage,kexec-tools))
diff --git a/package/kexec-tools/files/kexec.sh b/package/kexec-tools/files/kexec.sh
new file mode 100644
index 0000000000..8871d8aeb9
--- /dev/null
+++ b/package/kexec-tools/files/kexec.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+. /etc/functions.sh
+cmdline="$(cat /proc/cmdline)"
+kernel="$(find_mtd_part kernel)"
+kexec -l $kernel --command-line=$cmdline