summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot')
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch61
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch33
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch97
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch135
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch35
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg/icon.xpm43
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb60
-rw-r--r--import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb75
8 files changed, 539 insertions, 0 deletions
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch
new file mode 100644
index 000000000..6d3270f89
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-fix-build-when-S-B.patch
@@ -0,0 +1,61 @@
+From 8519d61a7097498b0ee93fb8dc8262286825f3e5 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Thu, 1 May 2014 23:58:51 +0200
+Subject: [PATCH 1/4] kexecboot: fix build when S != B
+
+* fatal error: ../config.h: No such file or directory
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ machine/zaurus.c | 2 +-
+ res/theme-gui.h | 2 +-
+ res/theme-tui.h | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/machine/zaurus.c b/machine/zaurus.c
+index ea21047..83be13b 100644
+--- a/machine/zaurus.c
++++ b/machine/zaurus.c
+@@ -25,7 +25,7 @@
+ *
+ */
+
+-#include "../config.h"
++#include "config.h"
+
+ #ifdef USE_ZAURUS
+
+diff --git a/res/theme-gui.h b/res/theme-gui.h
+index f8fef7f..79bed39 100644
+--- a/res/theme-gui.h
++++ b/res/theme-gui.h
+@@ -15,7 +15,7 @@
+ *
+ */
+
+-#include "../config.h"
++#include "config.h"
+
+ #ifdef USE_ICONS
+ /** Icons **/
+diff --git a/res/theme-tui.h b/res/theme-tui.h
+index 94e7693..909be56 100644
+--- a/res/theme-tui.h
++++ b/res/theme-tui.h
+@@ -15,11 +15,11 @@
+ *
+ */
+
+-#include "../config.h"
++#include "config.h"
+
+ #ifdef USE_TEXTUI
+ /** TEXT UI colors **/
+-#include "../termseq.h"
++#include "termseq.h"
+
+ /* Background color pair */
+ #define TUI_CLR_BG TERM_CSI TERM_BG_BLACK ";" TERM_FG_WHITE TERM_SGR
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch
new file mode 100644
index 000000000..ecf422b72
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0002-kexecboot-fix-configure-warnings.patch
@@ -0,0 +1,33 @@
+From b8938acc3f1ab35273fa9a2fa7728050ef72ff65 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Fri, 2 May 2014 00:19:24 +0200
+Subject: [PATCH 2/4] kexecboot: fix configure warnings
+
+Makefile.am:5: warning: source file 'fstype/fstype.c' is in a subdirectory,
+Makefile.am:5: but option 'subdir-objects' is disabled
+automake: warning: possible forward-incompatibility.
+...
+Makefile.am:5: warning: source file 'machine/zaurus.c' is in a subdirectory,
+...
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0ca4b81..66ec54e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,7 +1,7 @@
+ AC_PREREQ(2.53)
+ AC_INIT([kexecboot], [0.6], [kexecboot-devel@linuxtogo.org])
+ AC_CANONICAL_HOST
+-AM_INIT_AUTOMAKE([-Wall foreign])
++AM_INIT_AUTOMAKE([-Wall foreign] [subdir-objects])
+ AC_CONFIG_SRCDIR(kexecboot.c)
+ AC_CONFIG_HEADERS(config.h)
+ AM_MAINTAINER_MODE
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch
new file mode 100644
index 000000000..4caa0d5f0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch
@@ -0,0 +1,97 @@
+From 800dae0d34f8629a34c638a612166b76dda03e27 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sat, 2 Aug 2014 01:13:08 +0200
+Subject: [PATCH 3/4] kexecboot: do not hardcode MOUNTPOINT
+
+Avoid to hardcode it: could be requested as a new configure option.
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ cfgparser.c | 6 +++---
+ kexecboot.c | 18 ++++++++++--------
+ 2 files changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/cfgparser.c b/cfgparser.c
+index 8f6688c..dec27b1 100644
+--- a/cfgparser.c
++++ b/cfgparser.c
+@@ -141,7 +141,7 @@ static int set_kernel(struct cfgdata_t *cfgdata, char *value)
+ return -1;
+ }
+
+- strcpy(sc->kernelpath, "/mnt");
++ strcpy(sc->kernelpath, MOUNTPOINT);
+ strcat(sc->kernelpath, value);
+ return 0;
+ }
+@@ -155,7 +155,7 @@ static int set_icon(struct cfgdata_t *cfgdata, char *value)
+
+ dispose(sc->iconpath);
+ /* Add our mountpoint, since the enduser won't know it */
+- sc->iconpath = malloc(sizeof(MOUNTPOINT)+strlen(value));
++ sc->iconpath = malloc(strlen(MOUNTPOINT)+strlen(value)+1);
+ if (NULL == sc->iconpath) {
+ DPRINTF("Can't allocate memory to store iconpath '%s'", value);
+ return -1;
+@@ -194,7 +194,7 @@ static int set_initrd(struct cfgdata_t *cfgdata, char *value)
+ return -1;
+ }
+
+- strcpy(sc->initrd, "/mnt");
++ strcpy(sc->initrd, MOUNTPOINT);
+ strcat(sc->initrd, value);
+ return 0;
+ }
+diff --git a/kexecboot.c b/kexecboot.c
+index d6657a0..7268d6b 100644
+--- a/kexecboot.c
++++ b/kexecboot.c
+@@ -57,20 +57,22 @@
+ #endif
+
+ #ifdef USE_MACHINE_KERNEL
+-/* Machine-dependent kernel patch */
++/* Machine-dependent kernel path */
+ char *machine_kernel = NULL;
+ #endif
+
++#define PREPEND_MOUNTPATH(string) MOUNTPOINT""string
++
+ /* NULL-terminated array of kernel search paths
+ * First item should be filled with machine-dependent path */
+ char *default_kernels[] = {
+ #ifdef USE_ZIMAGE
+- "/mnt/boot/zImage",
+- "/mnt/zImage",
++ PREPEND_MOUNTPATH("/boot/zImage"),
++ PREPEND_MOUNTPATH("/zImage"),
+ #endif
+ #ifdef USE_UIMAGE
+- "/mnt/boot/uImage",
+- "/mnt/uImage",
++ PREPEND_MOUNTPATH("/boot/uImage"),
++ PREPEND_MOUNTPATH("/uImage"),
+ #endif
+ NULL
+ };
+@@ -149,14 +151,14 @@ char *get_machine_kernelpath() {
+ ++tmp;
+ }
+
+- /* Prepend "/mnt/boot/zImage-" to hw */
+- tmp = malloc(strlen(hw) + 17 + 1); /* strlen("/mnt/boot/zImage-") */
++ /* Prepend MOUNTPOINT"/boot/zImage-" to hw */
++ tmp = malloc(strlen(PREPEND_MOUNTPATH("/boot/zImage-")) + strlen(hw) + 1);
+ if (NULL == tmp) {
+ DPRINTF("Can't allocate memory for machine-specific kernel path");
+ return NULL;
+ }
+
+- strcpy(tmp, "/mnt/boot/zImage-");
++ strcpy(tmp, PREPEND_MOUNTPATH("/boot/zImage-"));
+ strcat(tmp, hw);
+
+ return tmp;
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch
new file mode 100644
index 000000000..6d81d8357
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch
@@ -0,0 +1,135 @@
+From de9a6284df8add6ec03e1d9981d0b6d0595bbc69 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Mon, 10 Nov 2014 23:37:23 +0100
+Subject: [PATCH 4/4] kexecboot.c: workaround for absolute kernel and initrd
+ symlinks
+
+Add MOUNTPOINT prefix if the kernel/initrd symlinks start with '/'.
+Do nothing if the path is a relative symbolic link or not a symlink.
+
+Fix following situation:
+
+root@mizar:/var/tmp# ls -al boot/
+total 2076
+drwxr-xr-x 2 root root 4096 lug 5 01:38 .
+drwxrwxrwt 4 root root 4096 lug 5 12:26 ..
+-rw-r--r-- 1 root root 831 lug 5 01:24 boot.cfg
+-rw-r--r-- 1 root root 1322 lug 5 01:24 icon.xpm
+lrwxrwxrwx 1 root root 34 lug 5 12:26 zImage ->
+/boot/zImage-3.14.5-yocto-standard
+-rw-r--r-- 1 root root 2106832 lug 5 01:20 zImage-3.14.5-yocto-standard
+
+Cannot open `/mnt/boot/zImage': No such file or directory
+Nothing has been loaded!
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ kexecboot.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 44 insertions(+), 9 deletions(-)
+
+diff --git a/kexecboot.c b/kexecboot.c
+index 7268d6b..8a7a7d2 100644
+--- a/kexecboot.c
++++ b/kexecboot.c
+@@ -208,11 +208,16 @@ void start_kernel(struct params_t *params, int choice)
+ const char *load_argv[] = { NULL, "-l", NULL, NULL, NULL, NULL };
+ const char *exec_argv[] = { NULL, "-e", NULL, NULL};
+
+- char *cmdline_arg = NULL, *initrd_arg = NULL;
++ char *cmdline_arg = NULL, *initrd_arg = NULL, *kernel_arg = NULL;
+ int n, idx, u;
+ struct stat sinfo;
+ struct boot_item_t *item;
+
++ /* buffer for readlink (could be truncated) */
++ char buf[512];
++ int len;
++
++
+ item = params->bootcfg->list[choice];
+
+ exec_argv[0] = kexec_path;
+@@ -306,10 +311,17 @@ void start_kernel(struct params_t *params, int choice)
+ }
+ }
+
++ /* Mount boot device */
++ if ( -1 == mount(mount_dev, mount_point, mount_fstype,
++ MS_RDONLY, NULL) ) {
++ perror("Can't mount boot device");
++ exit(-1);
++ }
++
+ /* fill '--initrd' option */
+ if (item->initrd) {
+ /* allocate space */
+- n = sizeof(str_initrd_start) + strlen(item->initrd);
++ n = sizeof(str_initrd_start) + strlen(item->initrd) + 1 + sizeof(mount_point) + sizeof(buf);
+
+ initrd_arg = (char *)malloc(n);
+ if (NULL == initrd_arg) {
+@@ -317,24 +329,46 @@ void start_kernel(struct params_t *params, int choice)
+ } else {
+ strcpy(initrd_arg, str_initrd_start); /* --initrd= */
+ strcat(initrd_arg, item->initrd);
++
++ if ((len = readlink(item->initrd, buf, sizeof(buf)-1)) != -1) {
++ buf[len] = '\0';
++ /* Fix absolute symlinks: prepend MOUNTPOINT */
++ if (buf[0] == '/') {
++ strcpy(initrd_arg, str_initrd_start); /* --initrd= */
++ strcat(initrd_arg, mount_point);
++ strcat(initrd_arg, buf);
++ }
++ }
+ load_argv[idx] = initrd_arg;
+ ++idx;
+ }
+ }
+
+ /* Append kernelpath as last arg of kexec */
+- load_argv[idx] = item->kernelpath;
++ /* allocate space */
++ n = strlen(item->kernelpath) + 1 + sizeof(mount_point) + sizeof(buf);
++
++ kernel_arg = (char *)malloc(n);
++ if (NULL == kernel_arg) {
++ perror("Can't allocate memory for kernel_arg");
++ } else {
++ strcpy(kernel_arg, item->kernelpath);
++
++ if ((len = readlink(item->kernelpath, buf, sizeof(buf)-1)) != -1) {
++ buf[len] = '\0';
++ /* Fix absolute symlinks: prepend MOUNTPOINT */
++ if (buf[0] == '/') {
++ strcpy(kernel_arg, mount_point);
++ strcat(kernel_arg, buf);
++ }
++ }
++ load_argv[idx] = kernel_arg;
++ }
+
+ DPRINTF("load_argv: %s, %s, %s, %s, %s", load_argv[0],
+ load_argv[1], load_argv[2],
+ load_argv[3], load_argv[4]);
+
+- /* Mount boot device */
+- if ( -1 == mount(mount_dev, mount_point, mount_fstype,
+- MS_RDONLY, NULL) ) {
+- perror("Can't mount boot device");
+- exit(-1);
+- }
+
+ /* Load kernel */
+ n = fexecw(kexec_path, (char *const *)load_argv, envp);
+@@ -347,6 +381,7 @@ void start_kernel(struct params_t *params, int choice)
+
+ dispose(cmdline_arg);
+ dispose(initrd_arg);
++ dispose(kernel_arg);
+
+ /* Check /proc/sys/net presence */
+ if ( -1 == stat("/proc/sys/net", &sinfo) ) {
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch
new file mode 100644
index 000000000..b54199b08
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/files/0005-rgb.h-fix-build-with-gcc5.patch
@@ -0,0 +1,35 @@
+From b2c4fc69868a4831ec798ad98f5e7fce200cf0e3 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Thu, 24 Sep 2015 00:02:48 +0200
+Subject: [PATCH] rgb.h: fix build with gcc 5 (C99 inline semantic)
+
+Building with gcc 5.2 we trigger the following error:
+
+rgb.h:55:1: warning: inline function 'rgba2comp' declared but never defined
+| rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
+| ^
+
+https://gcc.gnu.org/gcc-5/porting_to.html
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ rgb.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rgb.h b/rgb.h
+index 0ba987a..4f64622 100644
+--- a/rgb.h
++++ b/rgb.h
+@@ -51,8 +51,7 @@ typedef struct {
+ } kx_named_color;
+
+ /* Convert RGBA uint32 to red/green/blue/alpha components */
+-inline void
+-rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
++void rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
+ kx_ccomp *blue, kx_ccomp *alpha);
+
+ /* Convert hex rgb color to rgba color */
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg/icon.xpm b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg/icon.xpm
new file mode 100644
index 000000000..6e6fd776d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg/icon.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * icon_xpm[] = {
+"32 32 8 1",
+" c None",
+". c #D6DBDE",
+"+ c #9BA6AE",
+"@ c #60727D",
+"# c #B8BFC5",
+"$ c #A9E8F6",
+"% c #12BCE4",
+"& c #57D2EC",
+" ",
+" ",
+" ",
+" .++@@@@++. ",
+" +@@@@@@@@@@@@+ ",
+" #@@@@@@@@@@@@@@@@# ",
+" +@@@@@@@@@@@@@@@@@@+ ",
+" .@@@@@@@@++##+@@@@@@@@@. ",
+" @@@@@@@. .@@@@@@@ ",
+" +@@@@@+ $$$$ #@@@@@+ ",
+" #@@@@@. $%%%%%%%%$ .@@@@@# ",
+" @@@@@. &%%%%%%%%%%& .@@@@@ ",
+" #@@@@+ %%%%%%%%%%%%%% +@@@@# ",
+" @@@@@ &%%%%%%%%%%%%%%& @@@@@ ",
+".@@@@. $%%%%%& $%%%%%& .@@@@.",
+"+@@@@ %%%%% $%%%%%& @@@@+",
+"+@@@+ %%%%$ $%%%%%& $$ +@@@+",
+"@@@@+ $%%%% $%%%%%& $%$ +@@@@",
+"@@@@# &%%%& &%%%%& $%%& #@@@@",
+"@@@@. &%%%& %%%%& $%%%& .@@@@",
+"@@@@# $%%%& &%%& &%%%$ #@@@@",
+"+@@@+ $%%%% %%%%$ +@@@+",
+"+@@@@ %%%%& &%%%% @@@@+",
+"#@@@@ &%%%%& &%%%%& @@@@#",
+" @@@@+ %%%%%%&$$&%%%%%% +@@@@ ",
+" +@@@@. $%%%%%%%%%%%%%%$ .@@@@+ ",
+" .@@@@@ $%%%%%%%%%%%%$ @@@@@. ",
+" #++++. &%%%%%%%%& .++++# ",
+" $&&%%&&$ ",
+" ",
+" ",
+" "};
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
new file mode 100644
index 000000000..69f38721b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
@@ -0,0 +1,60 @@
+SUMMARY = "Configuration files for kexecboot"
+DESCRIPTION = "Default icon and boot.cfg for kexecboot linux-as-bootloader."
+SECTION = "base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+SRC_URI = "file://icon.xpm"
+
+S = "${WORKDIR}"
+
+do_install_prepend () {
+echo '# /boot/boot.cfg - KEXECBOOT configuration file.
+#
+# First kernel stanza.
+# Show this label in kexecboot menu.
+#
+LABEL=${KEXECBOOT_LABEL}
+#
+# Specify full kernel path on target.
+KERNEL=/boot/${KERNEL_IMAGETYPE}
+#
+# Append this tags to the kernel cmdline.
+APPEND=${CMDLINE} ${CMDLINE_DEBUG}
+#
+# Specify optional initrd/initramfs.
+# INITRD=/boot/initramfs.cpio.gz
+#
+# Specify full path for a custom icon for the menu-item.
+# If not set, use device-icons as default (NAND, SD, CF, ...).
+# ICON=/boot/icon.xpm
+#
+# Priority of item in kexecboot menu.
+# Items with highest priority will be shown at top of menu.
+# Default: 0 (lowest, ordered by device ordering)
+# PRIORITY=10
+#
+#
+# Second kernel stanza.
+# LABEL=${KEXECBOOT_LABEL}-test
+# KERNEL=/boot/${KERNEL_IMAGETYPE}-test
+# APPEND=${CMDLINE}
+#' > ${S}/boot.cfg
+}
+do_install () {
+ install -d ${D}/boot
+ install -m 0644 boot.cfg ${D}/boot/boot.cfg
+ install -m 0644 icon.xpm ${D}/boot/icon.xpm
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} += "/boot/*"
+
+CMDLINE ?= ""
+CMDLINE_DEBUG ?= "quiet"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+# Note: for qvga the label is currently limited to about 24 chars
+KEXECBOOT_LABEL ?= "${@d.getVar('DISTRO', True) or d.getVar('DISTRO_VERSION', True)}-${MACHINE}"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
new file mode 100644
index 000000000..45095f311
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
@@ -0,0 +1,75 @@
+###########################
+# Configure options:
+#
+# --enable-static-linking compile kexecboot as static executable [default=no]
+# --enable-fbui support framebuffer menu [default=yes]
+# --enable-fbui-width limit FB UI width to specified value [default=no]
+# --enable-fbui-height limit FB UI height to specified value [default=no]
+# --enable-textui support console text user interface [default=no]
+# --enable-cfgfiles support config files [default=yes]
+# --enable-icons support custom icons (depends on fbui) [default=yes]
+# --enable-zaurus compile Sharp Zaurus specific code [default=no]
+# --enable-zimage compile with zImage support [default=yes]
+# --enable-uimage compile with uImage support [default=no]
+# --enable-machine-kernel look for machine-specific zImage kernel [default=no]
+# --enable-devices-recreating
+# enable devices re-creating [default=yes]
+# --enable-debug enable debug output [default=no]
+# --enable-host-debug allow for non-destructive executing of kexecboot on
+# host system [default=no]
+# --enable-numkeys enable menu item selection by keys [0-9] [default=yes]
+# --enable-bg-buffer enable buffer for pre-drawed FB GUI background
+#
+# --enable-timeout allow to boot 1st kernel after timeout in seconds
+# [default=no]
+# --enable-delay specify delay before device scanning, allowing
+# initialization of old CF/SD cards [default=1]
+# --enable-bpp enable support of specified bpp modes
+# (all,32,24,18,16,4,2,1) [default=all]
+# --enable-evdev-rate change evdev (keyboard/mouse) repeat rate
+# in milliseconds e.g. "1000,250" [default=no]
+# --with-kexec-binary look for kexec binary at path
+# [default="/usr/sbin/kexec"]
+##########################
+SUMMARY = "kexecboot linux-as-bootloader"
+DESCRIPTION = "kexecboot is a graphical linux-as-bootloader implementation based on kexec."
+HOMEPAGE = "http://kexecboot.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+S = "${WORKDIR}/kexecboot-${PV}"
+SRC_URI = "https://github.com/kexecboot/kexecboot/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "46b7c1a6f20531be56445ebb8669a2b8"
+SRC_URI[sha256sum] = "6b360b8aa59bc5d68a96705349a0dd416f8ed704e931fa0ac7849298258f0f15"
+
+SRC_URI += "\
+ file://0001-kexecboot-fix-build-when-S-B.patch \
+ file://0002-kexecboot-fix-configure-warnings.patch \
+ file://0003-kexecboot-do-not-hardcode-MOUNTPOINT.patch \
+ file://0004-kexecboot.c-workaround-for-absolute-kernel-and-initr.patch \
+ \
+ file://0005-rgb.h-fix-build-with-gcc5.patch \
+ "
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 kexecboot ${D}${bindir}
+ install -d ${D}/proc
+ install -d ${D}/mnt
+ install -d ${D}/dev
+ install -d ${D}/sys
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
+
+pkg_postinst_${PN} () {
+ ln -sf ${bindir}/kexecboot $D/init
+}
+
+BBCLASSEXTEND = "klibc"
OpenPOWER on IntegriCloud