ccimx8x: u-boot: use 'soc_type' variable when determining device tree file

With the arrival of DualX variants, the device tree files have been renamed
to contain the SOC type (8qxp, or 8dx). This is determined by a new U-Boot
variable 'soc_type'.
Default to "8qxp" if the variable is not defined (old U-Boots).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://jira.digi.com/browse/DEL-6641
This commit is contained in:
Hector Palacios 2019-07-01 11:17:33 +02:00
parent ddfbb2652a
commit 4167ab1769
2 changed files with 22 additions and 12 deletions

View File

@ -2,11 +2,16 @@
# U-Boot bootscript for EMMC/SD images created by Yocto.
#
# Set SOC type to "8qxp" if not already defined by U-Boot
if test ! -n "${soc_type}"; then
setenv soc_type "8qxp"
fi
#
# Set device tree filename depending on the board ID (if defined)
#
if test -n "${board_id}"; then
setenv fdt_file ccimx8x-sbc-express-id${board_id}.dtb
setenv fdt_file ccimx${soc_type}-sbc-express-id${board_id}.dtb
else
#
# Set device tree filename depending on the hardware capabilities
@ -18,9 +23,9 @@ else
if test "${module_has_wifi}" = "1" &&
test "${module_has_bt}" = "1"; then
setenv fdt_file ccimx8x-sbc-express-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-express-wb.dtb
else
setenv fdt_file ccimx8x-sbc-express.dtb
setenv fdt_file ccimx${soc_type}-sbc-express.dtb
fi
else
#
@ -29,12 +34,12 @@ else
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x04"; then
setenv fdt_file ccimx8x-sbc-express-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-express-wb.dtb
elif test "${module_variant}" = "0x03" ||
test "${module_variant}" = "0x05"; then
setenv fdt_file ccimx8x-sbc-express.dtb
setenv fdt_file ccimx${soc_type}-sbc-express.dtb
else
setenv fdt_file ccimx8x-sbc-express-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-express-wb.dtb
fi
fi
fi

View File

@ -2,11 +2,16 @@
# U-Boot bootscript for EMMC/SD images created by Yocto.
#
# Set SOC type to "8qxp" if not already defined by U-Boot
if test ! -n "${soc_type}"; then
setenv soc_type "8qxp"
fi
#
# Set device tree filename depending on the board ID (if defined)
#
if test -n "${board_id}"; then
setenv fdt_file ccimx8x-sbc-pro-id${board_id}.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro-id${board_id}.dtb
else
#
# Set device tree filename depending on the hardware capabilities
@ -18,9 +23,9 @@ else
if test "${module_has_wifi}" = "1" &&
test "${module_has_bt}" = "1"; then
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro-wb.dtb
else
setenv fdt_file ccimx8x-sbc-pro.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro.dtb
fi
else
#
@ -29,12 +34,12 @@ else
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x04"; then
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro-wb.dtb
elif test "${module_variant}" = "0x03" ||
test "${module_variant}" = "0x05"; then
setenv fdt_file ccimx8x-sbc-pro.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro.dtb
else
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
setenv fdt_file ccimx${soc_type}-sbc-pro-wb.dtb
fi
fi
fi