This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 SD card boot issue, format error, "BLKRRPART: Invalid argument"



I am trying to format the SD card so that I can boot the DM365 from a SD card but getting the error message

"BLKRRPART: Invalid argument", please see below

I have looked at the forum for answers as well as searched on many places but cannot solve the issue.

I am following the web link,

http://processors.wiki.ti.com/index.php/DM3xx_SD_card_boot_and_flashing_program

I don’t think it’s the SD card. Also is there a bin file that can be saved directly from the linux PC to a SD card for the boot, as I am only trying to verify the hardware at this stage?

 

[root@tools dm3xx_sd_boot-6.1]# sudo ./dm3xx_sd_boot format /dev/sdf1

cleaning SD card

1000+0 records in

1000+0 records out

1024000 bytes (1.0 MB) copied, 0.0288546 s, 35.5 MB/s

BLKRRPART: Invalid argument

Failed to format SD card

10000+0 records in

10000+0 records out

10240000 bytes (10 MB) copied, 1.35059 s, 7.6 MB/s

dm3xx_boot_data_addr=0x

Image dm3xx_boot_rec:please define dm3xx_boot_data_addr

10000+0 records in

10000+0 records out

10240000 bytes (10 MB) copied, 0.627543 s, 16.3 MB/s

dm3xx boot record is written

Please reinsert the card for auto mounting or mount it manually

  • Yes I have seen the troubleshooting, no it didn’t help me.

    Yes I am doing the “export PATH=$PATH:bin.x86” (1), yes mounting SD card is not consistent, but I can find and mount the SD card without any issues (2-3), I am formatting SD to standard FAT on Linux, not ext2/3 or encry FAT(4). I am not passing the format stage.

        

    Troubleshooting

    1.     bug and hot fix: when working on PC run before work: export PATH=$PATH:bin.x86

    2.     Be careful don't damage your hard disk. Format SD card only. Check for available storage devices in file /proc/partitions

    3.     sometimes format fails at first time because of conflict with automatic mount. Just try a second time.

    4.     format device, not partition: /dev/sdc and /dev/mmcblk0 - storage devices, /dev/sdc1 and /dev/mmcblk0p1 - partitions on this devices

    5.     With certain SD cards the tool gets stuck at some random address during flashing/booting from SD card. Try another card.

     

  • Just a clarification: The format comes ok on Linux(FAT) but formatting for DM365 is the issue. 

  • sudo ./dm3xx_sd_boot format /dev/sdf1

  • Thank you Constantine

    I am making progress as now I am not only formatted the SD card but also made the boot file.

    But now there is another issue, when I put the SD card in the DM365 leopard board I am not getting anything on the terminal, I do see the LED1 and LED2 turned on.

    I suspect there is something else not right, could you please let me know if you see any issues?

    I assumed the default is DM365 and didn’t change the configuration file.

    [root@tools ~]# export PATH=$PATH:./bin.x86

    [root@tools ~]# cd /media/809A-4AF4/dm3xx_sd_boot-6.1

    [root@tools dm3xx_sd_boot-6.1]# cd dm3xx_sd_boot-6.1

    [root@tools dm3xx_sd_boot-6.1]# mount -t vfat /dev/sda1 /media/sdcard

    mount: /dev/sda1 already mounted or /media/sdcard busy

    mount: according to mtab, /dev/sdd1 is already mounted on /media/sdcard

    [root@tools dm3xx_sd_boot-6.1]# sudo ./dm3xx_sd_boot format /dev/sdd

    cleaning SD card

    1000+0 records in

    1000+0 records out

    1024000 bytes (1.0 MB) copied, 0.760558 s, 1.3 MB/s

    Disk /dev/sdd: 1015 cylinders, 63 heads, 62 sectors/track

    sfdisk: ERROR: sector 0 does not have an msdos signature

    /dev/sdd: unrecognized partition table type

    Old situation:

    No partitions found

    New situation:

    Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End MiB #blocks Id System

    /dev/sdd1 * 0+ 40- 41- 41012+ b W95 FAT32

    /dev/sdd2 * 40+ 1935- 1896- 1941282 83 Linux

    /dev/sdd3 0 - 0 0 0 Empty

    /dev/sdd4 0 - 0 0 0 Empty

    Successfully wrote the new partition table

    Re-reading the partition table ...

    mkfs.vfat 3.0.1 (23 Nov 2008)

    0+0 records in

    0+0 records out

    0 bytes (0 B) copied, 0.000200782 s, 0.0 kB/s

    0+1 records in

    0+1 records out

    19 bytes (19 B) copied, 0.000127263 s, 149 kB/s

    total 15000

    -rwxr-xr-x. 1 root root 15360000 2011-09-28 01:47 dm3xx.dat

    SD card /dev/sdd formatted

    10000+0 records in

    10000+0 records out

    10240000 bytes (10 MB) copied, 1.09671 s, 9.3 MB/s

    dm3xx_boot_data_addr=0x0a2000

    Image dm3xx_boot_rec:a1aced00 100 3c 511 0 0 0 0 a2000

    10000+0 records in

    10000+0 records out

    10240000 bytes (10 MB) copied, 1.15872 s, 8.8 MB/s

    dm3xx boot record is written

    Please reinsert the card for auto mounting or mount it manually

    [root@tools dm3xx_sd_boot-6.1]# make install

    ./dm3xx_sd_boot data

    copying data to

    Writing /media/dm3xx-boot/dm3xx.dat

    000200-006724, 25892 bytes <- sdcard_flash/sdcard_flash_DM36x.bin

    008000-008200, 512 bytes <- test pattern 1 2 3

    010000-015000, 20480 bytes <- original/UBL_DM36x_NAND.bin

    020000-045308, 152328 bytes <- original/u-boot-1.3.4-dm365_evm.bin

    060000-2547c8, 2049992 bytes <- original/uImage-dm365

    400000-6740c7, 2572487 bytes <- original/ramdisk.gz

    syncing

    DM355 boot data copied in data file /media/dm3xx-boot/dm3xx.dat on

    Filesystem 1K-blocks Used Available Use% Mounted on

    /dev/sdd1 40365 15001 25365 38% /media/dm3xx-boot

    [root@tools dm3xx_sd_boot-6.1]#

     

     

     

  • The SD card format works - see above Constantine's recommendation.