From: florian Date: Sun, 14 Oct 2007 18:39:20 +0000 (+0000) Subject: Allow kexec to directly use the kernel exposed in a mtd partition and reboot using... X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=244f11bc0d477421ea4e141daadd27646f94e72f;hp=c86bdad40d07025c63140d5f10fbe35276dc4a52;p=openwrt-10.03%2F.git 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 --- diff --git a/package/kexec-tools/Makefile b/package/kexec-tools/Makefile index d31aeaa85..6274cb81c 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 000000000..8871d8aeb --- /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