A while ago I stumbled accross a thread in the MMDVM Yahoo group about the firmware upgrade on DVmega PCBs . The interesting note was that Tom ON4TOP managed to upgrade the firmware without the need for a programming adapter. This is especially of interest for all those who have a dualband DVmega because the ATmega CPU in this case is a SMD one. For the single band radio there is an easier solution: Just pull out the ATmega 328P DIL processor and reprogram it with an Arduino Uno. So I tried the direct programming of the controller for my dualband radio DVmega.
The only problem to manage is to pull the reset pin of the ATmega 328P to ground at the right time. Otherwise the bootloader will go straight on and start the firmware. Luckily there is an easy solution:
Let one GPIO pin of the Raspberry Pi control the reset pin of the ATmega CPU. There is some hack on the internet for avrdude  to manage this. With this autoreset script there is no need to manually ground the reset pin anymore. You just have to hook up some wire from the reset pin to one of the Raspberry Pi GPIOs.
Click the image for a larger view.
I used the GPIO4 / Pin7 of the Raspberry Pi and connected it to the capacitor sitting right in the corner of the PCB. After hooking up the wire it is just a matter of installing the modified startup script for avrdude:
$ git clone https://github.com/openenergymonitor/avrdude-rpi.git
$ cd avrdude-rpi
$ sudo ./install
It is advisable that you run an apt-get update before. In my case the install script failed because it tried to download some old files ending with a 404 error.
After everything is installed you can download the new firmware and programm it to the ATmega CPU: