WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Aug-27 07:53:09

Qing
Member
Registered: 2014-Aug-27
Posts: 5

Cannot load .bin from SD card

Hi there,

Accidentally I formatted the 2G SD card attached on WARP using Win7 quick format. After that my WARP cannot load the FPGA image from the SD card (the LED D17 partially illuminates all the time). And then I delete the 32M partition on my linux PC, but still can't solve the problem :(. Does anyone meet the same problem? I want to save my SD cards :(

I think I've followed the instructions correctly as following:

yq@yq-LIFEBOOK-E751:~$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000af71e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *  1242187776  1250263039     4037632   82  Linux swap / Solaris
/dev/sda2            2046   656250879   328124417    5  Extended
/dev/sda5            2048   656250879   328124416   83  Linux

Partition table entries are not in disk order

Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes
4 heads, 16 sectors/track, 60352 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
yq@yq-LIFEBOOK-E751:~$ sudo dd bs=512 seek=131072 if=w3_WARPLab_7.4.0.2RF.bin of=/dev/mmcblk0
18032+1 records in
18032+1 records out
9232444 bytes (9.2 MB) copied, 3.01307 s, 3.1 MB/s

P.S. I try the above commands on a new SD card from a new set of WARP and the card works.

Offline

 

#2 2014-Aug-27 09:59:22

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Cannot load .bin from SD card

If you add back the windows partition, are you still able to use the SD card?

Offline

 

#3 2014-Aug-28 08:41:58

Qing
Member
Registered: 2014-Aug-27
Posts: 5

Re: Cannot load .bin from SD card

welsh wrote:

If you add back the windows partition, are you still able to use the SD card?

I've tried that, but the card still doesn't work. I also checked the card, there is no bad sector.

yq@yq-LIFEBOOK-E751:~$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000af71e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *  1242187776  1250263039     4037632   82  Linux swap / Solaris
/dev/sda2            2046   656250879   328124417    5  Extended
/dev/sda5            2048   656250879   328124416   83  Linux

Partition table entries are not in disk order

Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes
53 heads, 48 sectors/track, 1518 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x956f0f9c

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       67583       32768    b  W95 FAT32
yq@yq-LIFEBOOK-E751:~$ sudo dd bs=512 seek=131072 if=w3_WARPLab_7.4.0.2RF.bin of=/dev/mmcblk0
18032+1 records in
18032+1 records out
9232444 bytes (9.2 MB) copied, 2.24311 s, 4.1 MB/s

Offline

 

#4 2014-Aug-28 09:44:52

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Cannot load .bin from SD card

Unfortunately, I'm not an SD expert. 

WARP v3 starts reading the SD card 64 MB from the beginning of the disk (ie Slot 0 is at 131072 * 512 bytes / block = 2^26, or 64 MB).  Then the next slot begins 16 MB (ie 32768 * 512 bytes / block = 2^24, or 16 MB) from the beginning of the previous slot.  See here for the behavior of the LEDs during SD programming.  When there is no data in a slot, then the LED will never fully illuminate. 

One thing I noticed is that the configuration of the SD card is different from what we ship:

Code:

Disk /dev/sdd: 1977 MB, 1977614336 bytes
255 heads, 63 sectors/track, 240 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               2       62505       31252    b  W95 FAT32

specifically, the heads, sectors/track, and cylinders are different.  However, I'm not sure if that makes a difference when using DD.

Offline

 

#5 2014-Aug-29 00:25:35

Qing
Member
Registered: 2014-Aug-27
Posts: 5

Re: Cannot load .bin from SD card

Hi Welsh,

Thanks for your reply. I also notice that the partition of the SD card is different from the original one. Because I use fdisk to partition my SD card, and the default start sector is at least 2048, as show below.

How do you partition the SD card before shipping? fdisk doesn't allow me to start the partition with sector 2. I guess the problem maybe solved if I can revert the SD card to the original state when shipping.
-------------------------------------------------------------
Command (m for help): p

Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes
4 heads, 16 sectors/track, 60352 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe32a7195

        Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-3862527, default 2048): 2
Value out of range.
--------------------------------------------------------------
First sector (2048-3862527, default 2048):


welsh wrote:

Unfortunately, I'm not an SD expert. 

