Enabling swap in embedded systems

If your embedded system running Linux does not have enough memory, you can enable swap to get more memory.

However if your platform does not have MMU (Memory Management Unit) as is the case for Sigma Designs EM8620 series, it won’t support swap, so forget it.

If your platform does have MMU, as is the case for many newer platforms such as Sigma Designs SMP8630, SMP8640 and SMP8650 series, you can enable swap support.

First you’ll have to make sure swap support is enabled in your kernel:


and swapon/swapoff is enabled in busybox.

So for example if you have an IDE harddisk with the second partition configured as swap. (Use fdisk to create a partition and mkswap /dev/hda2 to initialize the partition), you can enable the swap as follows:


If you get out-of-memory killer kernel error, you can change the “swapiness” to avoid oom-killer to kick in.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products