Did you know that a DS Linux port exists? The retail models have just 4MB of RAM.On the o3DS, n3DS, and n3DSXL, the SD card reader is on a separate PCB. Possible eMMC replacement?
As long as programs with more than 128/256MB are not run, the RAM situation should be fine. Did you know that Linux ran on the PS2 which the retail models had just 32MB of RAM?