[meta-intel] [PATCH] mce-test: add it

Anuj Mittal anuj.mittal at intel.com
Wed Jun 13 17:59:48 PDT 2018


Hi Dengke,

On 06/11/2018 03:28 PM, Dengke Du wrote:
> Signed-off-by: Dengke Du <dengke.du at windriver.com>
> ---
>  .../mce-test/files/makefile-remove-ldflags.patch   | 23 +++++++++++
>  recipes-kernel/mce-test/mce-test_git.bb            | 46 ++++++++++++++++++++++
>  2 files changed, 69 insertions(+)
>  create mode 100644 recipes-kernel/mce-test/files/makefile-remove-ldflags.patch
>  create mode 100644 recipes-kernel/mce-test/mce-test_git.bb
> 
> diff --git a/recipes-kernel/mce-test/files/makefile-remove-ldflags.patch b/recipes-kernel/mce-test/files/makefile-remove-ldflags.patch
> new file mode 100644
> index 0000000..0ffedd2
> --- /dev/null
> +++ b/recipes-kernel/mce-test/files/makefile-remove-ldflags.patch
> @@ -0,0 +1,23 @@
> +Remove the default CFLAGS and LDFLAGS in Makefile. Ensure the extra linker flags can be passed.
> +
> +Upstream-Status: Inappropriate [embedded specific]
> +
> +Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
> +
> +diff --git a/cases/stress/hwpoison/Makefile b/cases/stress/hwpoison/Makefile
> +index da1cbd8..dec5b14 100644
> +--- a/cases/stress/hwpoison/Makefile
> ++++ b/cases/stress/hwpoison/Makefile
> +@@ -1,8 +1,8 @@
> +-CFLAGS := -g -Wall
> +-LDFLAGS := -g
> ++#CFLAGS := -g -Wall
> ++#LDFLAGS := -g
> + 
> +-export CFLAGS
> +-export LDFLAGS
> ++#export CFLAGS
> ++#export LDFLAGS
> + 
> + all:
> + 	mkdir -p bin
> diff --git a/recipes-kernel/mce-test/mce-test_git.bb b/recipes-kernel/mce-test/mce-test_git.bb
> new file mode 100644
> index 0000000..2d864de
> --- /dev/null
> +++ b/recipes-kernel/mce-test/mce-test_git.bb
> @@ -0,0 +1,46 @@
> +#
> +# Copyright (C) 2012 Wind River Systems, Inc.
> +#
> +SUMMARY = "MCE test suite"
> +
> +DESCRIPTION = "The MCE test suite is a collection of tools and test scripts for \
> +testing the Linux RAS related features, including CPU/Memory error \
> +containment and recovery, ACPI/APEI support etc."
> +
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> +
> +SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git \
> +           file://makefile-remove-ldflags.patch \
> +          "
> +# Use the commit date of SRCREV in PV.
> +#
> +SRCREV = "74bffd8b0aa27051aeaa1983a7b23975ca8d8726"
> +PE = "1"

This is not required since this is a new recipe.

> +PV = "20171030+git${SRCPV}"
> +
> +RDEPENDS_${PN} = "mcelog mce-inject dialog bash"

Since all other mce* recipes listed above are in meta-oe, I think the
correct place for this recipe should be meta-oe ...

> +
> +COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
> +
> +S ="${WORKDIR}/git"
> +
> +inherit autotools-brokensep

This doesn't use autotools to build so this can be removed.

> +
> +do_install_append(){
> +   install -d ${D}/opt/mce-test
> +   cp -rf ${S}/* ${D}/opt/mce-test/

Can this be installed in /usr instead of /opt? You shouldn't need the
packaging lines below too in that case.

> +}
> +
> +FILES_${PN} += "/opt"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/function/hwpoison/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/function/erst-inject/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/function/pfa/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/function/core_recovery/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/stress/hwpoison/bin/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/stress/hwpoison/tools/page-poisoning/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/cases/stress/hwpoison/tools/fs-metadata/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/bin/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/tools/ltp-pan/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/tools/simple_process/.debug"
> +FILES_${PN}-dbg += "/opt/mce-test/tools/page-types/.debug"
> 



More information about the meta-intel mailing list