[[!template id=project title="Test root device and root file system selection (350h)" contact=""" [tech-kern](mailto:tech-kern@NetBSD.org) """ mentors=""" [Christoph Badura](mailto:bad@NetBSD.org) """ category="kernel" difficulty="medium" duration="350h" description=""" NetBSD has an extensive test suite that tests native kernel and userland code. Mounting the root file system is one of the last steps the kernel does during boot before starting the first process (init(8)). Root file system selection is not covered by the current test suite. How to find the root file system is specfied in the kernel configuration file. E.g.: config netbsd root on ? type ? config netbsd root on sd0a type ? The first is a wildcard specification which causes the kernel to look for the root file system on the device that the kernel was booted from. The second form specifies the device and partition that contains the root file system. Other forms are also possible. The selection process is a complex interaction between various global variables that get initialized from the kernel configuration file and by machine specific code that processes the information passed by the bootloader about where the kernel was loaded from. This selection process is performed mostly by a function named `setroot` in the file `sys/kern/kern_subr.c`. The project could be completed in a number of steps: * Document the existing use cases and `config ...` syntax. * Document the processing steps and functions called by `setroot`. * Document how the various global variables interact. * Write unit tests using rumpservers for the ATF framework for the documented use cases. The project would initially be focussed on x86 (amd64 and i386). """ ]] [[!tag gsoc]] [[!tag gsoc350h]]