Hope I find you all well, I need your help on a small part of a personal project that am working on. So I made an Arduino based custom circuit board that it has on board GSM, GPS, Relays, Sensors and am receiving them on the phone on a custom application that I wrote. I can monitor the sensors, I can control the switches etc... So an idea that I had is to update the Arduino's firmware OTA (over the air) with the GSM. I setup a server at home (raspberry pi) nothing fancy that I can push to the binary file then go into the browser UI declare the new version upload the file and POST it and the Arduino see the new version and is downloading it into the EEPROM (by the way is an ATmega2560) and the updates may be for optimization, add new features
So my need for help is that in writing a bootloader I have no idea how. I need someone to guide me or help me to create a custom bootloader for the ATmega2560, so before jumping into the main sketch to check if there is a new update available saved to install it. and then continue with the new one.
If further discussion is needed please let me know so i can explain more.