aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/mdadm_4.0.bb
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-01-13 14:57:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:45:43 +0000
commitb32f5098fc06c96d9331abe0f4ff9cc7c7c08c76 (patch)
treee131e22de945801cd96614863e1af6fe89f040a2 /meta/recipes-extended/mdadm/mdadm_4.0.bb
parentf4f28c4d246e14ee60ae2bc46761f871eaca9898 (diff)
downloadopenembedded-core-contrib-b32f5098fc06c96d9331abe0f4ff9cc7c7c08c76.tar.gz
mdadm: upgrade to version 4.0
3.4 -> 4.0 Removed the following upstreamed or backported patches: a) 0001-Fix-some-type-comparison-problems.patch b) 0001-Fix-typo-in-comparision.patch c) 0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch d) 0001-raid6check-Fix-if-else-indentation.patch e) 0001-util.c-include-poll.h-instead-of-sys-poll.h.patch f) mdadm-3.2.2_fix_for_x32.patch Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/mdadm/mdadm_4.0.bb')
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.0.bb70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb
new file mode 100644
index 0000000000..c2288995ba
--- /dev/null
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Tool for managing software RAID under Linux"
+HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
+
+# Some files are GPLv2+ while others are GPLv2.
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
+ file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
+
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
+ file://gcc-4.9.patch \
+ file://mdadm-3.3.2_x32_abi_time_t.patch \
+ file://mdadm-fix-ptest-build-errors.patch \
+ file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
+ file://run-ptest \
+ file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
+ file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \
+ "
+SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d"
+SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"
+
+CFLAGS += "-fno-strict-aliasing"
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
+# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
+# prevents 64-bit userland from seeing this definition, instead defaulting
+# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
+# int-ll64.h included
+CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
+
+do_compile() {
+ oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+}
+
+do_install() {
+ export STRIP=""
+ autotools_do_install
+}
+
+inherit ptest
+
+do_compile_ptest() {
+ oe_runmake test
+}
+
+do_install_ptest() {
+ cp -a ${S}/tests ${D}${PTEST_PATH}/tests
+ cp ${S}/test ${D}${PTEST_PATH}
+ sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+ ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
+ for prg in test_stripe swap_super raid6check
+ do
+ install -D -m 755 $prg ${D}${PTEST_PATH}/
+ done
+}
+RDEPENDS_${PN}-ptest += "bash"
+RRECOMMENDS_${PN}-ptest += " \
+ coreutils \
+ util-linux \
+ kernel-module-loop \
+ kernel-module-linear \
+ kernel-module-raid0 \
+ kernel-module-raid1 \
+ kernel-module-raid10 \
+ kernel-module-raid456 \
+"