To burn the ATmega328P to run with 8MHz internal clock I'm using the ARDUINO PRO MINI bootloader.
Just changing the FUSE of the oscilator:
- Low Fuse: E2
- High Fuse: DA
- Ext Fuse: 05
I'm using JTAGICE mkII-CN as programmer.
AVRDUDE command line:
- /media/juliano/arduino-1.6.5-r5/hardware/tools/avr/bin/avrdude -C/media/juliano/arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m
- /media/juliano/arduino-1.6.5-r5/hardware/tools/avr/bin/avrdude -C/media/juliano/arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -Uflash:w:/media/juliano/arduino-1.6.5-r5/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex:i -Ulock:w:0x0F:m