Flashing bootloader bricks AtMega328P

Hello, I am trying to load the bootloader for Duemilanove onto AtMega328P chips using the avrispMKII programmer in ubuntu. So far, following the instructions provided online appears to brick the chips. I am done wasting time trying to get this to work, and am simply posting information about the situation here in case someone else runs into the same problem.

The avrispMKII works fine and recognizes chips, I can upload firmware using it, etc. The problem seems to be that the makefile included with Arduino for flashing the bootloader sets the fuses in a sequence that (1) bricks the chip and (2) utterly fails to load the firmware.

Starting with a fresh AtMeta328P, this is what I get when I try to upload the firmware:

$ make atmega328_isp
avrdude -c stk500v2 -p atmega328p -P /dev/ttyUSB1 -b 115200 -e -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file “0x3f”
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of lock verified
avrdude: reading input file “0x05”
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: input file 0x05 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of efuse verified
avrdude: reading input file “0xDA”
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDA:
avrdude: load data hfuse data from input file 0xDA:
avrdude: input file 0xDA contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of hfuse verified
avrdude: reading input file “0xFF”
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of lfuse verified

avrdude done. Thank you.

avrdude -c stk500v2 -p atmega328p -P /dev/ttyUSB1 -b 115200 -U flash:w:ATmegaBOOT_168_atmega328.hex -U lock:w:0x0f:m

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.
make: *** [isp] Error 1

Once this happens, the chip becomes unusable and attempting to query it with avrdude will always yield the following error:

$ avrdude -c avrispMKII -p m328p -P /dev/ttyUSB1 -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xc89773
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done. Thank you.

As I said, I’m completely fed up with trying to get this to work. I’m out of AtMega328 chips, since the Arduino bootloader makefile has bricked them all. I’m throwing it all alway and just buying a new freaking Arduino, because this is unacceptable.

Hi
I am curious, where are the chips sitting when you burn the bootloader onto them? Are they installed in the Arduino socket, or on a breadboard with a crystal?

Looks to me like you're setting them to use a crystal, but there isn't a crystal connected.