i fixed it by following this:
https://www.arduino.cc/en/Tutorial/ArduinoISP
the procedure i used was:
upload ardrinoISP sketch to a spare Ardrino uno.
remove all connections and omega2+ from the ardino dock2.
connected the uno to the dock2 icsp port as shown in the 1st link.
set ardrino IDE to board "Ardrino/Genuino Uno"
set ardrino IDE programmer to "Ardino as ISP"
set port to /dev/tty/ACMO
selected "burn bootloader"
disconnected the uno.
reinstalled the omega2+
now the dock2 is programmable via the omega2+ using
set ardrino IDE to board "Ardrino/Genuino Uno"
and
Programmer "AVRISP mII"
via the network port
root@Omega-:~# avrdude -C /usr/share/arduino-dock/avrdude.conf -p atmega328p -c linuxgpio -P gpio -n -v
reports consistently:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)
avrdude done. Thank you.