summaryrefslogtreecommitdiff
path: root/import-layers/meta-openembedded/meta-oe/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/meta-openembedded/meta-oe/recipes-kernel')
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb2
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch87
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb (renamed from import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb)5
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb36
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch127
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb46
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc49
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch103
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch62
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb11
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc2
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init2
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service2
-rw-r--r--import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb4
14 files changed, 444 insertions, 94 deletions
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
index c963c8ef9..4abd273fa 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "cpupower is a collection of tools to examine and tune power \
saving related features of your processor."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-DEPENDS = "pciutils"
+DEPENDS = "pciutils gettext-native"
PROVIDES = "virtual/cpupower"
inherit kernelsrc kernel-arch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch
deleted file mode 100644
index 1e7ce6b38..000000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 423ebdce07aa9f398f32c0adf659353069d023c6 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 4 May 2017 07:14:13 +0000
-Subject: [PATCH] crash: fix build failure with mips
-
-When build crash with mips:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-mips-linux-nat.c:157:1: error: conflicting types for 'ps_get_thread_area'
- ps_get_thread_area (const struct ps_prochandle *ph,
- ^~~~~~~~~~~~~~~~~~
-In file included from gdb_proc_service.h:26:0,
- from mips-linux-nat.c:32:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This problem have been fixed on intel and arm plantform, we can use the
-similar approch to fix it on mips.
-
-Upstream-status: Submitted [https://github.com/crash-utility/crash/pull/11]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- Makefile | 1 +
- crash-fix-build-failure-with-mips.patch | 39 +++++++++++++++++++++++++++++++++
- 2 files changed, 40 insertions(+)
- create mode 100644 crash-fix-build-failure-with-mips.patch
-
-diff --git a/Makefile b/Makefile
-index 5496523..2ec3325 100644
---- a/Makefile
-+++ b/Makefile
-@@ -268,6 +268,7 @@ gdb_patch:
- grep 'extern ps_err_e ps_get_thread_area (struct' ${RECIPE_SYSROOT}/usr/include/proc_service.h; \
- if [ $$? -eq 0 ]; then \
- patch -p0 < ${GDB}-proc_service.h.patch; \
-+ patch -p1 < crash-fix-build-failure-with-mips.patch; \
- fi; \
- fi
-
-diff --git a/crash-fix-build-failure-with-mips.patch b/crash-fix-build-failure-with-mips.patch
-new file mode 100644
-index 0000000..0c70c5f
---- /dev/null
-+++ b/crash-fix-build-failure-with-mips.patch
-@@ -0,0 +1,39 @@
-+From 615c802d9c73fad48723b6567042cd54f6795849 Mon Sep 17 00:00:00 2001
-+From: Dengke Du <dengke.du@windriver.com>
-+Date: Thu, 4 May 2017 06:14:47 +0000
-+Subject: [PATCH] crash: fix build failure with mips
-+
-+When build crash with mips:
-+
-+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+mips-linux-nat.c:157:1: error: conflicting types for 'ps_get_thread_area'
-+ ps_get_thread_area (const struct ps_prochandle *ph,
-+ ^~~~~~~~~~~~~~~~~~
-+In file included from gdb_proc_service.h:26:0,
-+ from mips-linux-nat.c:32:
-+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+
-+This problem have been fixed on intel and arm plantform, we can use the
-+similar approch to fix it on mips.
-+
-+Signed-off-by: Dengke Du <dengke.du@windriver.com>
-+---
-+ gdb-7.6/gdb/mips-linux-nat.c | 2 +-
-+ 1 file changed, 1 insertion(+), 1 deletion(-)
-+
-+diff --git a/gdb-7.6/gdb/mips-linux-nat.c b/gdb-7.6/gdb/mips-linux-nat.c
-+index 61e83c6..d517e37 100644
-+--- a/gdb-7.6/gdb/mips-linux-nat.c
-++++ b/gdb-7.6/gdb/mips-linux-nat.c
-+@@ -154,7 +154,7 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store)
-+ /* Fetch the thread-local storage pointer for libthread_db. */
-+
-+ ps_err_e
-+-ps_get_thread_area (const struct ps_prochandle *ph,
-++ps_get_thread_area (struct ps_prochandle *ph,
-+ lwpid_t lwpid, int idx, void **base)
-+ {
-+ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
-+--
-+2.11.0
-+
---
-2.11.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb
index d40937e93..9bea48e0d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb
@@ -24,10 +24,9 @@ SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;download
file://remove-unrecognized-gcc-option-m32-for-mips.patch \
file://0002-crash-fix-build-error-unknown-type-name-gdb_fpregset.patch \
file://0003-crash-detect-the-sysroot-s-glibc-header-file.patch \
- file://0004-crash-fix-build-failure-with-mips.patch \
"
-SRC_URI[md5sum] = "f3b44a151dbe7046462b9caaa9847ca6"
-SRC_URI[sha256sum] = "c48e1269443a6a8e8337e328b21b03e4e50248f607eed83fbb27eb0d833d6aa4"
+SRC_URI[md5sum] = "48899de3118e04cfa40a2364f5618193"
+SRC_URI[sha256sum] = "5d076e1fefb41aa178ad3e1cef6511670efc47de5cb04d4af9bdd4e8f2f18cbc"
SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470"
SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb
new file mode 100644
index 000000000..9f73d2799
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utility for IPMI control"
+DESCRIPTION = "This package contains a utility for interfacing with devices that support \
+the Intelligent Platform Management Interface specification. IPMI is \
+an open standard for machine health, inventory, and remote power control. \
+\
+This utility can communicate with IPMI-enabled devices through either a \
+kernel driver such as OpenIPMI or over the RMCP LAN protocol defined in \
+the IPMI specification. IPMIv2 adds support for encrypted LAN \
+communications and remote Serial-over-LAN functionality. \
+\
+It provides commands for reading the Sensor Data Repository (SDR) and \
+displaying sensor values, displaying the contents of the System Event \
+Log (SEL), printing Field Replaceable Unit (FRU) information, reading and \
+setting LAN configuration, and chassis power control. \
+"
+
+HOMEPAGE = "http://ipmitool.sourceforge.net/"
+SECTION = "kernel/userland"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9aa91e13d644326bf281924212862184"
+
+DEPENDS = "openssl readline ncurses"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ipmitool/ipmitool-${PV}.tar.bz2"
+SRC_URI[md5sum] = "bab7ea104c7b85529c3ef65c54427aa3"
+SRC_URI[sha256sum] = "0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01"
+
+inherit autotools
+
+# --disable-dependency-tracking speeds up the build
+# --enable-file-security adds some security checks
+# --disable-intf-free disables FreeIPMI support - we don't want to depend on
+# FreeIPMI libraries, FreeIPMI has its own ipmitoool-like utility.
+#
+EXTRA_OECONF = "--disable-dependency-tracking --enable-file-security --disable-intf-free"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
new file mode 100644
index 000000000..33116b3c0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
@@ -0,0 +1,127 @@
+allow systemd path to be defined by configure option.
+
+The configure probes the host for systemd path information.
+
+Upstream Status: Inappropriate [Embedded]
+
+Signed-off-By: Armin Kuster <akuster@mvista.com>
+
+Index: ipmiutil-3.0.5/configure.ac
+===================================================================
+--- ipmiutil-3.0.5.orig/configure.ac
++++ ipmiutil-3.0.5/configure.ac
+@@ -149,7 +149,6 @@ CROSS_LFLAGS=""
+ CROSS_CFLAGS=""
+ LIBSENSORS=""
+ SAM2OBJ="isensor2.o ievents2.o"
+-SYSTEMD_DIR=/usr/share/ipmiutil
+
+ AC_ARG_ENABLE([useflags],
+ [ --enable-useflags include environment CFLAGS and LDFLAGS.],
+@@ -200,29 +199,42 @@ AC_ARG_ENABLE([gpl],
+
+ dnl Does this Linux have systemd enabled? Otherwise use sysv init.
+ AC_ARG_ENABLE([systemd],
+- [ --enable-systemd enable systemd service type=notify support and %_unitdir [[default=disabled]]],)
+-if test "x$enable_systemd" = "xyes"; then
+- GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
+- # if systemd enabled, install service scripts in unitdir
+- which rpm >/dev/null 2>&1
+- if test $? -eq 0 ; then
+- SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
+- else
+- SYSTEMD_DIR=/usr/share/ipmiutil
+- fi
++ [ --enable-systemd[=systemddir] install systemd unit file. If 'yes'
++ probe the system for unit directory.
++ If a path is specified, assume that
++ is a valid install path. [[default=disabled]]],)
++# Check whether --enable-systemd was given.
++if test "${enable_systemd+set}" = set; then :
++ withval=$enable_systemd; if test "$withval" = yes; then
++ GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
++ if test -z "$systemddir"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of the systemd unit files directory" >&5
++ $as_echo_n "checking location of the systemd unit files directory... " >&6; }
++ _rpmdir = ""
++ which rpm >/dev/null 2>&1
++ if test $? -eq 0 ; then
++ _rpmdir = `rpm --eval "%{_unitdir}"`
++ fi
++ for systemd_d in ${datadir}/usr/share/ipmiutil ${_rpmdir} /usr/share/ipmiutil; do
++ if test -z "$systemddir"; then
++ if test -d "$systemd_d"; then
++ systemddir="$systemd_d"
++ fi
++ fi
++ done
++ fi
++ if test -n "$systemddir"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $systemddir" >&5
++ $as_echo "$systemddir" >&6; }
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
++ $as_echo "not found" >&6; }
++ fi
+ else
+- # otherwise install the systemd service scripts in the data dir
+- SYSTEMD_DIR=/usr/share/ipmiutil
+- if test "x$sysname" != "xDarwin" ; then
+- if test "x$os" != "xhpux" ; then
+- # MacOS and HP-UX: 'which' command returns 0 always
+- which rpm >/dev/null 2>&1
+- if test $? -eq 0 ; then
+- datad=`rpm --eval "%{_datadir}"`
+- SYSTEMD_DIR=${datad}/ipmiutil
+- fi
+- fi
+- fi
++ if test "$withval" != no; then
++ systemddir=$withval
++ fi
++fi
+ fi
+
+ dnl start main logic
+@@ -528,7 +540,7 @@ AC_SUBST(INS_LIB)
+ AC_SUBST(SUBDIR_S)
+ AC_SUBST(CROSS_CFLAGS)
+ AC_SUBST(CROSS_LFLAGS)
+-AC_SUBST(SYSTEMD_DIR)
++AC_SUBST(systemddir)
+ AC_SUBST(SHR_LINK)
+ AC_SUBST(pkgconfigdir)
+
+Index: ipmiutil-3.0.5/scripts/Makefile.am
+===================================================================
+--- ipmiutil-3.0.5.orig/scripts/Makefile.am
++++ ipmiutil-3.0.5/scripts/Makefile.am
+@@ -17,7 +17,8 @@ cronto = ${DESTDIR}${etcdir}/cron.daily
+ sbinto = ${DESTDIR}${sbindir}
+ varto = ${DESTDIR}/var/lib/ipmiutil
+ initto = ${DESTDIR}@INIT_DIR@
+-sysdto = ${DESTDIR}@SYSTEMD_DIR@
++sysdto = ${DESTDIR}@systemddir@
++systemddir = @systemddir@
+ sysvinit = ${datato}
+ sbinfls = ialarms ihealth ifru igetevent ireset icmd isol ilan isensor isel iserial iwdt iconfig ipicmg ifirewall ifwum ihpm iuser
+
+@@ -47,10 +48,14 @@ install:
+ ${INSTALL_SCRIPT_SH} ipmi_port.sh ${sysvinit}/ipmi_port
+ ${INSTALL_SCRIPT_SH} ipmi_info ${sysvinit}/ipmi_info
+ ${INSTALL_SCRIPT_SH} checksel ${datato}
+- ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}
+- ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}
+- ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}
+- ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}
++
++ if [ ! -z "${systemddir}" ]; then \
++ $(MKDIR) ${sysdto}; \
++ ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}; \
++ ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}; \
++ ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}; \
++ ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}; \
++ fi
+ ${INSTALL_SCRIPT_SH} ipmiutil.env ${datato}
+ ${INSTALL_SCRIPT_SH} ipmiutil.pre ${datato}
+ ${INSTALL_SCRIPT_SH} ipmiutil.setup ${datato}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb
new file mode 100644
index 000000000..338cafd53
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb
@@ -0,0 +1,46 @@
+SUMMARY = "ipmiutil is an easy-to-use set of IPMI server management utilities.\
+It can get/set sensor thresholds, automate SEL management, do SOL console, etc."
+
+DESCRIPTION = "The IPMI Management Utilities currently work with platforms that \
+support the IPMI 1.5 or 2.0 specification. IPMI servers can be managed\
+locally, or remotely via IPMI LAN, even when the OS or main CPU is not\
+functional.\n \
+The ipmiutil utilities will use an IPMI Driver, either the Intel IPMI package \
+(ipmidrvr, /dev/imb), MontaVista OpenIPMI (/dev/ipmi0), the valinux IPMI \
+Driver (/dev/ipmikcs), or the LANDesk ldipmi daemon. The ipmiutil utilities \
+can also use direct user-space I/Os in Linux or FreeBSD if no IPMI driver \
+is detected."
+
+HOMEPAGE = "http://ipmiutil.sourceforge.net"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=626a5970304daa1fcb87f757fb42b795"
+
+DEPENDS += "openssl"
+
+PARALLEL_MAKE = ""
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ipmiutil/ipmiutil-${PV}.tar.gz \
+ file://fix_systemd_path.patch \
+ "
+SRC_URI[md5sum] = "5feaf6a827205792e057bb4ff5c4e842"
+SRC_URI[sha256sum] = "b2d7f72535131c7832ba4be13dc33c81513fc3ee43fe797b4b52014600ecee5e"
+
+inherit autotools-brokensep pkgconfig systemd
+
+PACKAGECONFIG ?= "lanplus gpl"
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--enable-systemd=${datadir}/${BPN}, --enable-systemd=no"
+PACKAGECONFIG[sha256] = "--enable-sha256, --enable-sha256=no, openssl-native, openssl"
+PACKAGECONFIG[lanplus] = "--enable-lanplus, --enable-lanplus=no, openssl-native, openssl"
+PACKAGECONFIG[landesk] = "--enable-landesk, --enable-landesk=no"
+PACKAGECONFIG[sensors] = "--enable-libsensors, --enable-libsensors=no"
+
+#build with some GPL code
+PACKAGECONFIG[gpl] = "--enable-gpl, --enable-gpl=no"
+#no GPL or LanPlus libs
+PACKAGECONFIG[standalone] = "--enable-standalone, --enable-standalone=no"
+
+CFLAGS += "-I${STAGING_INCDIR}"
+LDFLAGS += "-L${STAGING_LIBDIR}"
+
+COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc
new file mode 100644
index 000000000..b1e73e954
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc
@@ -0,0 +1,49 @@
+SUMMARY = "Linux dynamic kernel patching infrastructure"
+DESCRIPTION = "kpatch is a Linux dynamic kernel patching infrastructure which allows you to patch a running kernel without rebooting or restarting any processes."
+LICENSE = "GPLv2 & LGPLv2"
+DEPENDS = "elfutils bash"
+
+SRC_URI = "git://github.com/dynup/kpatch.git;protocol=https \
+ file://0001-kpatch-build-add-cross-compilation-support.patch \
+ file://0002-kpatch-build-allow-overriding-of-distro-name.patch \
+ "
+
+EXTRA_OEMAKE = " \
+ PREFIX=${prefix} \
+ BINDIR=${D}${bindir} \
+ SBINDIR=${D}${sbindir} \
+ LIBDIR=${D}${libdir} \
+ MANDIR=${D}${mandir}/man1 \
+ SYSTEMDDIR=${D}${systemd_system_unitdir} \
+ DESTDIR=${D} \
+ BUILDMOD=no \
+ CC='${CC}' \
+ "
+
+S = "${WORKDIR}/git"
+
+do_install () {
+ oe_runmake install
+}
+
+PACKAGES =+ "kpatch-build"
+PROVIDES += "kpatch-build"
+
+COMPATIBLE_HOST = "(x86_64).*-linux"
+
+RDEPENDS_${PN} = "bash binutils"
+RDEPENDS_kpatch-build = "bash glibc-utils"
+
+FILES_${PN} = " \
+ ${sbindir}/kpatch \
+ ${systemd_system_unitdir}/kpatch.service \
+ ${mandir}/man1/kpatch.1.gz \
+ "
+FILES_kpatch-build = " \
+ ${bindir}/kpatch-build \
+ ${libexecdir}/* \
+ ${datadir}/kpatch \
+ ${mandir}/man1/kpatch-build.1.gz \
+ "
+
+SYSTEMD_SERVICE_${PN} = "kpatch.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
new file mode 100644
index 000000000..459fb2197
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
@@ -0,0 +1,103 @@
+From a9a80a1f4df65892a0269295ce8a64b06f2ff61d Mon Sep 17 00:00:00 2001
+From: Ruslan Bilovol <rbilovol@cisco.com>
+Date: Tue, 19 Dec 2017 15:59:04 +0200
+Subject: [PATCH] kpatch-build: add cross-compilation support
+
+This patch introduces new option for kpatch-build
+script "--cross-compile" which can be used for
+specifying cross-complier prefix.
+It allows to build live patches not only on
+target system, but also on hosts for a target other
+than the one on which the compiler is running
+
+Also removed quotes in exec lines, so it is
+possible to pass multy-component strings like
+"ccache x86_64-xelinux-linux-" as cross-compiler
+
+Upstream-Status: Pending
+
+Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
+---
+ kpatch-build/kpatch-build | 13 +++++++++++--
+ kpatch-build/kpatch-gcc | 4 ++--
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
+index 166ecbd..af24cc4 100755
+--- a/kpatch-build/kpatch-build
++++ b/kpatch-build/kpatch-build
+@@ -195,7 +195,7 @@ gcc_version_check() {
+ # gcc --version varies between distributions therefore extract version
+ # by compiling a test file and compare it to vmlinux's version.
+ echo 'void main(void) {}' > "$c"
+- out="$(gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
++ out="$(${KPATCH_CROSS_COMPILE}gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
+ gccver="$(gcc_version_from_file "$o")"
+ kgccver="$(gcc_version_from_file "$VMLINUX")"
+ rm -f "$c" "$o"
+@@ -381,12 +381,14 @@ usage() {
+ echo " -d, --debug Enable 'xtrace' and keep scratch files" >&2
+ echo " in <CACHEDIR>/tmp" >&2
+ echo " (can be specified multiple times)" >&2
++ echo " --cross-compile Specify the prefix used for all executables" >&2
++ echo " used during compilation" >&2
+ echo " --skip-cleanup Skip post-build cleanup" >&2
+ echo " --skip-gcc-check Skip gcc version matching check" >&2
+ echo " (not recommended)" >&2
+ }
+
+-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
++options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
+
+ eval set -- "$options"
+
+@@ -444,6 +446,10 @@ while [[ $# -gt 0 ]]; do
+ echo "DEBUG mode enabled"
+ fi
+ ;;
++ --cross-compile)
++ KPATCH_CROSS_COMPILE="$2"
++ shift
++ ;;
+ --skip-cleanup)
+ echo "Skipping cleanup"
+ SKIPCLEANUP=1
+@@ -691,6 +697,8 @@ if [[ $DEBUG -ge 4 ]]; then
+ export KPATCH_GCC_DEBUG=1
+ fi
+
++export KPATCH_CROSS_COMPILE
++
+ echo "Building original kernel"
+ ./scripts/setlocalversion --save-scmversion || die
+ make mrproper 2>&1 | logger || die
+@@ -840,6 +848,7 @@ cd "$TEMPDIR/patch" || die
+ KPATCH_BUILD="$SRCDIR" KPATCH_NAME="$MODNAME" \
+ KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS" \
+ KPATCH_LDFLAGS="$KPATCH_LDFLAGS" \
++CROSS_COMPILE="$KPATCH_CROSS_COMPILE" \
+ make 2>&1 | logger || die
+
+ if ! "$KPATCH_MODULE"; then
+diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc
+index 6ba133c..3937948 100755
+--- a/kpatch-build/kpatch-gcc
++++ b/kpatch-build/kpatch-gcc
+@@ -8,7 +8,7 @@ TOOLCHAINCMD="$1"
+ shift
+
+ if [[ -z "$KPATCH_GCC_TEMPDIR" ]]; then
+- exec "$TOOLCHAINCMD" "$@"
++ exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "$@"
+ fi
+
+ declare -a args=("$@")
+@@ -80,4 +80,4 @@ elif [[ "$TOOLCHAINCMD" = "ld" ]] ; then
+ done
+ fi
+
+-exec "$TOOLCHAINCMD" "${args[@]}"
++exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "${args[@]}"
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
new file mode 100644
index 000000000..a9d8a7f2c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
@@ -0,0 +1,62 @@
+From d418d716dae1e2a05131dfb42a19a4da2fc8a85d Mon Sep 17 00:00:00 2001
+From: Ruslan Bilovol <rbilovol@cisco.com>
+Date: Tue, 2 Jan 2018 14:50:03 +0200
+Subject: [PATCH] kpatch-build: allow overriding of distro name
+
+It is sometimes useful to have ability to override
+distro name, for example during cross-compilation
+build when livepatch modules will be ran on the
+target which differs from host.
+
+This patch adds a new --distro option which
+implements all needed functionality
+
+Upstream-Status: Pending
+
+Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
+---
+ kpatch-build/kpatch-build | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
+index af24cc4..4f9f78d 100755
+--- a/kpatch-build/kpatch-build
++++ b/kpatch-build/kpatch-build
+@@ -383,12 +383,13 @@ usage() {
+ echo " (can be specified multiple times)" >&2
+ echo " --cross-compile Specify the prefix used for all executables" >&2
+ echo " used during compilation" >&2
++ echo " --distro Override distro name" >&2
+ echo " --skip-cleanup Skip post-build cleanup" >&2
+ echo " --skip-gcc-check Skip gcc version matching check" >&2
+ echo " (not recommended)" >&2
+ }
+
+-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
++options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,distro:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
+
+ eval set -- "$options"
+
+@@ -450,6 +451,10 @@ while [[ $# -gt 0 ]]; do
+ KPATCH_CROSS_COMPILE="$2"
+ shift
+ ;;
++ --distro)
++ DISTRO="$2"
++ shift
++ ;;
+ --skip-cleanup)
+ echo "Skipping cleanup"
+ SKIPCLEANUP=1
+@@ -526,7 +531,7 @@ fi
+ # Don't check external file.
+ # shellcheck disable=SC1091
+ source /etc/os-release
+-DISTRO="$ID"
++DISTRO="${DISTRO:-${ID}}"
+ if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]]; then
+ [[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux"
+ [[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed"
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
new file mode 100644
index 000000000..e495e2882
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
@@ -0,0 +1,11 @@
+require kpatch.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRCREV = "db6efbb8c7e90d2b761272cf563047119072768f"
+
+PV = "0.5.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
index e20012771..9f14370cd 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
@@ -16,7 +16,7 @@ CMDLINE_DEBUG ?= "loglevel=3"
# Kernel bootlogo is distro-specific (default is OE logo).
# Logo resolution (qvga, vga, ...) is machine-specific.
-LOGO_SIZE ?= '${@base_conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
+LOGO_SIZE ?= '${@oe.utils.conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
# To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or similar
# to your kernel recipe, and then structure your logos for each resolution
# accordingly.
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
index 90ef7fa37..9c96e3156 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
@@ -22,7 +22,7 @@
case "$1" in
start)
- echo "|/usr/bin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
+ echo "|/usr/sbin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
;;
stop)
echo "core" > /proc/sys/kernel/core_pattern
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
index 851b54ccc..45d098f29 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
@@ -4,7 +4,7 @@ Description=Enable minicoredumper.
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=/bin/sh -c '/bin/echo "|/usr/bin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
+ExecStart=/bin/sh -c '/bin/echo "|/usr/sbin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
ExecStop=/bin/sh -c '/bin/echo "core" > /proc/sys/kernel/core_pattern'
[Install]
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
index 1858e102d..0d3c66b07 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
@@ -38,4 +38,8 @@ do_install_append() {
install -m 0644 ${WORKDIR}/minicoredumper.service ${D}${systemd_system_unitdir}
install -d ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/minicoredumper.init ${D}${sysconfdir}/init.d/minicoredumper
+
+ # correct path of minicoredumper
+ sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g ${D}${sysconfdir}/init.d/minicoredumper
+ sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g ${D}${systemd_system_unitdir}/minicoredumper.service
}