diff options
| -rw-r--r-- | meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb b/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb index 60040a47af..48c72140c8 100644 --- a/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb +++ b/meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb | |||
| @@ -42,16 +42,28 @@ do_configure_prepend() { | |||
| 42 | mkdir -p ${S} | 42 | mkdir -p ${S} |
| 43 | cp -r ${STAGING_KERNEL_DIR}/arch/x86/include/asm/msr-index.h ${S} | 43 | cp -r ${STAGING_KERNEL_DIR}/arch/x86/include/asm/msr-index.h ${S} |
| 44 | cp -r ${STAGING_KERNEL_DIR}/arch/x86/include/asm/intel-family.h ${S} | 44 | cp -r ${STAGING_KERNEL_DIR}/arch/x86/include/asm/intel-family.h ${S} |
| 45 | cp -r ${STAGING_KERNEL_DIR}/include/linux/bits.h ${S} | 45 | if [ -f "${STAGING_KERNEL_DIR}/include/vdso/bits.h" ]; then |
| 46 | cp -r ${STAGING_KERNEL_DIR}/include/linux/const.h ${S} | 46 | cp -r ${STAGING_KERNEL_DIR}/include/vdso/bits.h ${S} |
| 47 | cp -r ${STAGING_KERNEL_DIR}/include/vdso/const.h ${S} | ||
| 48 | else | ||
| 49 | cp -r ${STAGING_KERNEL_DIR}/include/linux/bits.h ${S} | ||
| 50 | cp -r ${STAGING_KERNEL_DIR}/include/linux/const.h ${S} | ||
| 51 | fi | ||
| 47 | cp -r ${STAGING_KERNEL_DIR}/tools/power/x86/turbostat/* ${S} | 52 | cp -r ${STAGING_KERNEL_DIR}/tools/power/x86/turbostat/* ${S} |
| 48 | cp -r ${WORKDIR}/COPYING ${S} | 53 | cp -r ${WORKDIR}/COPYING ${S} |
| 49 | } | 54 | } |
| 50 | 55 | ||
| 56 | |||
| 51 | do_compile() { | 57 | do_compile() { |
| 52 | sed -i 's#<linux/bits.h>#"bits.h"#' msr-index.h | 58 | sed -i 's#<linux/bits.h>#"bits.h"#' msr-index.h |
| 53 | sed -i 's#<linux/const.h>#"const.h"#' bits.h | 59 | 'TMPCHECK='grep "<vdso/const.h>" bits.h'' || true |
| 54 | sed -i -e 's#<uapi/linux/const.h>#<linux/const.h>#' -e 's#_LINUX_CONST_H#_LINUX_CONST_H_KERNEL#' const.h | 60 | if [ -n $TMPCHECK ]; then |
| 61 | sed -i 's#<vdso/const.h>#"const.h"#' bits.h | ||
| 62 | sed -i 's#<uapi/linux/const.h>#<linux/const.h>#' const.h | ||
| 63 | else | ||
| 64 | sed -i 's#<linux/const.h>#"const.h"#' bits.h | ||
| 65 | sed -i -e 's#<uapi/linux/const.h>#<linux/const.h>#' -e 's#_LINUX_CONST_H#_LINUX_CONST_H_KERNEL#' const.h | ||
| 66 | fi | ||
| 55 | sed -i 's#MSRHEADER#"msr-index.h"#' turbostat.c | 67 | sed -i 's#MSRHEADER#"msr-index.h"#' turbostat.c |
| 56 | sed -i 's#INTEL_FAMILY_HEADER#"intel-family.h"#' turbostat.c | 68 | sed -i 's#INTEL_FAMILY_HEADER#"intel-family.h"#' turbostat.c |
| 57 | sed -i 's#\$(CC) \$(CFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#\$(CC) \$(CFLAGS) \$(LDFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#' Makefile | 69 | sed -i 's#\$(CC) \$(CFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#\$(CC) \$(CFLAGS) \$(LDFLAGS) \$< -o \$(BUILD_OUTPUT)/\$@#' Makefile |
