I'm using the Arduino board and the AVRISPMKII to program the bootlader... since it have the crystal ans the suplly to the chip.
With avrdude I get this error:
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude.exe: Device signature = 0x010305
avrdude.exe: Expected signature for ATmega328P is 1E 95 0F
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex"
avrdude.exe: input file C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex auto detected as Intel Hex
avrdude.exe: writing flash (32768 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 32768 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex:
avrdude.exe: load data flash data from input file C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex:
avrdude.exe: input file C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex auto detected as Intel Hex
avrdude.exe: input file C:\Users\Neves\Desktop\arduino-1.6.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex contains 32768 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x7e00
0x00 != 0x11
avrdude.exe: verification error; content mismatch
avrdude.exe done. Thank you.