atmega1284 programming from a 328 chip

Bit more googling and it seems to be due to resetting too soon. I found this regarding the error - OK it's related to programing the 328... but my guess it the same thing happening with the 1284P

Having investigated this a bit, it seems that the problem is because the Optiboot loader resets the ATMega328 when the serial port is opened. When avrdude is started up to program the slave chip it firsts opens the serial port then tries immediately to write to it. The initial comms fail because the chip has reset and, whilst in the bootloader, isn’t actually responding to the STK500 protocol.

Just need to find a way of resolving it