From 8b610ea212cbb06a479971d48172f8f386d9e679 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Tue, 20 Feb 2018 11:53:31 +0100 Subject: [PATCH] install_linux_fw_sd: Removed hard-coded SD partition index Under certain circumstances I was able to create a microSD card with the FAT file system but corrupt partition table like this one: Device Boot Start End Sectors Size Id Type /dev/sdf1p1 778135908 1919645538 1141509631 544,3G 72 unknown /dev/sdf1p2 168689522 2104717761 1936028240 923,2G 65 Novell Netware 386 /dev/sdf1p3 1869881465 3805909656 1936028192 923,2G 79 unknown /dev/sdf1p4 2885681152 2885736650 55499 27,1M d unknown Specifying the partition index made the install script to fail, but not specifying it makes it work, although it also falls back to use the first partition in the table. Signed-off-by: Gonzalo Ruiz --- .../u-boot-dey-2015.04/ccimx6qpsbc/install_linux_fw_sd.txt | 2 +- .../u-boot/u-boot-dey-2015.04/ccimx6sbc/install_linux_fw_sd.txt | 2 +- .../u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt | 2 +- .../u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6qpsbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6qpsbc/install_linux_fw_sd.txt index 76bebec7b..918a3715f 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6qpsbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6qpsbc/install_linux_fw_sd.txt @@ -51,7 +51,7 @@ setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6qpsbc.ex # Check for presence of firmware files on the SD card for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do - if test ! -e mmc ${INSTALL_MMCDEV}:1 ${install_f}; then + if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then echo "ERROR: Could not find file ${install_f}"; install_abort=1; fi; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6sbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6sbc/install_linux_fw_sd.txt index 94c49ff4e..818f19018 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6sbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6sbc/install_linux_fw_sd.txt @@ -67,7 +67,7 @@ setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.ext4 # Check for presence of firmware files on the SD card for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do - if test ! -e mmc ${INSTALL_MMCDEV}:1 ${install_f}; then + if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then echo "ERROR: Could not find file ${install_f}"; install_abort=1; fi; 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 45907a03c..f6dfc5a08 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 @@ -55,7 +55,7 @@ setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.ub # Check for presence of firmware files on the SD card for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do - if test ! -e mmc ${INSTALL_MMCDEV}:1 ${install_f}; then + if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then echo "ERROR: Could not find file ${install_f}"; install_abort=1; fi; 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 9720807f2..6f9a1614b 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 @@ -55,7 +55,7 @@ setenv INSTALL_ROOTFS_FILENAME core-image-base-ccimx6ulstarter.ubifs # Check for presence of firmware files on the SD card for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do - if test ! -e mmc ${INSTALL_MMCDEV}:1 ${install_f}; then + if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then echo "ERROR: Could not find file ${install_f}"; install_abort=1; fi;