AVR

Al the examples here are made with an Arduino UNO as ISP used for programming a separate atmega328p on a breadboard.

AVRdude

avrdude -p m328p -c arduino

Test avr programmer with an Arduino as ISP, this gives info about the programmer board

avrdude -p m328p -c avrisp -P /dev/ttyUSB0 -b 19200

Test avr programmer with an Arduino as ISP, gives info about the target chip to program

es:

conny:~$ avrdude -p m328p -c avrisp -P /dev/ttyUSB0 -b 19200

avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.05s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:FF, H:D9, L:62)
avrdude done.  Thank you.

Fuses

Fuse calc: http://www.engbedded.com/fusecalc/

Arduino Uno 328p default fuse:

lfuse = 0xff
hfuse = 0xde
efuse = 0x05


as in boards.txt

uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05

Burning:

avrdude -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200 -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m

328p on a bread board with onboard 8mhz oscillator:

avrdude -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200  -U lfuse:w:0x62:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m