I'm just collecting together the info I needed to successfully burn an Arduino bootloader onto a 328, which (for those who don't know) gives me twice the RAM, Flash, and EEPROM of an Atmega168. Getting my setup working wasn't easy, and I had a lot of false starts.
1. Get and install the latest version of the Arduino IDE, which as I write is 0014.http://arduino.cc/en/Main/Software
2. Get the latest copy of AVRdude. I'm working on Windows so I got WinAVR. I actually got the latest release candidate, which is 20090306rc1. You can pick it up here:http://sourceforge.net/project/showfiles.php?group_id=68108
3. Inside the Arduino installation folders is this location:
I replaced everything in there with the freshest copy of WinAVR.
4. In NAME_OF_ARDUINO_FOLDER\hardware\tools\avr\etc is a file called avrdude.conf. I replaced it with the copy I picked up here:http://wolfpaulus.com/sys/arduino/avrdude.conf
5. I have an ICSP programming board made from a cheap Olimex board I bought from Sparkfun.com. I used a serial ICSP connection on COM2 to burn the bootloader found here:http://wolfpaulus.com/sys/arduino/AT328.hex
using this command-line command launched from within the WinAVR folder (where I'd put a copy of AT328.hex).
avrdude -F -pm328p -cponyser -Pcom2 -b56000 -u -v -Uflash:w:AT328.hex
that worked. I then did something I don't fully understand to the fuses:
avrdude -F -pm328p -b56000 -Pcom2 -cponyser -V -U lock:w:0xCF:m
I took the Atmega328 out and popped it into an Arduino NG board, set the IDE to Arduino Duemilenove w/ Atmega328, hit reset on the board (unnecessary on more modern boards) and successfully uploaded a sketch.
Twice the Flash means twice the awesomeness! There were things that had been impossible that now are quite possible.