I added the -F switch:
root@Omega-:~# avrdude -C /usr/share/arduino-dock/avrdude.conf -p atmega328p -c
linuxgpio -P gpio -v -F -U signature:w:0x1E,0x95,0x0F:m
avrdude: Version 6.1, compiled on Mar 27 2018 at 01:00:08
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/usr/share/arduino-dock/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : gpio
Using Programmer : linuxgpio
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : linuxgpio
Description : Use the Linux sysfs interface to bitbang GPIO lines
Pin assignment : /sys/class/gpio/gpio{n}
RESET = ~19
SCK = 15
MOSI = 16
MISO = 17
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xff6323
avrdude: Expected signature for ATmega328P is 1E 95 0F
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: reading input file "0x1E,0x95,0x0F"
avrdude: writing signature (3 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 3 bytes of signature written
avrdude: verifying signature memory against 0x1E,0x95,0x0F:
avrdude: load data signature data from input file 0x1E,0x95,0x0F:
avrdude: input file 0x1E contains 3 bytes
avrdude: reading on-chip signature data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 3 bytes of signature verified
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.
BUT, it didn't change anything:
root@Omega-:~# avrdude -C /usr/share/arduino-dock/avrdude.conf -p atmega328p -c
linuxgpio -P gpio -v
(output muted for brevity)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xe01cff
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude done. Thank you.
Seems like i need to burn a new boot loader, by using a 2nd ardrino as an "Ardino as ISP" programmer.
https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader.
The correct bootloader code is required for the atmega328p to accept programming from the serial port.
I wonder if the omega has access to the ICSP port. If not, i have a spare uno i could use as a programmer, but i am unsure which IDE settings to use, as the example in the link is for uno to uno.