Version 1 (modified by murphpo, 12 years ago) (diff) |
---|
OS X
Apple provides a copy of dd with recent releases of OS X (at least since 10.7, probably earlier).
Finding the SD card descriptor:
- Insert the SD card
- In a terminal run diskutil list to find device descriptor for SD card. Look for the SD card in the list of disks. On a MBP, the shows:
#: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.1 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 499.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *2.0 GB disk1 1: DOS_FAT_32 WARP SD 32.0 MB disk1s1
- In this example, the SD card device descriptor is /dev/disk1. The actual descriptor will differ on other machines with different disk configurations.
Copying the .bin file:
- Unmount (not eject) the drive using this command:
diskutil unmountDisk /dev/diskX
- Run this command, replacing the last three arguments with the correct values:
dd bs=512 seek=<N> if=<yourFile.bin> of=</dev/diskX>
- <N>: depends on the target slot number; see the list above
- <yourFile.bin>: the binary FPGA configuration file
- </dev/diskX>: device descriptor for the SD card
- If successful, dd should report the following (the time/throughput values will differ):
18032+1 records in 18032+1 records out 9232444 bytes transferred in 8.503631 secs (1085706 bytes/sec)
- Repeat for additional .bin config files if needed.
- Eject the SD card in the Finder (if it's mounted).