diff options
Diffstat (limited to 'recipes-kernel/linux/linux-imx.inc')
-rw-r--r-- | recipes-kernel/linux/linux-imx.inc | 47 |
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 | |||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
6 | |||
7 | inherit kernel | ||
8 | |||
9 | # Put a local version until we have a true SRCREV to point to | ||
10 | LOCALVERSION ?= "+yocto" | ||
11 | SCMVERSION ?= "y" | ||
12 | |||
13 | SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;branch=${SRCBRANCH} \ | ||
14 | file://defconfig \ | ||
15 | " | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | # We need to pass it as param since kernel might support more then one | ||
20 | # machine, with different entry points | ||
21 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" | ||
22 | |||
23 | kernel_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 | |||
33 | do_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 | } | ||