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 <Gonzalo.Ruiz@digi.com>
This commit is contained in:
Gonzalo Ruiz 2018-02-20 11:53:31 +01:00
parent 7c34990c01
commit 8b610ea212
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;