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 <hector.palacios@digi.com>

https://jira.digi.com/browse/DEL-2160
This commit is contained in:
Hector Palacios 2016-01-29 11:46:14 +01:00
parent f9d9544e5f
commit 607d703246
1 changed files with 37 additions and 30 deletions

View File

@ -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 if test -n "${board_id}"; then
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb setenv fdt_file uImage-${soc_family}-ccimx6sbc-id${board_id}.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 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 fi
# To detect if we are booting from SD card we get the UUID of the # To detect if we are booting from SD card we get the UUID of the