uboot: add support for new HWID fields to boot scripts
The new HWID fields make U-Boot create new variable 'module_ram'. If it exists calculate new HWID fields to check if the SOM has Wi-Fi, Bluetooth, etc. in order to select the device tree file. If not, fall back to old method of using the variant code and the hard-coded table of variants. Signed-off-by: Hector Palacios <hector.palacios@digi.com> https://jira.digi.com/browse/DEL-6598
This commit is contained in:
parent
8c0aaf79b6
commit
702bc57cae
|
|
@ -9,20 +9,33 @@ if test -n "${board_id}"; then
|
|||
setenv fdt_file ccimx8x-sbc-express-id${board_id}.dtb
|
||||
else
|
||||
#
|
||||
# Set device tree filename depending on the hardware variant
|
||||
# Set device tree filename depending on the hardware capabilities
|
||||
#
|
||||
if test "${module_variant}" = "0x01"; then
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
elif test "${module_variant}" = "0x02"; then
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv fdt_file ccimx8x-sbc-express.dtb
|
||||
elif test "${module_variant}" = "0x04"; then
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
elif test "${module_variant}" = "0x05"; then
|
||||
setenv fdt_file ccimx8x-sbc-express.dtb
|
||||
if test -n "${module_ram}"; then
|
||||
setexpr module_has_wifi ${hwid_3} \& 1
|
||||
setexpr module_has_bt ${hwid_3} \& 2
|
||||
setexpr module_has_bt ${module_has_bt} / 2
|
||||
|
||||
if test "${module_has_wifi}" = "1" &&
|
||||
test "${module_has_bt}" = "1"; then
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-express.dtb
|
||||
fi
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
#
|
||||
# Set device tree filename depending on the hardware variant
|
||||
#
|
||||
if test "${module_variant}" = "0x01" ||
|
||||
test "${module_variant}" = "0x02" ||
|
||||
test "${module_variant}" = "0x04"; then
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
elif test "${module_variant}" = "0x03" ||
|
||||
test "${module_variant}" = "0x05"; then
|
||||
setenv fdt_file ccimx8x-sbc-express.dtb
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-express-wb.dtb
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,33 @@ if test -n "${board_id}"; then
|
|||
setenv fdt_file ccimx8x-sbc-pro-id${board_id}.dtb
|
||||
else
|
||||
#
|
||||
# Set device tree filename depending on the hardware variant
|
||||
# Set device tree filename depending on the hardware capabilities
|
||||
#
|
||||
if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04"; then
|
||||
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
|
||||
elif test "${module_variant}" = "0x03" || test "${module_variant}" = "0x05"; then
|
||||
setenv fdt_file ccimx8x-sbc-pro.dtb
|
||||
if test -n "${module_ram}"; then
|
||||
setexpr module_has_wifi ${hwid_3} \& 1
|
||||
setexpr module_has_bt ${hwid_3} \& 2
|
||||
setexpr module_has_bt ${module_has_bt} / 2
|
||||
|
||||
if test "${module_has_wifi}" = "1" &&
|
||||
test "${module_has_bt}" = "1"; then
|
||||
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-pro.dtb
|
||||
fi
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
|
||||
#
|
||||
# Set device tree filename depending on the hardware variant
|
||||
#
|
||||
if test "${module_variant}" = "0x01" ||
|
||||
test "${module_variant}" = "0x02" ||
|
||||
test "${module_variant}" = "0x04"; then
|
||||
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
|
||||
elif test "${module_variant}" = "0x03" ||
|
||||
test "${module_variant}" = "0x05"; then
|
||||
setenv fdt_file ccimx8x-sbc-pro.dtb
|
||||
else
|
||||
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue