zymbit/rpi-mkimg

Does this work on mac os x terminal?

Closed this issue · 4 comments

Been trying to make this work on mac os x terminal. Any idea on what needs to change in order to do that?

I get the following errors...

fdisk: illegal option -- l

and

`disk' is of the form /dev/rdisk0.

and

The first partition is expected to be FAT32

Thanks for sharing your script! Any idea how to make this work for mac?

After a bit more reading I found out that you need to use diskutil list instead of fdisk -l. Any ideas how I can convert the whole script? I'm trying to avoid running a virtual machine. Thanks!

rca commented

@danielbh I wrote this script with the intention of running it on a Linux system. While definitely possible to get it to work on OSX, diskutil is only the first utility that would need to be ported. In addition to fdisk, this script uses:

  • e2fsck to check the filesystem integrity
  • resize2fs to optimally resize the partition
  • parted for partition resizing (actually the fdisk usage can be replaced with a parted call).

Would be cool to make it work on OSX! It may require omitting some of the optimization steps due to lack of the corresponding utility on OSX or finding a version of that utility ported to work on Darwin (like ext filesystem utils).

rca commented

I'm going to close this for now; please re-open if you'd like to take a stab at porting it over.

Alright will do. Thanks.