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:
parent
16b0ccf3e2
commit
7a82eab0c7
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue