aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-test
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-test')
-rw-r--r--recipes-bsp/imx-test/imx-test.inc69
-rw-r--r--recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch30
-rwxr-xr-xrecipes-bsp/imx-test/imx-test/clocks.sh29
-rw-r--r--recipes-bsp/imx-test/imx-test/revert_epdc_hdr_change.patch30
-rw-r--r--recipes-bsp/imx-test/imx-test_00.00.00.bb10
-rw-r--r--recipes-bsp/imx-test/imx-test_3.14.28-1.0.0.bb13
6 files changed, 181 insertions, 0 deletions
diff --git a/recipes-bsp/imx-test/imx-test.inc b/recipes-bsp/imx-test/imx-test.inc
new file mode 100644
index 00000000..cba72f58
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test.inc
@@ -0,0 +1,69 @@
+# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
+
+SUMMARY = "Test programs for IMX BSP"
+DESCRIPTION = "Unit tests for the IMX BSP"
+SECTION = "base"
+DEPENDS_mx5 = "virtual/kernel imx-lib imx-vpu"
+DEPENDS_mx6q = "virtual/kernel imx-lib imx-vpu"
+DEPENDS_mx6dl = "virtual/kernel imx-lib imx-vpu"
+DEPENDS_mx6sl = "virtual/kernel imx-lib"
+DEPENDS_mx6sx = "virtual/kernel imx-lib"
+DEPENDS_mxs = "virtual/kernel"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+PE = "1"
+
+SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz"
+
+inherit module-base
+
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx6sl = "IMX6SL"
+PLATFORM_mx6sx = "IMX6SX"
+PLATFORM_mx53 = "IMX53"
+PLATFORM_mx51 = "IMX51"
+
+# Required so the fixdep binary is generated
+addtask make_scripts after do_patch before do_compile
+do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
+do_make_scripts[deptask] = "do_populate_sysroot"
+do_make_scripts[depends] += "virtual/kernel:do_install"
+
+do_compile() {
+ CFLAGS="${TOOLCHAIN_OPTIONS}"
+ LDFLAGS="${TOOLCHAIN_OPTIONS} -L${STAGING_LIBDIR}"
+ oe_runmake V=1 VERBOSE='' \
+ CROSS_COMPILE=${TARGET_PREFIX} \
+ INC="-I${STAGING_INCDIR} \
+ -I${S}/include \
+ -I${STAGING_KERNEL_BUILDDIR}/include/uapi \
+ -I${STAGING_KERNEL_BUILDDIR}/include \
+ -I${STAGING_KERNEL_DIR}/include/uapi \
+ -I${STAGING_KERNEL_DIR}/include \
+ -I${STAGING_KERNEL_DIR}/arch/arm/include \
+ -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
+ -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
+ LINUXPATH=${STAGING_KERNEL_DIR} \
+ KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
+ PLATFORM=${PLATFORM}
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D}/unit_tests \
+ PLATFORM=${PLATFORM} \
+ install
+
+ if [ -e ${WORKDIR}/clocks.sh ]; then
+ install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
+ fi
+}
+
+FILES_${PN} += "/unit_tests"
+RDEPENDS_${PN} = "bash"
+
+FILES_${PN}-dbg += "/unit_tests/.debug"
diff --git a/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch b/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch
new file mode 100644
index 00000000..7497e91d
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch
@@ -0,0 +1,30 @@
+From fd826140db0f2a867ef588cccf2e5322cc77126a Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 19 Jan 2015 16:56:29 -0200
+Subject: [PATCH] Fix build in OpenEmbedded-Core environment
+Organization: O.S. Systems Software LTDA.
+
+Some of the unit-tests were not being built due to differences on how
+the build system behaves when running inside of the OE-Core. This
+fixes those minor issues and increases the number of tests available.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/test/ar3k_bt/Makefile b/test/ar3k_bt/Makefile
+index 92e2901..75d3e78 100755
+--- a/test/ar3k_bt/Makefile
++++ b/test/ar3k_bt/Makefile
+@@ -21,7 +21,7 @@ all: $(OBJS)
+ CFLAGS += -lbluetooth
+
+ $(OBJDIR)/hciattach-ar3k.bin :
+- $(CC) ${INC} -Wall -lbluetooth -g hciattach_ath3k.c hciattach.c hciattach_qualcomm.c hciattach_st.c hciattach_tialt.c hciattach_ti.c -o hciattach-ar3k.bin
++ $(CC) ${INC} -Wall -lbluetooth -g hciattach_ath3k.c hciattach.c hciattach_qualcomm.c hciattach_st.c hciattach_tialt.c hciattach_ti.c -o $(OBJDIR)/hciattach-ar3k.bin
+
+ clean:
+ rm -f *.o hciattach-ar3k.bin
+--
+2.1.4
+
diff --git a/recipes-bsp/imx-test/imx-test/clocks.sh b/recipes-bsp/imx-test/imx-test/clocks.sh
new file mode 100755
index 00000000..2121bef6
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test/clocks.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# This script is taken directly from the section 5.10 of the Freescale Application Note
+# AN4509 and it simple prints the CPU clocks in a nice format
+
+saved_path=$PWD
+if ! mount|grep -sq '/sys/kernel/debug'; then
+ mount -t debugfs none /sys/kernel/debug
+fi
+
+printf "%-24s %-20s %3s %9s\n" "clock" "parent" "use" "flags" "rate"
+
+for foo in $(find /sys/kernel/debug/clock -type d); do
+ if [ "$foo" = '/sys/kernel/debug/clock' ]; then
+ continue
+ fi
+ cd $foo
+ ec="$(cat usecount)"
+ rate="$(cat rate)"
+ flag="$(cat flags)"
+ clk="$(basename $foo)"
+ cd ..
+ parent="$(basename $PWD)"
+ if [ "$parent" = 'clock' ]; then
+ parent=" ---"
+ fi
+ printf "%-24s %-24s %2d %2d %10d\n" "$clk" "$parent" "$ec" "$flag" "$rate"
+ cd $saved_path
+done
diff --git a/recipes-bsp/imx-test/imx-test/revert_epdc_hdr_change.patch b/recipes-bsp/imx-test/imx-test/revert_epdc_hdr_change.patch
new file mode 100644
index 00000000..4fb0564a
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test/revert_epdc_hdr_change.patch
@@ -0,0 +1,30 @@
+From e559eb0a9573b9011c03efaf42364dce67af893a Mon Sep 17 00:00:00 2001
+From: Lauren Post <lauren.post@freescale.com>
+Date: Tue, 10 Sep 2013 10:58:28 -0500
+Subject: [PATCH] ENGR00279068-2 epdc_test_driver: Update header name change
+ of mxc_epdc.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Lauren Post <lauren.post@freescale.com>
+Signed-off-by: Frank Li <Frank.li@freescale.com>
+---
+ module_test/epdc_test_driver.c | 4 ++--
+ 1 file changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/module_test/epdc_test_driver.c b/module_test/epdc_test_driver.c
+index fb15aec..447246f 100644
+--- a/module_test/epdc_test_driver.c
++++ b/module_test/epdc_test_driver.c
+@@ -36,7 +36,7 @@
+
+ #include <linux/device.h>
+ #include <linux/mxcfb.h>
+-#include <linux/mxcfb_epdc.h>
++#include <linux/mxcfb_epdc_kernel.h>
+
+ /* major number of device */
+ static int gMajor;
+--
+1.7.9.5
+
diff --git a/recipes-bsp/imx-test/imx-test_00.00.00.bb b/recipes-bsp/imx-test/imx-test_00.00.00.bb
new file mode 100644
index 00000000..f38dc67f
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test_00.00.00.bb
@@ -0,0 +1,10 @@
+SUMMARY = "Dummy package for SoCs lacking imx-test package"
+DESCRIPTION = "Dummy package for SoCs lacking imx-test package"
+SECTION = "base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mxs|mx3|mx5|mx6|vf50|vf60)"
diff --git a/recipes-bsp/imx-test/imx-test_3.14.28-1.0.0.bb b/recipes-bsp/imx-test/imx-test_3.14.28-1.0.0.bb
new file mode 100644
index 00000000..fc2ad1d5
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test_3.14.28-1.0.0.bb
@@ -0,0 +1,13 @@
+# Copyright (C) 2013-2015 Freescale Semiconductor
+
+include imx-test.inc
+
+SRC_URI_append_mx5 = " file://revert_epdc_hdr_change.patch \
+ file://clocks.sh"
+SRC_URI_append_mxs = " file://revert_epdc_hdr_change.patch \
+ file://clocks.sh"
+
+SRC_URI[md5sum] = "f349aed49830a21cc75d305b06979205"
+SRC_URI[sha256sum] = "ea3d572e82a374bcfc9acc654b66262cd97a246ffec9fb9fc458b19a02512723"
+
+COMPATIBLE_MACHINE = "(mxs|mx5|mx6)"