12.07.2015 Views

1lfCtJ9

1lfCtJ9

1lfCtJ9

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

152The kernel device configuration language and tools were originally designed for amonolithic build. In a monolithic build one configuration is written for the entiresystem. This configuration is translated into a set of C language constructs by atool called config, and the result is compiled into a kernel. Compiling the deviceinformation statically into the kernel is not a suitable approach for kernel modules(which we discussed in Section 3.8.1), since it is not possible to know at kernelcompile time which modules may be loaded at runtime.Since the config tool lacked support for specifying the attachment relationships ofindividual drivers, kernel modules typically included hand-edited tables for the specifications.Not only was creating them taxing work, but handcoding the relationshipsin C lacked the sanity checks performed by the config utility. Furthermore, debuggingany potential errors was very cumbersome. While in the regular kernel mostdrivers could be compiled in at kernel build time, a rump kernel has no built-indrivers and therefore all drivers required the above style handcoding.To address the issue, we added two new keywords to the config DSL. We will firstdescribe them and then proceed to present examples.• The ioconf keyword instructs config to generate a runtime loadable deviceconfiguration description. The created tables are loaded by the driver initroutine and subsequently the autoconfiguration subsystem is invoked to probehardware.• The pseudo-root keyword specifies a local root for the configuration file.By default, config will refuse a device configuration where a device attemptsto attach to an unknown parent. The pseudo-root keyword can be usedto specify a parent which is assumed to be present. If the parent is notpresent at runtime, the driver will not attach. Without going into too muchdetail, pseudo-roots are usually given in the most generic form possible, e.g.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!