From 4167ab1769a8e59be6d7ab8f754b0fc55c8de950 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 1 Jul 2019 11:17:33 +0200 Subject: [PATCH] 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 https://jira.digi.com/browse/DEL-6641 --- .../u-boot-dey/ccimx8x-sbc-express/boot.txt | 17 +++++++++++------ .../u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt | 17 +++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt index 3da6b55df..c67c00d87 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt @@ -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 diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt index a8d37c69d..2d069bc79 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt @@ -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