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 <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2014-01-14 12:24:29 +01:00
parent 16b0ccf3e2
commit 7a82eab0c7
2 changed files with 12 additions and 7 deletions

View File

@ -6,7 +6,7 @@ include conf/machine/include/ccardimx28.inc
IMXBOOTLETS_MACHINE = "CCARDIMX28JS" IMXBOOTLETS_MACHINE = "CCARDIMX28JS"
DTSNAME = "imx28-${MACHINE}" KERNEL_DEVICETREE = "imx28-${MACHINE}.dtb"
# Use standard serial port name and let device handlers (mdev, udev) # Use standard serial port name and let device handlers (mdev, udev)
# create a symlink to the correct device. # create a symlink to the correct device.

View File

@ -32,18 +32,23 @@ SRC_URI = " \
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
KERNEL_DEVICETREE = "${S}/arch/arm/boot/dts/${DTSNAME}.dts"
KERNEL_EXTRA_ARGS = "LOADADDR=${UBOOT_LOADADDRESS}" KERNEL_EXTRA_ARGS = "LOADADDR=${UBOOT_LOADADDRESS}"
config_dts() { config_dts() {
if [ "${1}" = "enable" ]; then for DTB in ${KERNEL_DEVICETREE}; do
sed -i -e "/${2}/{s,^///include,/include,g}" ${KERNEL_DEVICETREE} if [ "${1}" = "enable" ]; then
elif [ "${1}" = "disable" ]; then sed -i -e "/${2}/{s,^///include,/include,g}" ${S}/arch/arm/boot/dts/${DTB%b}s
sed -i -e "/${2}/{s,^/include,///include,g}" ${KERNEL_DEVICETREE} elif [ "${1}" = "disable" ]; then
fi sed -i -e "/${2}/{s,^/include,///include,g}" ${S}/arch/arm/boot/dts/${DTB%b}s
fi
done
} }
do_update_dts() { do_update_dts() {
:
}
do_update_dts_mxs() {
if [ -n "${HAVE_WIFI}" ]; then if [ -n "${HAVE_WIFI}" ]; then
config_dts enable '_ssp2_mmc_wifi.dtsi' config_dts enable '_ssp2_mmc_wifi.dtsi'
else else