In order to run the workshop labs, you must program the appropriate SD card image for your development board onto the SD card that you will use to boot your board. Below there are SD card images created with various tool release versions for each of the development boards supported by the Workshop Series.
The SoC SW Workshop SD card images are a 512MB image that consist of a 1MB 0xA2 partition for holding the preloader, a 256MB FAT partition which contains all the workshop boot material for all of the supported development boards, and a 255MB EXT3 partition which is currently unused.
Choose SD card image
Start by downloading the appropriate SD card image for your development board to your development host machine. Select the image for your board that was built with the Altera tools release that you plan to work with.
Quartus 15.1.2 SD Card Images
Decompress SD card image
If using Windows, you may use WinZip or some other decompression software that can decompress GZIP formatted archives.
If using linux, you may use the gunzip command:
[~]$ gunzip sd_card.<your_board_version>.image.gz
This should create the file sd_card.<your_board_version>.image.
Program SD card image
On a Windows Host:
- Download Win32DiskImager from http://sourceforge.net/projects/win32diskimager/
- Insert a blank (or eraseable) SD card into a SD→USB card reader adapter, and plug the adapter into your host development machine
- a new drive letter will show up, assuming F:
- run Win32DiskImager
- select the sd_card_*_image for you board
- click 'write' and confirm 'yes'
- wait for the completion
- eject the SD card
On a Linux Host:
Insert your SD card into your host development machine using an SD card adapter. These are usually removable USB based SD card adapters or built-in SD/MMC card adapters on your host development machine.
We need to know what block device our SD card is referenced with on our host, we can determine this by looking in the "/sys/block" directory. In our case we have used a USB SD card adapter and this is the only USB block device that we have attached to our system, so if we run the following command we can easily isolate the device we are interested in:
[~]$ ls -l /sys/block/ | grep "usb"
lrwxrwxrwx 1 root root 0 Jun 20 10:30 sdb -> ../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/host9/target9:0:0/9:0:0:0/block/sdb
[~]$
From the above command we see that the device appears to "sdb". We can also verify that in the "/proc/parittions" file, like this:
[~]$ cat /proc/partitions
major minor #blocks name
...cut...
8 16 3887104 sdb
8 17 262144 sdb1
8 18 260096 sdb2
8 19 1024 sdb3
[~]$
If you are not using a USB SD card adapter but have an internal SD card reader in your development host, then you may need to search for block devices installed on something other than USB. A common SD card reader device type is "mmc", so if you perform the above commands but search for "mmc" instead of "usb" then your output may look like this instead.
[~]$ ls -l /sys/block | grep "mmc"
lrwxrwxrwx 1 root root 0 Jun 23 00:48 mmcblk0 -> ../devices/pci0000:00/0000:00:1c.0/0000:02:00.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0
[~]$ cat /proc/partitions
major minor #blocks name
...cut...
179 0 3887104 mmcblk0
179 1 262144 mmcblk0p1
179 2 260096 mmcblk0p2
179 3 1024 mmcblk0p3
[~]$
For the purposes of the rest of this description, we will stick with the USB block device example and use "/dev/sdb" as our block device in the following commands.
Now that we know which block device we want to program we will "dd" the new SD card image onto it.
CAUTION: be absolutely certain that you have the correct device, as "dd" to the wrong device can destroy your host system.
NOTE: replace the XXX below with your block device reference.
[~]$ sudo dd if=sd_card.<your_board_version>.image of=/dev/XXX bs=4M
[~]$
After we have programmed the new preloader onto our SD card we can run "sync" to ensure that all the IO is complete and then we can remove the SD card from our development host machine.
[~]$ sync
[~]$
Obtaining the SoC Workshop Source materials
It is not recommended that you build your own images of the SoC Workshop materials, but if you are interested in the source material, it is available in this
SoC Workshop Source Repository.
It is intended that you simply choose a prebuilt SD card image above and use that for your lab work.