All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@ozlabs.org>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC, PATCH 5/8] package/kexec-lite: Add a package for the kexec-lite tools
Date: Thu, 16 Jan 2014 16:52:18 +0800	[thread overview]
Message-ID: <1389862338.919140.855251422258.5.gpush@pablo> (raw)
In-Reply-To: <1389862338.917573.283530987294.0.gpush@pablo>

Kexec-lite is a tiny impementation of kexec for devicetree-based
platforms.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 package/Config.in                                 |    1 
 package/kexec-lite/Config.in                      |    9 +++
 package/kexec-lite/kexec-lite-clean-restart.patch |   34 ++++++++++++++
 package/kexec-lite/kexec-lite.mk                  |   20 ++++++++
 4 files changed, 64 insertions(+)

diff --git a/package/Config.in b/package/Config.in
index 61f4c9e0..f5161475 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -52,6 +52,7 @@ source "package/fio/Config.in"
 source "package/gdb/Config.in"
 source "package/iozone/Config.in"
 source "package/kexec/Config.in"
+source "package/kexec-lite/Config.in"
 source "package/ktap/Config.in"
 source "package/latencytop/Config.in"
 source "package/lmbench/Config.in"
diff --git a/package/kexec-lite/Config.in b/package/kexec-lite/Config.in
new file mode 100644
index 00000000..0dc05155
--- /dev/null
+++ b/package/kexec-lite/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_KEXEC_LITE
+	bool "kexec-lite"
+	depends on BR2_powerpc
+	select BR2_PACKAGE_LIBELF
+	select BR2_PACKAGE_DTC
+	select BR2_PACKAGE_DTC_PROGRAMS
+	help
+	  Kexec is a user space utiltity for loading another kernel
+	  and asking the currently running kernel to do something with it.
diff --git a/package/kexec-lite/kexec-lite-clean-restart.patch b/package/kexec-lite/kexec-lite-clean-restart.patch
new file mode 100644
index 00000000..faaa93a0
--- /dev/null
+++ b/package/kexec-lite/kexec-lite-clean-restart.patch
@@ -0,0 +1,34 @@
+From 0a654c20e1b9324c57ba4116b52fb6ab33847e1d Mon Sep 17 00:00:00 2001
+From: Jeremy Kerr <jk@ozlabs.org>
+Date: Thu, 8 Aug 2013 17:16:31 +0800
+Subject: [PATCH] kexec: Implement clean restart for busybox init
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+---
+ kexec.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kexec.c b/kexec.c
+index 2edb7df..b2a0c42 100644
+--- a/kexec.c
++++ b/kexec.c
+@@ -27,6 +27,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <syscall.h>
++#include <signal.h>
+ #include <libfdt.h>
+ #include <getopt.h>
+ #include <sys/types.h>
+@@ -818,7 +819,7 @@ int main(int argc, char *argv[])
+ 			sync();
+ 			exec_kexec();
+ 		} else {
+-			execlp("shutdown", "shutdown", "-r", "now", NULL);
++			kill(1, SIGQUIT);
+ 		}
+ 
+ 		return -1;
+-- 
+1.7.10.4
+
diff --git a/package/kexec-lite/kexec-lite.mk b/package/kexec-lite/kexec-lite.mk
new file mode 100644
index 00000000..4d844f43
--- /dev/null
+++ b/package/kexec-lite/kexec-lite.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# kexec
+#
+################################################################################
+
+KEXEC_LITE_VERSION = 6c762a7
+KEXEC_LITE_SITE = git://github.com/antonblanchard/kexec-lite
+KEXEC_LITE_LICENSE = GPL
+KEXEC_LITE_DEPENDENCIES = libelf dtc
+
+define KEXEC_LITE_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+define KEXEC_LITE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/kexec $(TARGET_DIR)/usr/sbin/
+endef
+
+$(eval $(generic-package))

  parent reply	other threads:[~2014-01-16  8:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  8:52 [Buildroot] [RFC, PATCH 0/8] Enable a buildroot-based petitboot bootloader Jeremy Kerr
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 7/8] package/iprutils: Add IBM Power RAID utilities Jeremy Kerr
2014-01-16 13:24   ` Jerzy Grzegorek
2014-01-17  1:58     ` Jeremy Kerr
2014-01-30 20:54   ` Thomas Petazzoni
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 1/8] package/busybox: Add facility for DHCP hooks Jeremy Kerr
2014-03-04 20:01   ` Yann E. MORIN
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 4/8] package/powerpc-utils: Add powerpc hardware utilities Jeremy Kerr
2014-01-16  9:30   ` Baruch Siach
2014-01-16 13:11   ` Jerzy Grzegorek
2014-01-29  8:12   ` Thomas Petazzoni
2014-01-30  1:51     ` Jeremy Kerr
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 2/8] package/dropbear: Add separate configuration options for client and server Jeremy Kerr
2014-03-03 23:46   ` Yann E. MORIN
2014-03-03 23:54     ` Jeremy Kerr
2014-03-04  0:14   ` Gustavo Zacarias
2014-03-04  1:07     ` Jeremy Kerr
2014-03-04  1:44       ` Gustavo Zacarias
2014-03-04  1:51         ` Jeremy Kerr
2014-03-04 18:36           ` Yann E. MORIN
2014-01-16  8:52 ` [Buildroot] [RFC,PATCH 8/8] Add powerpc petitboot defconfig Jeremy Kerr
2014-01-16  8:52 ` Jeremy Kerr [this message]
2014-01-16  9:36   ` [Buildroot] [RFC, PATCH 5/8] package/kexec-lite: Add a package for the kexec-lite tools Baruch Siach
2014-01-17  1:51     ` Jeremy Kerr
2014-01-16 13:17   ` Jerzy Grzegorek
2014-01-30 19:46   ` Thomas Petazzoni
2014-02-03  5:37     ` Jeremy Kerr
2014-02-03  7:04       ` Thomas Petazzoni
2014-02-28  7:11       ` Jeremy Kerr
2014-02-28  7:37         ` Thomas Petazzoni
2014-01-30 19:47   ` Thomas Petazzoni
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 6/8] package/petitboot: Add petitboot, the userspace bootloader Jeremy Kerr
2014-01-30 20:51   ` Thomas Petazzoni
2014-02-28  5:39     ` Jeremy Kerr
2014-01-16  8:52 ` [Buildroot] [RFC, PATCH 3/8] package/ncurses: Allow building wide char support Jeremy Kerr
2014-01-30 19:44   ` Thomas Petazzoni
2014-02-28  2:53     ` Jeremy Kerr
2014-01-17  2:16 ` [Buildroot] [RFC, PATCH 0/8] Enable a buildroot-based petitboot bootloader Jeremy Kerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389862338.919140.855251422258.5.gpush@pablo \
    --to=jk@ozlabs.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.