I was having a terrible time getting my modified code onto my BM66 today but after many hours I have it figured out.
The first problem was getting the program to open the IMG that was pulled from the original memory card. No matter what I seemed to try I couldn't get into the IMG file to edit it. I would instead get the unknown firmware error.
I eventually gave up on that and tried the less recommended method of opening the downloaded update file, which opened fine and let me make the edits I wanted but when I would repack the files there were only two instead of the original 3. I could see the the .000 file was the size of itself and the .001 file put together but my machine wouldn't recognize the 2 files as an update.
After many attempts at getting the machine to see the new files I noticed that the file names were also different than the originals, the untouched update files had a .spk in the filename whereas the modified ones did not. A quick rename of the files to include the .spk in the middle seems to be what was needed in order for my machine to recognize the files as an update.
I spent way too much time today figuring that out but I hope I can help anyone else who might be having the same problem.