A C# port of AOSP's mkbootimg