atmega1284p/pu

You are not able to copy the Entire 1284P section, add it to the bottom of the file, and change these few lines?
If this doesn't work, then perhaps my approach is incorrect.

#------------------------------------------------------------
# ATmega1284P                          <<<  ATmega1284
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m1284p";                 <<<<  "m1284";  
    desc             = "ATMEGA1284P";    <<<<"ATMEGA1284";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x97 0x05;    <<<<  0x1e 0x97 0x06;
:
:
// and copy the rest down to the start of the next section ...