WARP v3 starts reading the SD card 64 MB from the beginning of the disk (ie Slot 0 is at 131072 * 512 bytes / block = 2^26, or 64 MB).  Then the next slot begins 16 MB (ie 32768 * 512 bytes / block = 2^24, or 16 MB) from the beginning of the previous slot.  See here for the behavior of the LEDs during SD programming.  When there is no data in a slot, then the LED will never fully illuminate. 

One thing I noticed is that the configuration of the SD card is different from what we ship:

Code:

Disk /dev/sdd: 1977 MB, 1977614336 bytes
255 heads, 63 sectors/track, 240 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               2       62505       31252    b  W95 FAT32

specifically, the heads, sectors/track, and cylinders are different.  However, I'm not sure if that makes a difference when using DD.

Offline

 

#6 2014-Aug-29 03:38:50

Qing
Member
Registered: 2014-Aug-27
Posts: 5

Re: Cannot load .bin from SD card

Hi, welsh,

I manage to partition my SD card exactly the same as the shipped one (see below). Now the only difference is the Disk Identifier. But the card still doesn't work :(
------------------------------------------------------------
Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes
228 heads, 10 sectors/track, 1694 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ae794

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1               2       62505       31252    b  W95 FAT32
yq@yq-LIFEBOOK-E751:~$ sudo dd bs=512 seek=131072 if=w3_WARPLab_7.4.0.2RF.bin of=/dev/mmcblk0
18032+1 records in
18032+1 records out
9232444 bytes (9.2 MB) copied, 3.15547 s, 2.9 MB/s
----------------------------------------------------------


welsh wrote:

Unfortunately, I'm not an SD expert. 

WARP v3 starts reading the SD card 64 MB from the beginning of the disk (ie Slot 0 is at 131072 * 512 bytes / block = 2^26, or 64 MB).  Then the next slot begins 16 MB (ie 32768 * 512 bytes / block = 2^24, or 16 MB) from the beginning of the previous slot.  See here for the behavior of the LEDs during SD programming.  When there is no data in a slot, then the LED will never fully illuminate. 

One thing I noticed is that the configuration of the SD card is different from what we ship:

Code:

Disk /dev/sdd: 1977 MB, 1977614336 bytes
255 heads, 63 sectors/track, 240 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               2       62505       31252    b  W95 FAT32

specifically, the heads, sectors/track, and cylinders are different.  However, I'm not sure if that makes a difference when using DD.

Offline

 

#7 2014-Aug-29 10:09:45

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Cannot load .bin from SD card

At this point, I'm not sure why it is failing (I assume you have checked the dip switch settings to make sure they are set to slot 0; and that you have seen other cards work on the same kit). 

The only other thing to try would be to get a hex / disk editor and try to view the contents of the card to see that dd is writing the bin file to the correct address (i.e. starting at 64MB offset from the beginning of the card for slot 0).

Offline

 

#8 2014-Aug-30 02:03:02

Qing
Member
Registered: 2014-Aug-27
Posts: 5

Re: Cannot load .bin from SD card

Hi Welsh,

The problem is solved by using an external USB card reader, instead of the SD card reader of my laptop. Actually the problem has nothing to do with the configuration and partition, any configuration is OK if I use a USB card reader.
--------------------------------------
yq@yq-LIFEBOOK-E751:~$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000af71e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *  1242187776  1250263039     4037632   82  Linux swap / Solaris
/dev/sda2            2046   656250879   328124417    5  Extended
/dev/sda5            2048   656250879   328124416   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 1977 MB, 1977614336 bytes
54 heads, 4 sectors/track, 17882 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe667326f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048       67583       32768    b  W95 FAT32
yq@yq-LIFEBOOK-E751:~$ sudo dd bs=512 seek=131072 if=w3_WARPLab_7.4.0.2RF.bin of=/dev/sdb
18032+1 records in
18032+1 records out
9232444 bytes (9.2 MB) copied, 5.47098 s, 1.7 MB/s
-----------------------------------------

Offline

 

#9 2014-Aug-31 10:50:30

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Cannot load .bin from SD card

Glad it's working, and thank you for reporting back. We've never seen this issue, but it's very helpful knowing your result to share with future users.

Offline

 

Board footer