Is it possible to have a minimal source tree?


New Member

Reaction score: 1
Messages: 2

I'm currently working on a embedded project, and i'm trying to understand if it's possible to have a small /usr/src tree.
This source tree only has to contain the FreeBSD bootloader, kernel, kernel-modules, because the embedded application will replace /sbin/init.

So is is possible to have a small source tree with only these components while still being makeable?



Reaction score: 1,418
Messages: 1,243

The key is the make(1), i.e. "makefile"(s), their included files, and selected "target"(s).
That determines which parts of the src/ are needed.
There is no need to trim src/ while working with embedded/cross-building.



Reaction score: 682
Messages: 1,192

You could remove the other architectures in the tree, but what does it achieve?
As vigole wrote, it's all in the make. Make is only going to touch code it needs to build stuff specified in your conf file.