Flash SD Card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash SD Card

Flash SD Card



Flash a full SD Card Android Image (4GB) using Linux on VMWare


Note: It is preferred that SanDisk 4G SD card be used rather then Kingston. Kingston seemed to enumerate slightly smaller then SanDisk which actually inhibited us from flashing the image onto Kingston.

      
  1. Within VMWare player, go to places/filesystems/dev to see what the SD card is called. When plugging in or removing the SD card from an external reader, you should see within the dev folder files called sdx…etc. [x= some letter]. That will help you specify which card to program with your image. Make note of the file [which is really a drive] name. For example in my VMWare player, it turns out that my SD card that I want to program was sdb. Also, if windows asks to format the drive, allow it and use Fat32. And, if you notice the drive is only 1GB instead of 3-4GB its because you only formatted the windows structure of the disk, the Linux portion that might reside on it does not show up in Windows.
  2. For distribution, the entire image which includes the *.bin file {this is the one you are trying to get onto the SD card} can be downloadable from a Freescale FTP site or some other media. It is a large file which is between 1-2GB. In this Android example, the file is called MasterA.gz. GZ is a linux based zip application which runs circles around winzip or 7-zip. The Android image, MasterA.gz, was 1.08 GB.
    The file you want to see in this example is MasterA.bin.
  3. Open a terminal window in VMWare. Within VMWare, unzip the file. If you select the file, then right mouse click it it will give you the option to uncompress using GZ.
  4. Before moving forward, make sure the SD card is unmounted. To do this type

sudo umount /dev/sdX {note: sdb was the SD card we previously found enumerated}.

          If you don’t know if it is mounted, in places/filesystems/dev on the left side of the screen you will see names with shown next to it. That means it’s          mounted.

  • To copy Android image to sd card, type
sudo dd if=masterA.bin of=/dev/sdX bs=10M

X is the sd card (like /sdb, /sdc etc.)

This will take some time, so if you have to stop this process hit <ctrl C> or close the terminal window. This will take some time but that’s all that it takes.
Use the bottom task bar of the VMware screen, to attach the USB removable drive to Linux.

Flash a full SD card image (4GB) using Flashnul in Windows 

The tool you will use to flash the content is FlashNul in windows. This is available at

http://shounen.ru/soft/flashnul/flashnul-1rc1.zip


Steps

Insert your flash media

  1. Run flashnul -p (from the dir that has flashnul)
  2. Note the physical device number for flash media
  3. Run flashnul <number obtained in prior step> -L \path\to\downloaded.img
  4. Answer "yes" if the selected destination device is correct
  5. Remove your flash media when the command completes

Be careful what drive you erase.
There are warnings presented before you commit:

Disk PhysicalDrive2 (UNC name: \\.\PhysicalDrive2)
        ------------------------------------------------------------[Drive geometry]--
        Cylinders/heads/sectors = 482/255/63
        Bytes per sector = 512
        CHS size = 3964584960 (3780 Mb)
        ---------------------------------------------------------------[Device size]--
        Device size = 3965190144 (3781 Mb)
        delta to near power of 2 = 329777152 (314 Mb), 8%
        Surplus size = 605184 (591 kb)
        -----------------------------------------------[Adapter & Device properties]--
        Bus type = (7) USB
        Removable device = Yes
        Command Queue = Unsupported
        Device vendor = Generic
        Device name = USB SD Reader
        Revision = 0.00
        --------------------------------------------------------------[Hotplug info]--
        Device hotplug = Yes
        Media hotplug = No

Selected operation: load file content

Selected drive: PhysicalDrive2, 3965190144b (3781 Mb)</pre>
        THIS OPERATION IS DESTRUCTIVE!!!
        Type 'yes' to confirm operation. All other text will stop it.

Really destroy data on drive PhysicalDrive2? :yes
        -----------------------------------------------------------------------[Log]--

Runing operation [load file content] for drive PhysicalDrive2

Writing 0x36110000 (865 Mb), 3362893 b/s

     
No ratings
Version history
Last update:
‎09-10-2020 02:17 AM
Updated by: