I have an open source datalogger I designed for physics labs. It has the stock ATMEGA1284P optiboot bootloader installed with a firmware that displays and logs data from a number of sensors. I wonder, what if some curious students start uploading Arduino code to it. I'd like them to explore but knowing only a little is dangerous. They could fry the device before they learn how to hack it. So I wanted to have some control over who gets to upload sketches (teachers and maybe some advanced students).
I thought about a physical jumper (say reset pin) to enable/disable uploading sketches. I thought that was silly. Any monkey with fine motor skills can defeat that :D.
What about a modified bootloader, so the bootloader will look into the EEPROM for enable/disable bootloading? I've never messed with bootloader code before (only changed PID and VID in leo's bootloader).
Do you think it is feasible to fit a conditional statement with EEPROM read function in optiboot? Maybe reset that EEPROM content to disable after bootloading?
FYI, the 1284P has a 1024KB bootloader size so there is enough space for that.