imgtool for Mac
Loads firmware (GoldenImage.bin) to an SD card to be installed on one of the logic boards.
git clone git@github.com:glukicov/imgtool.git
make clean
make Board=FC7_0
cd bin
Insert and unmount the SD card first
diskutil list (to find e.g. dev/disk2 for the SD card)
diskutil unmountDisk /dev/disk2
sudo ./imgtool /dev/disk2 format GoldenImage.bin
sudo ./imgtool /dev/disk2 add GoldenImage.bin GoldenImage.bin
A) Changes to imgetool.c in imgtool/src/common
[line 10]
#include <sys/disk.h> //Mac specific
[line 561-562]
//xRet = ioctl ( gFD, BLKGETSIZE64, &xImageSz ); //Linux
xRet = ioctl(gFD, DKIOCGETBLOCKCOUNT, &pSize); //Mac:
[line 566]
//*pSize = xImageSz / BLK_SIZE; // Linux: no need to divide here
B) Changes to Makefile (to use gcc instead of clang) gcc-> gcc.49; make sure you have gcc-4.9 installed with brew install gcc49
CC=gcc-4.9