u-boot-dey: update install scripts to handle variants

Now the U-Boot binaries contain the RAM frequency and bus width, not just
only the RAM size.

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-08 12:45:50 +02:00
parent 23503567a1
commit 852cf8a570
2 changed files with 37 additions and 21 deletions

View File

@ -19,19 +19,25 @@ if test $? -eq 1; then
exit;
fi
# Determine U-Boot file to program basing on SOM's RAM size
if test -n "${module_ram}"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express${module_ram}.bin;
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
ram_freq="1.2GHz"
bus_width="32bit"
if test -n "${module_ram}" && test -n "${soc_type}"; then
if test "${soc_type}" == "dx"; then
bus_width="16bit"
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-${ram_freq}_${module_ram}_${bus_width}.bin;
else
# Determine U-Boot file to program basing on SOM's variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin;
if test "${module_variant}" = "0x01"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_1GB_32bit.bin;
elif test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin;
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_2GB_32bit.bin;
elif test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_1GB_16bit.bin;
fi
fi
fi
@ -46,9 +52,11 @@ else
echo "";
echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:";
echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_1GB_32bit.bin";
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_2GB_32bit.bin";
echo " - For a DualX CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express-1.2GHz_1GB_16bit.bin";
echo "";
echo "2. Run the install script again.";
echo "";

View File

@ -19,21 +19,27 @@ if test $? -eq 1; then
exit;
fi
# Determine U-Boot file to program basing on SOM's RAM size
if test -n "${module_ram}"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro${module_ram}.bin;
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
ram_freq="1.2GHz"
bus_width="32bit"
if test -n "${module_ram}" && test -n "${soc_type}"; then
if test "${soc_type}" == "dx"; then
bus_width="16bit"
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-${ram_freq}_${module_ram}_${bus_width}.bin;
else
# Determine U-Boot file to program basing on SOM's variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin;
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_1GB_32bit.bin;
elif test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin;
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_2GB_32bit.bin;
elif test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_1GB_16bit.bin;
elif test "${module_variant}" = "0x06"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro512MB.bin;
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_512GB_16bit.bin;
fi
fi
fi
@ -48,11 +54,13 @@ else
echo "";
echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:";
echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_1GB_32bit.bin";
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_2GB_32bit.bin";
echo " - For a DualX CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_1GB_16bit.bin";
echo " - For a DualX CPU with 512MB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro512MB.bin";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro-1.2GHz_512MB_16bit.bin";
echo "";
echo "2. Run the install script again.";
echo "";