To avoid data corruption on Raspberry Pi SD card, an appropriate shutdown signal is sent by Carberry microcontroller to Raspberry Pi to start shudown sequence, before power supply goes away, when ignition signal turns off.
Pin 13 of Raspberry Pi P1 header, stay at 3V3 level during ignition poweron, and goes low to inform Raspberry Pi that is time to shutdown.
An appropriate daemon on Linux has to do the rest.