recipes-kernel: Add kernel recipe.

http://jira/jira/browse/DEL-93

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
Alex Gonzalez 2012-10-29 16:11:07 +01:00
parent 33120b055b
commit 48e88d93ea
5 changed files with 6301 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
# Copyright (C) 2011-2012 Freescale Semiconductor
# Copyright (C) 2012 Digi International
# Released under the MIT license (see COPYING.MIT for the terms)
PR = "${INC_PR}.17"
include linux-imx.inc
COMPATIBLE_MACHINE = "(mxs|mx5)"
SRCREV_mxs = "agonzal/yocto"
LOCALVERSION_mxs = "-mxs+agonzal_yocto"
SRCREV_mx5 = "agonzal/yocto"
LOCALVERSION_mx5 = "-mx5x+agonzal_yocto"

View File

@ -0,0 +1,74 @@
# Copyright (C) 2012 O.S. Systems Software LTDA.
# Copyright (C) 2012 Digi International.
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Linux kernel for imx platforms"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
INC_PR = "r32"
inherit kernel
# Put a local version until we have a true SRCREV to point to
LOCALVERSION ?= "+master"
SCMVERSION ?= "y"
SRC_URI = "git://log-sln-cvs.digi.com/data/vcs/git/linux-2.6.git \
file://defconfig \
"
S = "${WORKDIR}/git"
kernel_conf_variable() {
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
if test "$2" = "n"
then
echo "# CONFIG_$1 is not set" >> ${S}/.config
else
echo "CONFIG_$1=$2" >> ${S}/.config
fi
}
do_configure_prepend() {
echo "" > ${S}/.config
CONF_SED_SCRIPT=""
kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
kernel_conf_variable LOCALVERSION_AUTO y
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git rev-parse --verify --short HEAD 2> /dev/null`
printf "%s%s" +g $head > ${S}/.scmversion
fi
}
# install needs headers for imx-test compilation
do_install_append() {
# [DIGI] We don't compile imx-test
# bounds.h may be used by a module and is currently missing
# if [ -d include/generated ]; then
# cp include/generated/* $kerneldir/include/generated/
# fi
# Host architecture object file
rm -f $kerneldir/scripts/kconfig/kxgettext.o
}
sysroot_stage_all_append() {
# denzil does not have KERNEL_SRC_PATH so we default to /kernel
destdir=${KERNEL_SRC_PATH}
if [ -z "$destdir" ]; then
destdir=/kernel
fi
# [DIGI] We do not compile imx-test
# Copy native binaries need for imx-test build onto sysroot
# mkdir -p ${SYSROOT_DESTDIR}/usr/src/kernel/scripts/basic \
# ${SYSROOT_DESTDIR}/usr/src/kernel/scripts/mod
# cp ${S}/scripts/basic/fixdep ${SYSROOT_DESTDIR}$destdir/scripts/basic
# cp ${S}/scripts/mod/modpost ${SYSROOT_DESTDIR}$destdir/scripts/mod
}