summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-imx.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-imx.inc')
-rw-r--r--recipes-kernel/linux/linux-imx.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-imx.inc b/recipes-kernel/linux/linux-imx.inc
new file mode 100644
index 0000000..47566b0
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx.inc
@@ -0,0 +1,47 @@
1# Copyright (C) 2012, 2014 O.S. Systems Software LTDA.
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
6
7inherit kernel
8
9# Put a local version until we have a true SRCREV to point to
10LOCALVERSION ?= "+yocto"
11SCMVERSION ?= "y"
12
13SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;branch=${SRCBRANCH} \
14 file://defconfig \
15"
16
17S = "${WORKDIR}/git"
18
19# We need to pass it as param since kernel might support more then one
20# machine, with different entry points
21KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
22
23kernel_conf_variable() {
24 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
25 if test "$2" = "n"
26 then
27 echo "# CONFIG_$1 is not set" >> ${S}/.config
28 else
29 echo "CONFIG_$1=$2" >> ${S}/.config
30 fi
31}
32
33do_configure_prepend() {
34 echo "" > ${S}/.config
35 CONF_SED_SCRIPT=""
36
37 kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
38 kernel_conf_variable LOCALVERSION_AUTO y
39
40 sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
41
42 if [ "${SCMVERSION}" = "y" ]; then
43 # Add GIT revision to the local version
44 head=`git rev-parse --verify --short HEAD 2> /dev/null`
45 printf "%s%s" +g $head > ${S}/.scmversion
46 fi
47}