This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: Embedded Linux: Recoverable, battery backed-up RAM (/tmp)

Part Number: AM3352

Tool/software: Linux

I have an embedded system with a battery backup for the RAM chip. The battery also allows time for the Linux to gracefully shutdown. After Linux shuts down, the /RESET signal is activated for the MCU and other ICs on the board.

The data I am writing to RAM goes in the /tmp folder. When Linux shuts down and then eventually boots up again, I lose access to the RAM.

In the graceful shutdown process, is it possible to save the mounting location (memory location) of the /tmp directory to non-volatile memory, so that when Linux boots up again it can remount at the same location in memory and allow me to access the preserved RAM accurately? If so, how can this be done?

Also, when the Linux kernal shutdown, does it clear the RAM or does it just unmount /tmp?

Thanks!

  • Hello and thank you for your post. This is a generic Linux question and beyond the scope of what we can support here on this forum. I believe what you want to do can be accomplished with a shutdown script, but you will have to research this and come up with an implementation.

    The Linux kernel doesn't do anything to RAM on shutdown, however you cannot count on it being preserved across a shutdown/reset.

    I hope this is helpful to you.