ccimx8x: reflect imx-boot simplification in installer scripts
We no longer need logic to determine the SOM's RAM size and bus width, we only need to know the SOC revision, which is info that is always available. Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
d13b42492f
commit
2687207948
|
|
@ -18,66 +18,7 @@ fi
|
|||
# the necessary logic to choose the correct imx-boot file for the target's SOC.
|
||||
setenv skip-uboot-check "yes"
|
||||
|
||||
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
|
||||
bus_width="32bit"
|
||||
if test -n "${module_ram}" && test -n "${soc_type}"; then
|
||||
if test "${soc_type}" = "imx8dx"; then
|
||||
bus_width="16bit"
|
||||
fi
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-${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"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x02"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x04"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x05"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x06"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x07"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x08"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x09"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x0A"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x0B"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use 'test -n ...' because 'test -z ...' does not work well on old versions of
|
||||
# u-boot when the checked value is empty.
|
||||
if test -n "${INSTALL_UBOOT_FILENAME}"; then
|
||||
true;
|
||||
else
|
||||
echo "";
|
||||
echo "[ERROR] Cannot determine U-Boot file for this module!";
|
||||
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-##MACHINE##-${soc_rev}-1GB_32bit.bin";
|
||||
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin";
|
||||
echo " - For a DualX CPU with 1GB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin";
|
||||
echo " - For a DualX CPU with 512MB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin";
|
||||
echo "";
|
||||
echo "2. Run the install script again.";
|
||||
echo "";
|
||||
echo "Aborted";
|
||||
echo "";
|
||||
exit;
|
||||
fi;
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}.bin;
|
||||
|
||||
setenv INSTALL_MMCDEV 1
|
||||
|
||||
|
|
|
|||
|
|
@ -18,66 +18,7 @@ fi
|
|||
# the necessary logic to choose the correct imx-boot file for the target's SOC.
|
||||
setenv skip-uboot-check "yes"
|
||||
|
||||
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
|
||||
bus_width="32bit"
|
||||
if test -n "${module_ram}" && test -n "${soc_type}"; then
|
||||
if test "${soc_type}" = "imx8dx"; then
|
||||
bus_width="16bit"
|
||||
fi
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-${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"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x02"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x04"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x05"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x06"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x07"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x08"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin;
|
||||
elif test "${module_variant}" = "0x09"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x0A"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
elif test "${module_variant}" = "0x0B"; then
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use 'test -n ...' because 'test -z ...' does not work well on old versions of
|
||||
# u-boot when the checked value is empty.
|
||||
if test -n "${INSTALL_UBOOT_FILENAME}"; then
|
||||
true;
|
||||
else
|
||||
echo "";
|
||||
echo "[ERROR] Cannot determine U-Boot file for this module!";
|
||||
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-##MACHINE##-${soc_rev}-1GB_32bit.bin";
|
||||
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin";
|
||||
echo " - For a DualX CPU with 1GB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin";
|
||||
echo " - For a DualX CPU with 512MB LPDDR4, run:";
|
||||
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin";
|
||||
echo "";
|
||||
echo "2. Run the install script again.";
|
||||
echo "";
|
||||
echo "Aborted";
|
||||
echo "";
|
||||
exit;
|
||||
fi;
|
||||
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##-${soc_rev}.bin;
|
||||
|
||||
setenv INSTALL_USBDEV 0
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ fi
|
|||
echo ""
|
||||
echo "Determining image files to use..."
|
||||
|
||||
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
|
||||
# Determine U-Boot file to program basing on SOM's SOC revision
|
||||
if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
|
||||
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
|
||||
# SOC revision to the environment, use B0 by default
|
||||
|
|
@ -102,59 +102,7 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
|
|||
soc_rev="B0"
|
||||
fi
|
||||
|
||||
bus_width="32bit"
|
||||
soc_type=$(getenv "soc_type")
|
||||
if [ "$soc_type" = "imx8dx" ]; then
|
||||
bus_width="16bit"
|
||||
fi
|
||||
|
||||
module_ram=$(getenv "module_ram")
|
||||
if [ -z "${module_ram}" ]; then
|
||||
module_variant=$(getenv "module_variant")
|
||||
# Determine U-Boot file to program basing on SOM's variant
|
||||
if [ -n "$module_variant" ] || [ "$module_variant" = "0x00" ]; then
|
||||
if [ "$module_variant" = "0x01" ] || \
|
||||
[ "$module_variant" = "0x04" ] || \
|
||||
[ "$module_variant" = "0x05" ]; then
|
||||
module_ram="1GB"
|
||||
elif [ "$module_variant" = "0x06" ] || \
|
||||
[ "$module_variant" = "0x09" ]; then
|
||||
module_ram="512MB"
|
||||
else
|
||||
module_ram="2GB"
|
||||
fi
|
||||
INSTALL_UBOOT_FILENAME="imx-boot-##MACHINE##-${soc_rev}-${module_ram}_${bus_width}.bin"
|
||||
fi
|
||||
else
|
||||
INSTALL_UBOOT_FILENAME="imx-boot-##MACHINE##-${soc_rev}-${module_ram}_${bus_width}.bin"
|
||||
fi
|
||||
|
||||
# U-Boot when the checked value is empty.
|
||||
if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then
|
||||
true
|
||||
else
|
||||
# remove redirect
|
||||
uuu fb: ucmd setenv stdout serial
|
||||
|
||||
echo ""
|
||||
echo "[ERROR] Cannot determine U-Boot file for this module!"
|
||||
echo ""
|
||||
echo "1. Add U-boot file name, depending on your ConnectCore 8X variant, to script command line:"
|
||||
echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:"
|
||||
echo " => ./install_linux_fw_uuu.sh -u imx-boot-##MACHINE##-${soc_rev}-1GB_32bit.bin"
|
||||
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:"
|
||||
echo " => ./install_linux_fw_uuu.sh -u imx-boot-##MACHINE##-${soc_rev}-2GB_32bit.bin"
|
||||
echo " - For a DualX CPU with 1GB LPDDR4, run:"
|
||||
echo " => ./install_linux_fw_uuu.sh -u imx-boot-##MACHINE##-${soc_rev}-1GB_16bit.bin"
|
||||
echo " - For a DualX CPU with 512MB LPDDR4, run:"
|
||||
echo " => ./install_linux_fw_uuu.sh -u imx-boot-##MACHINE##-${soc_rev}-512MB_16bit.bin"
|
||||
echo ""
|
||||
echo "2. Run the install script again."
|
||||
echo ""
|
||||
echo "Aborted"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
INSTALL_UBOOT_FILENAME="imx-boot-##MACHINE##-${soc_rev}.bin"
|
||||
fi
|
||||
|
||||
# remove redirect
|
||||
|
|
|
|||
Loading…
Reference in New Issue