Best way to disable swap in yocto


In orangepi boards with H3 CPU and 512mb ram I get the microsd corrupted after a while, probably due to heavy usage of swap.
I’m looking for the best way to disable swap in yocto, but I can’t find much…
Any help?


Hi there, how long roughly is it taking for you sd card to become corrupted? Eventually I’d expect sd cards to wear out, but if it is happening abnormally fast then it makes sense to look into why. Could you also provide some information on the make and model of your sd card? Finally, is there any reason in particular that makes you think that swap is the culprit behind this? All information is potentially useful here so I just want to make sure I have as much of it as possible! Thanks

It got corrupted in a fare days, nothing else is using the sd card, the sd card is a goodram 16gb class 10. I have hundreds of devices (not orangepi) running h24 with this same sd model and never had any issue… I thought at swap as I couldn’t think of anything else

@Federicod what balenaOS version do you use on your device?

as a curiosity what class 10 SD cards are you using?

At balena we don’t use swap on disk. Are you configuring your device to swap to disk (which may be ok)?

Hello @Federicod feel free to answer my previous questions!