Detecting state of GPIO pins during boot up

Hi folks
I hope that I am posting to the correct group… apologies if this is the wrong place.

We are creating a system based on the beagleboard black. We would like to implement a “Factory Reset”. i.e. if I hold down a switch for a long period of time, say around 10 seconds, then we want to completely reset the system.
Essentially the Reset pin is tied to one of the GPIO pins. So the GPIO follows the Reset pin.
We would like to detect if the GPIO pin is still low about 10 seconds after the Reset has been asserted.

The issue is that this is the time when the system is still booting up. I am not sure how one could check on the status of the pin during the boot up.
Any ideas?
Thanks a lot

create a systemd service that will launch a bash code that check the gpio . If the gpio is is at value 1, switch a led on to tell the user to remove his finger. After detecting the factory reset, do what you want in your system…

Hi Micka
Thanks a lot for the suggestion…
I am going to try it out and report back.
Many thanks