Uploading troubles to 1284p

@nick
I followed the steps here.. Arduino on ATmega1284P | maniacbug
and followed the ArduinoISP tutorial and burnt that in arduino dumilanove and connected SCK,MOSI,MISO,RESET pins and gave burn bootloader option in IDE with "Mighty 1284p 16Mhz using optiboot" selected as board. I dont know which file exactly though...