install_linux_fw_sd: parametrize the mmc device index containing the firmware

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2016-07-06 13:39:24 +02:00
parent a32cea139b
commit 6f2acb17c6
1 changed files with 5 additions and 4 deletions

View File

@ -60,12 +60,13 @@ else
exit; exit;
fi; fi;
setenv INSTALL_MMCDEV 1
setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.boot.vfat setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.boot.vfat
setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.ext4 setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.ext4
# Check for presence of firmware files on the SD card # Check for presence of firmware files on the SD card
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
if test ! -e mmc 1:1 ${install_f}; then if test ! -e mmc ${INSTALL_MMCDEV}:1 ${install_f}; then
echo "ERROR: Could not find file ${install_f}"; echo "ERROR: Could not find file ${install_f}";
install_abort=1; install_abort=1;
fi; fi;
@ -91,7 +92,7 @@ echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc 1 fat ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!"; echo "[ERROR] Failed to update U-Boot boot loader!";
echo ""; echo "";
@ -126,7 +127,7 @@ setenv bootcmd "
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing Linux kernel and device tree files\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux mmc 1 fat ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\"; echo \"[ERROR] Failed to update linux partition!\";
echo \"\"; echo \"\";
@ -138,7 +139,7 @@ setenv bootcmd "
echo \">> Installing Linux root file system\"; echo \">> Installing Linux root file system\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs mmc 1 fat ${INSTALL_ROOTFS_FILENAME}; update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\"; echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\"; echo \"\";