1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-18 14:47:46 +01:00

Allow kexec to directly use the kernel exposed in a mtd partition and reboot using the right command line

SVN-Revision: 9322
This commit is contained in:
Florian Fainelli 2007-10-14 18:39:20 +00:00
parent 2d7d23885d
commit ccbc635770
2 changed files with 6 additions and 0 deletions

@ -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))

@ -0,0 +1,5 @@
#!/bin/sh
. /etc/functions.sh
cmdline="$(cat /proc/cmdline)"
kernel="$(find_mtd_part kernel)"
kexec -l $kernel --command-line=$cmdline