summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Shibley <brandon.shibley@toradex.com>2016-03-18 15:26:51 -0700
committerStefan Agner <stefan.agner@toradex.com>2016-03-21 16:07:55 -0700
commitfb6f4ceda165ef3082d5558b4fd579a5b83f9daa (patch)
treea48f3719795fdcee500aaafd9807858d8ac67c07
parent8a158e272efb2ba4290c90b119519953a6d88112 (diff)
linux-toradex-fsl-rt: Added a real-time kernel recipe
New real-time iMX6 machine configurations were added along with a real-time kernel recipe with a modified PREEMPT_RT patch to accomodate the backports applied to our kernel. To select the kernel use a preferred provider variable in your configuration files (e.g. local.conf): PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-fsl-rt" Signed-off-by: Brandon Shibley <brandon.shibley@toradex.com> [removed -rt machines] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--recipes-kernel/linux/linux-toradex-fsl-rt/patch-3.14.28-rt25-acpi-removed.patch.gzbin0 -> 177308 bytes
-rw-r--r--recipes-kernel/linux/linux-toradex-fsl-rt_git.bb98
2 files changed, 98 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-fsl-rt/patch-3.14.28-rt25-acpi-removed.patch.gz b/recipes-kernel/linux/linux-toradex-fsl-rt/patch-3.14.28-rt25-acpi-removed.patch.gz
new file mode 100644
index 0000000..fcdcfcc
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-fsl-rt/patch-3.14.28-rt25-acpi-removed.patch.gz
Binary files differ
diff --git a/recipes-kernel/linux/linux-toradex-fsl-rt_git.bb b/recipes-kernel/linux/linux-toradex-fsl-rt_git.bb
new file mode 100644
index 0000000..2812978
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-fsl-rt_git.bb
@@ -0,0 +1,98 @@
+SUMMARY = "Linux Kernel for Toradex Freescale i.MX6 based modules"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit kernel
+require recipes-kernel/linux/linux-dtb.inc
+
+FILESEXTRAPATHS_append := ":${THISDIR}/../../../meta-fsl-arm/recipes-kernel/linux/linux-imx-rt-3.14.28"
+
+DEPENDS += "lzop-native "
+
+LINUX_VERSION_mx6 = "3.14.28"
+
+LOCALVERSION = "-${PR}"
+SRCREV_mx6 = "0632def1c9981e3974f724025f39b2c1588d8ee6"
+PR_mx6 = "V2.5b3-rt"
+
+PV = "${LINUX_VERSION}+gitr${SRCREV}"
+S = "${WORKDIR}/git"
+SRCBRANCH_mx6 = "toradex_imx_3.14.28_1.0.0_ga"
+SRC_URI = "\
+ git://git.toradex.com/linux-toradex.git;protocol=git;branch=${SRCBRANCH} \
+ file://0001-ARM-imx6q-drop-unnecessary-semicolon.patch \
+ file://0002-ARM-clk-imx6q-fix-video-divider-for-rev-T0-1.0.patch \
+ file://0003-ARM-imx6sl-Disable-imx6sl-specific-code-when-imx6sl-.patch \
+ file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \
+ file://0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch \
+ file://patch-3.14.28-rt25-acpi-removed.patch.gz \
+ file://0001-fix-build.patch \
+ file://0002-fix-build-with-rt-enabled.patch \
+ file://0003-no-split-ptlocks.patch \
+ file://0004-imx-sdma-channel-use-raw-spinlock.patch \
+"
+
+# Load USB functions configurable through configfs (CONFIG_USB_CONFIGFS)
+KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', ' libcomposite', '',d)}"
+
+COMPATIBLE_MACHINE = "(colibri-imx6|apalis-imx6)"
+
+# Place changes to the defconfig here
+config_script () {
+# #example change to the .config
+# #sets CONFIG_TEGRA_CAMERA unconditionally to 'y'
+# sed -i -e /CONFIG_TEGRA_CAMERA/d ${B}/.config
+# echo "CONFIG_TEGRA_CAMERA=y" >> ${B}/.config
+
+ sed -i -e /CONFIG_PREEMPT_VOLUNTARY/d ${B}/.config
+ echo "# CONFIG_PREEMPT_VOLUNTARY is not set" >> ${B}/.config
+
+ sed -i -e /CONFIG_PREEMPT_RT_FULL/d ${B}/.config
+ echo "CONFIG_PREEMPT_RT_FULL=y" >> ${B}/.config
+ echo "dummy" > /dev/null
+}
+
+do_configure_prepend () {
+ #use the defconfig provided in the kernel source tree
+ #assume its called ${MACHINE}_defconfig, but with '_' instead of '-'
+ BASE_MACHINE="`echo ${MACHINE} | cut -d'-' -f-2`"
+ DEFCONFIG="`echo $BASE_MACHINE | sed -e 's/\-/\_/g' -e 's/$/_defconfig/'`"
+
+ cd ${S}
+ export KBUILD_OUTPUT=${B}
+ oe_runmake $DEFCONFIG
+
+ #maybe change some configuration
+ config_script
+
+ #Add Toradex BSP Version as LOCALVERSION
+ sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config
+ echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config
+
+ #Add GIT revision to the local version
+ head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
+ printf "%s%s" +g $head > ${S}/.scmversion
+}
+
+# We need to pass it as param since kernel might support more then one
+# machine, with different entry points
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+kernel_do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
+ oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+ if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
+ gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
+ fi
+}
+
+do_compile_kernelmodules() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
+ if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+ oe_runmake ${PARALLEL_MAKE} modules LD="${KERNEL_LD}"
+ else
+ bbnote "no modules to compile"
+ fi
+}