NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Compiling minimal userland?



On Fri, 2 Sep 2016, William Z. wrote:
I'm currently trying to replace Linux with NetBSD in some of
my embedded devices.

I have read "The Guide" and found out how to create a crosscompiler and
compile a tiny custom kernel. However, I also want to create a very
minimal userland, but as far as I can tell "The Guide" only explains how
to compile the full NetBSD userland.

How can I disable unneeded parts of the userland?

How minimal are you looking for? One alternative is to use crunchgen in a similar way to the install images, plus the rest of the ramdisk parts of the build machinery you see in places like src/distrib/miniroot/list. These can be loaded as a kmod or embedded in a kernel with mdsetimage. Any further files/libs to add extra functionality could be loaded from disk directly or embedded in filesystem images to mount with vnd(4).

I've had lots of success building a system that knows how to find extra images from ftp/http/disk to give a functional device with wifi, X, Linux emulation, web-browser, client software (e.g. rdesktop, ssh, vncviewer). The whole thing comes to around 50MB.

--
Stephen



Home | Main Index | Thread Index | Old Index