blob: 11981670e55ae00667de6b6772be3615a7bf161f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Tool for managing software RAID under Linux"
2HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
3
4# Some files are GPLv2+ while others are GPLv2.
5LICENSE = "GPLv2 & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
8 file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
9
10
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
12 file://mdadm-3.2.2_fix_for_x32.patch \
13 file://gcc-4.9.patch \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://0001-Fix-typo-in-comparision.patch \
16 file://run-ptest \
17 "
18SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
19SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
20
21CFLAGS += "-fno-strict-aliasing"
22
23inherit autotools-brokensep
24
25EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
26# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
27# prevents 64-bit userland from seeing this definition, instead defaulting
28# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
29# int-ll64.h included
30EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
31EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
32EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
33
34do_compile() {
35 oe_runmake
36}
37
38do_install() {
39 export STRIP=""
40 autotools_do_install
41}
42
43FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
44
45inherit ptest
46
47do_compile_ptest() {
48 oe_runmake test
49}
50
51do_install_ptest() {
52 cp -a ${S}/tests ${D}${PTEST_PATH}/tests
53 cp ${S}/test ${D}${PTEST_PATH}
54 sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
55 ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
56 for prg in test_stripe swap_super raid6check
57 do
58 install -D -m 755 $prg ${D}${PTEST_PATH}/
59 done
60}
61RDEPENDS_${PN}-ptest += "bash"
62RRECOMMENDS_${PN}-ptest += " \
63 coreutils \
64 util-linux \
65 kernel-module-loop \
66 kernel-module-linear \
67 kernel-module-raid0 \
68 kernel-module-raid1 \
69 kernel-module-raid10 \
70 kernel-module-raid456 \
71"