Program safe shutdown button on le potato?

I am trying to use a retroflag nespi case + with a le potato board running emuelec for retro gaming. This case has a functioning safe shutdown button and a reset button along with a LED to indicate power. Its marketed for raspberry pi 2/3 B/B+. Im trying to figure out how to utilize these options with my le potato. Can anyone help me? Thanks.

Please use search: How to add Power Button to AML-S905X-CC Le Potato

You can customize the overlay to turn any GPIO into a safe power down button. How to add a Power Button to Le Potato board - #16 by blamphos