I was running into the same error as the first one. Eliminating the first line of the hex file fixed that issue, but now I have a new one.
I've noticed that the verify step in the flash fails no matter what bootloader I try to load.
Using the optiboot hex file that was attached, my command is:
avrdude -p m644p -C "[path to avrdude.conf]" -c dapa -P lpt1 -U flash:w:[path to optiboot_atmega644p.hex]
Avrdude appears to write and read normally, then says:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0xfc00
0x0f != 0xff
avrdude: verification error; content mismatch
Then what's weirder is that the fuse bits have been changed, because the next thing it says is
avrdude: safemode: hfuse changed! Was de, and is now ff
Would you like this fuse to be changed back? [y/n]
I am using Windows 7 and a parallel cable that I built. I suspect the cable could cause the issues and I have a usbasp on the way, but I'd really like to get it to work with the parallel cable. Any thoughts?