From 7a82eab0c7d925c50d2d5e8dd817e4a7063d51fe Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 14 Jan 2014 12:24:29 +0100 Subject: [PATCH] meta-digi-arm: rework device tree customization The do_update_dts function was hardcoded for ccardimx28js. We need to make it mxs specific so the recipe can be used for other platforms that do not share the same device tree configuration (for example the upcoming ccimx6js) Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccardimx28js.conf | 2 +- .../recipes-kernel/linux/linux-dey_3.10.bb | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccardimx28js.conf b/meta-digi-arm/conf/machine/ccardimx28js.conf index ac2423084..e4adec5bc 100644 --- a/meta-digi-arm/conf/machine/ccardimx28js.conf +++ b/meta-digi-arm/conf/machine/ccardimx28js.conf @@ -6,7 +6,7 @@ include conf/machine/include/ccardimx28.inc IMXBOOTLETS_MACHINE = "CCARDIMX28JS" -DTSNAME = "imx28-${MACHINE}" +KERNEL_DEVICETREE = "imx28-${MACHINE}.dtb" # Use standard serial port name and let device handlers (mdev, udev) # create a symlink to the correct device. diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index 5eb027bce..cc9620570 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -32,18 +32,23 @@ SRC_URI = " \ S = "${WORKDIR}/git" -KERNEL_DEVICETREE = "${S}/arch/arm/boot/dts/${DTSNAME}.dts" KERNEL_EXTRA_ARGS = "LOADADDR=${UBOOT_LOADADDRESS}" config_dts() { - if [ "${1}" = "enable" ]; then - sed -i -e "/${2}/{s,^///include,/include,g}" ${KERNEL_DEVICETREE} - elif [ "${1}" = "disable" ]; then - sed -i -e "/${2}/{s,^/include,///include,g}" ${KERNEL_DEVICETREE} - fi + for DTB in ${KERNEL_DEVICETREE}; do + if [ "${1}" = "enable" ]; then + sed -i -e "/${2}/{s,^///include,/include,g}" ${S}/arch/arm/boot/dts/${DTB%b}s + elif [ "${1}" = "disable" ]; then + sed -i -e "/${2}/{s,^/include,///include,g}" ${S}/arch/arm/boot/dts/${DTB%b}s + fi + done } do_update_dts() { + : +} + +do_update_dts_mxs() { if [ -n "${HAVE_WIFI}" ]; then config_dts enable '_ssp2_mmc_wifi.dtsi' else