Wiki

This version (01 Aug 2017 16:01) was approved by CsomI.The Previously approved version (14 Apr 2015 16:25) is available.Diff

Linux Download and setting up the image

Download the file

  1. Download the materials. You can use right click “Save As”, but this is a little more descriptive for a wiki:
    rgetz@brain:~/newest$ time wget http://swdownloads.analog.com/cse/2014_R2-2015_02_06.img.xz
    --2014-12-15 17:12:33--  http://swdownloads.analog.com/cse/2014_R2-2015_02_06.img.xz
    Resolving swdownloads.analog.com (swdownloads.analog.com)... 81.196.26.153, 81.196.26.177
    Connecting to swdownloads.analog.com (swdownloads.analog.com)|81.196.26.153|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 787801476 (755M) [application/octet-stream]
    Saving to: `2014_R2-2014_R2-2015_02_06.img.xz'
    
    100%[=======================================================================================================================================================================>] 787,801,476 1.94M/s   in 6m 52s  
    
    2014-12-15 17:19:26 (1.83 MB/s) - `2014_R2-2014_R2-2015_02_06.img.xz' saved [787801476/787801476]
    
    
    real	6m53.573s
    user	0m0.740s
    sys	0m32.342s
    
    
    Yeah, it takes an hour (or more if your connection is slow). At least you can drive down to your favourite coffee store, and indulge yourself.

Verify the download

  1. check the md5, to make sure you have the right file.
    rgetz@brain:~/newest$ md5sum 2014_R2-2015_02_06.img.xz 
    bb76031fcd68fd9b1a175a2f7fd3e053  2014_R2-2015_02_06.img.xz
    
    
  2. an xz file is a compressed file, you need to uncompress it, and check the md5sum:
    rgetz@brain:~/newest$ time unxz 2014_R2-2015_02_06.img.xz
    
    real	1m17.40s
    user	74.44s
    sys	2.11s
    
    Now is the time you eat the doughnut that you bought when you were out.
    1. Again, check the results:
      rgetz@brain:~/newest$ md5sum 2014_R2-2015_02_06.img 
      132d03a2888db34f10f0ebbcb3100ae7  2014_R2-2015_02_06.img
      rgetz@brain:~/newest$ ls -l 2014_R2-2015_02_06.img
      -rw-rw-r-- 1 rgetz rgetz 7948206080 Feb 6 16:44 2014_R2-2015_02_06.img
      rgetz@brain:~/newest$ ls -lh 2014_R2-2015_02_06.img
      -rw-rw-r-- 1 rgetz rgetz 7.5G Feb 6 16:44 2014_R2-2015_02_06.img
      

Setup

Now that everything looks OK, write the file to your SD Card.

This will depends on your system, where your SD card installed itself. You also need to do this as root, since normal users shouldn't be able to randomly write files to block devices.

  1. plug the SD Card into your SD-Writer. If this mounts the device (which many Linux distributions do), it is important that you unmount it.
    rgetz@brain:~/newest$  sudo umount /dev/mmcblk0p1
  2. Write the file (input file or if) to the storage device (output file or of):
    rgetz@brain:~/newest$ time sudo dd if=2014_R2-2015_02_06.img of=/dev/mmcblk0 bs=4194304
    [sudo] password for rgetz: 
    0+60640 records in
    0+60640 records out
    7948206080 bytes (7.9 GB) copied, 571.766 s, 13.9 MB/s
    
    real	7m54.11s
    user	0.29s
    sys	8.94s
    
    Now, you have have that slice of pizza that you got too… :)
  3. ensure the output buffers are flushed:
    rgetz@brain:~/newest$ sync
    
  4. unplug the SD card from your PC.

Verify

Since it's possible that the write process of a disk image can have some issues (if the target had a sector marked as bad, dd will not notice, and write on top of it), the safest thing to do is to run a file system consistency check on things. If you are unsure of how to use this tool, check the man page.

Most Linux kernels will need to have a physical eject between the steps above, and the steps below.

  1. unmount the file systems (fsck will not work on a mounted file system)
    rgetz@brain:~/images$ sudo umount /dev/mmcblk0p1
    rgetz@brain:~/images$ sudo umount /dev/mmcblk0p2
    
    . If this errors, with a umount: /dev/mmcblk0p2: not mounted, that's OK. If it errors with umount: /dev/mmcblk0p2: not found, that means you have no disk inserted, or did a typo in the path.
  2. perform the file system consistency check:
    rgetz@brain:~/images$ sudo fsck -y /dev/mmcblk0p1
    fsck from util-linux 2.20.1
    dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
    /dev/mmcblk0p1: 158 files, 76420/130812 clusters
    rgetz@brain:~/images$ sudo fsck -y /dev/mmcblk0p2
    fsck from util-linux 2.20.1
    e2fsck 1.42.5 (29-Jul-2012)
    /dev/mmcblk0p2: clean, 157918/452480 files, 717760/1808128 blocks
    
resources/tools-software/linux-software/zynq_images/linux_hosts.txt · Last modified: 26 Jul 2017 16:05 by cigale