diff --git a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf index f3448a6e5..224813415 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf @@ -7,7 +7,8 @@ include conf/machine/include/ccimx6ul.inc # U-Boot configurations # Last one is the default (the one the symlinks point at) -UBOOT_CONFIG ??= "ccimx6ulsbc" +UBOOT_CONFIG ??= "ccimx6ulsbc1GB ccimx6ulsbc" +UBOOT_CONFIG[ccimx6ulsbc1GB] = "ccimx6ulsbc1GB_defconfig" UBOOT_CONFIG[ccimx6ulsbc] = "ccimx6ulsbc_defconfig" KERNEL_DEVICETREE ?= " \ diff --git a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf index 184b980a8..317b38ee5 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf @@ -7,7 +7,8 @@ include conf/machine/include/ccimx6ul.inc # U-Boot configurations # Last one is the default (the one the symlinks point at) -UBOOT_CONFIG ??= "ccimx6ulstarter" +UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter" +UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig" UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig" KERNEL_DEVICETREE ?= " \ diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt index 2240940a9..45907a03c 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt @@ -19,8 +19,36 @@ if test $? -eq 1; then exit; fi +# Determine U-Boot file to program basing on module variant +if test -n "${module_variant}"; then + if test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc1GB.imx; + 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 6UL variant:"; + echo " - For a SOM with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc1GB.imx"; + echo " - For a SOM with 256MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + setenv INSTALL_MMCDEV 0 -setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.boot.ubifs setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.recovery.ubifs setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.ubifs diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt index 24ba14447..9720807f2 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt @@ -19,8 +19,36 @@ if test $? -eq 1; then exit; fi +# Determine U-Boot file to program basing on module variant +if test -n "${module_variant}"; then + if test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx; + 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 6UL variant:"; + echo " - For a SOM with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx"; + echo " - For a SOM with 256MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + setenv INSTALL_MMCDEV 0 -setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx setenv INSTALL_LINUX_FILENAME core-image-base-ccimx6ulstarter.boot.ubifs setenv INSTALL_RECOVERY_FILENAME core-image-base-ccimx6ulstarter.recovery.ubifs setenv INSTALL_ROOTFS_FILENAME core-image-base-ccimx6ulstarter.ubifs