meta-digi-arm: rework Linux kernel recipes

* Move kernel configuration fragments to 2.6.35 recipe (that's the only
  kernel version using them)

* Move compile-time dependences to common include linux-dey.inc

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2015-10-07 16:39:18 +02:00
parent 51a3bdb25f
commit 1b63048467
4 changed files with 22 additions and 23 deletions

View File

@ -2,27 +2,17 @@
require recipes-kernel/linux/linux-imx.inc require recipes-kernel/linux/linux-imx.inc
SUMMARY = "Linux kernel for Digi boards"
DEPENDS += "lzop-native bc-native"
LOCALVERSION = "-dey" LOCALVERSION = "-dey"
# Kernel configuration fragments
KERNEL_CFG_FRAGS ??= ""
SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-linux.git;protocol=git;nobranch=1" SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-linux.git;protocol=git;nobranch=1"
SRC_URI_internal = "${DIGI_GIT}linux-2.6.git;protocol=git;branch=${SRCBRANCH}" SRC_URI_internal = "${DIGI_GIT}linux-2.6.git;protocol=git;branch=${SRCBRANCH}"
SRC_URI = " \ SRC_URI = " \
${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)} \ ${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)} \
file://defconfig \ file://defconfig \
${KERNEL_CFG_FRAGS} \
" "
do_configure() {
for i in $(echo ${WORKDIR}/*.cfg); do
[ "${i}" = "${WORKDIR}/*.cfg" ] && continue
cat ${i} >> ${B}/.config
done
kernel_do_configure
}
do_deploy_append() { do_deploy_append() {
(cd ${DEPLOYDIR} && ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}) (cd ${DEPLOYDIR} && ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME})
} }

View File

@ -2,8 +2,6 @@
require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dey.inc
COMPATIBLE_MACHINE = "(mx5)"
# Internal repo branch # Internal repo branch
SRCBRANCH = "v2.6.35/dey-1.4/maint" SRCBRANCH = "v2.6.35/dey-1.4/maint"
@ -11,9 +9,24 @@ SRCREV_external = ""
SRCREV_internal = "${AUTOREV}" SRCREV_internal = "${AUTOREV}"
SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}"
KERNEL_CFG_FRAGS ?= "" KERNEL_CFG_FRAGS = " \
KERNEL_CFG_FRAGS_append_mx5 = "file://config-sahara-module.cfg file://config-camera-module.cfg" file://config-camera-module.cfg \
KERNEL_CFG_FRAGS_append_mx5 = " ${@base_contains('MACHINE_FEATURES', 'accelerometer', 'file://config-accel-module.cfg', '', d)}" file://config-sahara-module.cfg \
KERNEL_CFG_FRAGS_append_mx5 = " ${@base_contains('MACHINE_FEATURES', 'ext-eth', 'file://config-ext-eth-module.cfg', '', d)}" ${@base_contains('MACHINE_FEATURES', 'accelerometer', 'file://config-accel-module.cfg', '', d)} \
KERNEL_CFG_FRAGS_append_mx5 = " ${@base_contains('MACHINE_FEATURES', 'wifi', 'file://config-wireless-redpine.cfg', '', d)}" ${@base_contains('MACHINE_FEATURES', 'ext-eth', 'file://config-ext-eth-module.cfg', '', d)} \
${@base_contains('MACHINE_FEATURES', 'wifi', 'file://config-wireless-redpine.cfg', '', d)} \
"
KERNEL_CFG_FRAGS_append_ccimx51js = " file://config-battery-module.cfg" KERNEL_CFG_FRAGS_append_ccimx51js = " file://config-battery-module.cfg"
SRC_URI += "${KERNEL_CFG_FRAGS}"
# Override the do_configure function to add the kernel fragments
do_configure() {
for i in $(echo ${WORKDIR}/*.cfg); do
[ "${i}" = "${WORKDIR}/*.cfg" ] && continue
cat ${i} >> ${B}/.config
done
kernel_do_configure
}
COMPATIBLE_MACHINE = "(ccimx5)"

View File

@ -3,8 +3,6 @@
require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dey.inc
require recipes-kernel/linux/linux-dtb.inc require recipes-kernel/linux/linux-dtb.inc
DEPENDS += "lzop-native bc-native"
# Internal repo branch # Internal repo branch
SRCBRANCH = "v3.10/dey-1.4/maint" SRCBRANCH = "v3.10/dey-1.4/maint"

View File

@ -3,8 +3,6 @@
require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dey.inc
require recipes-kernel/linux/linux-dtb.inc require recipes-kernel/linux/linux-dtb.inc
DEPENDS += "lzop-native bc-native"
# Internal repo branch # Internal repo branch
SRCBRANCH = "v3.14/master" SRCBRANCH = "v3.14/master"