@tehn is there another software alternative to rpiboot? I tried to install but got an error on Mac OS. I suppose another option is to install rpiboot on another Raspberry Pi just to load the image.
Here is the error on Mac OS Sierra (10.12.6):
carl:usbboot carltesta$ make
cc -Wall -Wextra -g -o rpiboot main.c -lusb-1.0
main.c:394:16: warning: comparison of array 'pathname' not equal to a null
pointer is always true [-Wtautological-pointer-compare]
if(overlay&&(pathname != NULL))
^~~~~~~~ ~~~~
main.c:417:9: warning: implicit declaration of function 'fmemopen' is invalid in
C99 [-Wimplicit-function-declaration]
fp = fmemopen(msd_bootcode_bin, msd_bootcode_bin...
^
main.c:417:7: warning: incompatible integer to pointer conversion assigning to
'FILE *' (aka 'struct __sFILE *') from 'int' [-Wint-conversion]
...fp = fmemopen(msd_bootcode_bin, msd_bootcode_bin_len, "rb");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:420:8: warning: incompatible integer to pointer conversion assigning to
'FILE *' (aka 'struct __sFILE *') from 'int' [-Wint-conversion]
...fp = fmemopen(msd_start_elf, msd_start_elf_len, "rb");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:601:2: warning: 'libusb_set_debug' is deprecated
[-Wdeprecated-declarations]
libusb_set_debug(ctx, verbose ? LIBUSB_LOG_LEVEL_WARNING : 0);
^
/usr/local/include/libusb-1.0/libusb.h:1300:18: note: 'libusb_set_debug' has
been explicitly marked deprecated here
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
^
5 warnings generated.
Undefined symbols for architecture x86_64:
"_fmemopen", referenced from:
_check_file in main-a5db02.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rpiboot] Error 1