From 607d70324667dd44cf2edebf05499a3ca7cae93c Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 29 Jan 2016 11:46:14 +0100 Subject: [PATCH] u-boot: select $fdt_file basing on $board_id (if defined) Carrier board version is determined by U-Boot variable $board_id which will be defined if a board ID has been burned on certain OTP bits. Use the value in this variable to create the $fdt_file variable using the suffix "-id${board_id}" to point to the device tree file that matches that board ID. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-2160 --- .../u-boot/u-boot-dey-2015.04/ccimx6/boot.txt | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6/boot.txt index 2548b76a9..f3d9e9514 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6/boot.txt @@ -3,38 +3,45 @@ # # -# Set device tree filename depending on the hardware variant +# Set device tree filename depending on the board ID (if defined) # -if test "${module_variant}" = "0x02"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x03"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x04"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x05"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-w.dtb -elif test "${module_variant}" = "0x06"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x08"; then - setenv fdt_file uImage-imx6q-ccimx6sbc.dtb -elif test "${module_variant}" = "0x0a"; then - setenv fdt_file uImage-imx6dl-ccimx6sbc-w.dtb -elif test "${module_variant}" = "0x0b"; then - setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x0c"; then - setenv fdt_file uImage-imx6dl-ccimx6sbc.dtb -elif test "${module_variant}" = "0x0e"; then - setenv fdt_file uImage-imx6q-ccimx6sbc.dtb -elif test "${module_variant}" = "0x0f"; then - setenv fdt_file uImage-imx6q-ccimx6sbc.dtb -elif test "${module_variant}" = "0x11"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x12"; then - setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb -elif test "${module_variant}" = "0x13"; then - setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb +if test -n "${board_id}"; then + setenv fdt_file uImage-${soc_family}-ccimx6sbc-id${board_id}.dtb else - echo "------ Using default fdt_file" + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x02"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x03"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x04"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x05"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-w.dtb + elif test "${module_variant}" = "0x06"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x08"; then + setenv fdt_file uImage-imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0a"; then + setenv fdt_file uImage-imx6dl-ccimx6sbc-w.dtb + elif test "${module_variant}" = "0x0b"; then + setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x0c"; then + setenv fdt_file uImage-imx6dl-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0e"; then + setenv fdt_file uImage-imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0f"; then + setenv fdt_file uImage-imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x11"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x12"; then + setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x13"; then + setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb + else + echo "------ Using default fdt_file" + fi fi # To detect if we are booting from SD card we get the UUID of the