in reply to custom linux for embedded system with Perl
Have a look at slax. It has scripts that make the build easier, and includes modules for many things. It is based on Slackware. That is my favorite linux for most things, but it is not quite the same as the rest.
http://www.slax.org/