Removing kernel toolchain?

Hey, how's it going? I'm trying to compile 9.2 for using it on an embedded system. It came to my attention that one of the commands is make kernel-toolchain, which compiles the tools needed to compile the kernel. Now, my question is what happens with the toolchain once I'm done compiling the kernel and world? Which files does that command create, and how can I remove them safely afterwards? I tried make clean, but I'm not sure if it worked.

Thanks a lot!
 
Phillipe said:
Now, my question is what happens with the toolchain once I'm done compiling the kernel and world?
According to the embedded handbook basically the same as when you issue # make buildworld; it ends up in $MAKEOBJDIRPREFIX which I imagine is normally /usr/obj.

This is also where the world gets copied to after building so that when you compile your kernel it'll use the new compiler which is now located here.

Phillipe said:
Which files does that command create, and how can I remove them safely afterwards? I tried make clean, but I'm not sure if it worked.
# make clean usually only cleans up the source tree, not the rest. So my assumption is that the cleaning would have to be done manually. Or not at all since it's common to leave /usr/obj in place after having installed the world for example (though I agree those situations aren't quite comparable).
 
ShelLuser said:
According to the embedded handbook basically the same as when you issue # make buildworld; it ends up in $MAKEOBJDIRPREFIX which I imagine is normally /usr/obj.

This is also where the world gets copied to after building so that when you compile your kernel it'll use the new compiler which is now located here.


# make clean usually only cleans up the source tree, not the rest. So my assumption is that the cleaning would have to be done manually. Or not at all since it's common to leave /usr/obj in place after having installed the world for example (though I agree those situations aren't quite comparable).

So, does that mean that if I were to remove all of the contents in /usr/obj, the toolchain would be gone as well?
 
Phillipe said:
So, does that mean that if I were to remove all of the contents in /usr/obj, the toolchain would be gone as well?

Yes, all files created during buildworld/buildkernel are put under /usr/obj, this is to allow a read-only /usr/src shared across multiple machines with for example NFS.
 
If you're looking for ways to remove components from the base to keep the size small, look into src.conf(5). You can disable quite a lot. But be mindful, some components are needed.
 
Back
Top