summaryrefslogtreecommitdiff
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
commitccbc63577061c015dee6019d134d0ab990eb5cdd (patch)
tree27ce114be635fa6b894c4aa2e201dc47142a96fb /package/kexec-tools
parent2d7d23885d742f899c43f656db62301e725c04aa (diff)
downloadmtk-20170518-ccbc63577061c015dee6019d134d0ab990eb5cdd.zip
mtk-20170518-ccbc63577061c015dee6019d134d0ab990eb5cdd.tar.gz
mtk-20170518-ccbc63577061c015dee6019d134d0ab990eb5cdd.tar.bz2
Allow kexec to directly use the kernel exposed in a mtd partition and reboot using the right command line
SVN-Revision: 9322
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 d31aeaa..6274cb8 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 0000000..8871d8a
--- /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