criu: upgrade from version from 1.2 to 1.4

Upgrade criu from version from 1.2 to 1.4.
criu is the only user of protobuf and only supported on x86 and arm,
so limit protobuf support on x86 and arm too.

Signed-off-by: Nam Ninh <nam.ninh@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Nam Ninh 2015-03-30 18:10:53 -04:00 committed by Bruce Ashfield
parent aafab33979
commit 9a095cb70e
7 changed files with 82 additions and 104 deletions

View File

@ -1,39 +0,0 @@
SUMMARY = "CRIU"
DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software \
tool for Linux operating system. Using this tool, you can freeze a running \
application (or part of it) and checkpoint it to a hard drive \
as a collection of files. You can then use the files to restore and run \
the application from the point it was frozen at. The distinctive feature \
of the CRIU project is that it is mainly implemented in user space"
HOMEPAGE = "http://criu.org"
SECTION = "console/tools"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa"
SRCREV = "v1.2"
PR = "r0"
PV = "1.2"
SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
file://0001-Makefile-Fix-hardcoding.patch"
DEPENDS += "protobuf-c-native protobuf-c"
S = "${WORKDIR}/git"
ARMV_armv7a = "ARMV=7"
ARMV_armv6 = "ARMV=6"
ARMV ?= ""
EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0 ${ARMV}"
do_compile () {
unset CFLAGS
unset LDFLAGS
oe_runmake
}
do_install () {
mkdir -p ${D}/${bindir}
install -m 755 ${S}/criu ${D}/${bindir}/criu
}

View File

@ -1,29 +1,55 @@
SUMMARY = "CRIU" SUMMARY = "CRIU"
DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux operating system. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space" DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for \
Linux operating system. Using this tool, you can freeze a running application \
(or part of it) and checkpoint it to a hard drive as a collection of files. \
You can then use the files to restore and run the application from the point \
it was frozen at. The distinctive feature of the CRIU project is that it is \
mainly implemented in user space"
HOMEPAGE = "http://criu.org" HOMEPAGE = "http://criu.org"
SECTION = "console/tools" SECTION = "console/tools"
LICENSE = "GPLv2" LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366" EXCLUDE_FROM_WORLD = "1"
SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142" LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa"
SRCREV = "bda033e1e91ac5b86afd0a9fdb9fcdd581da6185"
PR = "r0" PR = "r0"
PV = "0.2+git${SRCPV}" PV = "1.4+git${SRCPV}"
SRC_URI = "git://git.criu.org/crtools.git;protocol=git \ SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
file://0001-Fixed-hardcoding.patch" file://0001-criu-Fix-toolchain-hardcode.patch \
file://0002-criu-Skip-documentation-install.patch \
"
COMPATIBLE_HOST = "(x86_64|arm).*-linux"
DEPENDS += "protobuf-c-native protobuf-c" DEPENDS += "protobuf-c-native protobuf-c"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0" #
# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
# if the ARCH is ARMv7 or ARMv6.
# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
#
EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0"
EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0"
EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
export LDFLAGS=""
do_compile () { do_compile () {
oe_runmake oe_runmake
} }
do_install () { do_install () {
mkdir -p ${D}/${bindir} oe_runmake DESTDIR="${D}" install
install -m 755 ${S}/crtools ${D}/${bindir}/crtools
} }
FILES_${PN} += "${systemd_unitdir}/"

View File

@ -1,47 +0,0 @@
From 32c6c037a6de0a0972e16949ebb64ffebb5b7bcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Nystr=C3=B6m?= <david.nystrom@enea.com>
Date: Wed, 28 Nov 2012 15:07:27 +0100
Subject: [PATCH] Fixed hardcoding
---
Makefile.inc | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 722cbfc..3ae693e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -11,18 +11,18 @@ else
endif
export E Q
-FIND := find
-CSCOPE := cscope
-TAGS := ctags
-RM := rm
-LD := ld
-HEXDUMP := hexdump
-CC := gcc
-ECHO := echo
-NM := nm
-AWK := awk
-SH := sh
-MAKE := make
+FIND ?= find
+CSCOPE ?= cscope
+TAGS ?= ctags
+RM ?= rm
+LD ?= ld
+HEXDUMP ?= hexdump
+CC ?= gcc
+ECHO ?= echo
+NM ?= nm
+AWK ?= awk
+SH ?= sh
+MAKE ?= make
# Additional ARCH settings for x86
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
--
1.7.9.5

View File

@ -1,15 +1,19 @@
From fa785bb1eb9cb0039d77836f4658c7bcccae5999 Mon Sep 17 00:00:00 2001 From 3d4f112fdb434712eba09239a468842323f1af4c Mon Sep 17 00:00:00 2001
From: Alexey Firago <alexey_firago@mentor.com> From: Yang Shi <yang.shi@windriver.com>
Date: Wed, 9 Jul 2014 02:01:11 +0400 Date: Tue, 26 Aug 2014 14:42:42 -0700
Subject: [PATCH] Makefile: Fix hardcoding Subject: [PATCH 1/2] criu: Fix toolchain hardcode
Signed-off-by: Alexey Firago <alexey_firago@mentor.com> Replace ":=" to "?=" so that the toolchain used by bitbake build system will
be taken.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Nam Ninh <nam.ninh@windriver.com>
--- ---
Makefile | 18 +++++++++--------- Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-) 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index bda808d..4614ae2 100644 index f1c8784..43252ec 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -23,15 +23,15 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR @@ -23,15 +23,15 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR
@ -38,5 +42,5 @@ index bda808d..4614ae2 100644
CFLAGS += $(USERCFLAGS) CFLAGS += $(USERCFLAGS)
-- --
1.9.1 2.0.2

View File

@ -0,0 +1,29 @@
From e9c2a94b9eb37ad24672b10caa398bd18282b962 Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@windriver.com>
Date: Tue, 26 Aug 2014 14:44:51 -0700
Subject: [PATCH 2/2] criu: Skip documentation install
asciidoc is needed to generate CRIU documentation, so skip it in install.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Nam Ninh <nam.ninh@windriver.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 43252ec..e25edcc 100644
--- a/Makefile
+++ b/Makefile
@@ -265,7 +265,7 @@ install: $(PROGRAM) install-man
$(Q) install -m 644 scripts/logrotate.d/criu-service $(DESTDIR)$(LOGROTATEDIR)
install-man:
- $(Q) $(MAKE) -C Documentation install
+# $(Q) $(MAKE) -C Documentation install
.PHONY: install install-man
--
2.0.2

View File

@ -8,6 +8,8 @@ LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333
PR = "r0" PR = "r0"
COMPATIBLE_HOST = "(x86_64|arm).*-linux"
DEPENDS = "protobuf" DEPENDS = "protobuf"
SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8" SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8"

View File

@ -9,6 +9,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514" LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"
PR = "r0" PR = "r0"
EXCLUDE_FROM_WORLD = "1"
SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8" SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8"
SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e" SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e"
@ -16,6 +17,8 @@ SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \
file://protobuf-allow-running-python-scripts-from-anywhere.patch \ file://protobuf-allow-running-python-scripts-from-anywhere.patch \
file://run-ptest" file://run-ptest"
COMPATIBLE_HOST = "(x86_64|arm).*-linux"
EXTRA_OECONF += " --with-protoc=${STAGING_BINDIR_NATIVE}/protoc" EXTRA_OECONF += " --with-protoc=${STAGING_BINDIR_NATIVE}/protoc"
inherit autotools setuptools ptest inherit autotools setuptools ptest