0

I know device tree used to map the actual hardware information with the device, but for the drivers can't we do it through the driver itself, if that is possible then what is the need of device tree.

And what will happen for loadable modules, which runs at runtime, for that also mapping is present in device tree? if not then how mapping will happen for that.

I gone through the links for ldd and googled(in stackoverflow also tried to search) about the device tree mapping but can't able to find answer so as last option I am posting it here for clear explanation.

  • The /dev subtree exists only in memory; it is populated and managed by udev or some similar component. All it does is provide names for devices so that the various system components can refer to them in a commonly understood form. I don't understand what it is that you are asking; any operating system needs to have some sort of method to name devices. Linux uses the /dev subree for this; Windows uses the \\?\ subtree etc. – AlexP Jun 20 '17 at 13:25
  • @AlexP I'm assuming the OP is talking about Device tree, not the /dev directory. – Johan Myréen Jun 20 '17 at 13:59
1

The raison d'etre of the device tree is to tell what devices are on the system. It is typically needed on platforms that don't provide any automatic detection of devices, i.e. there is no registry of ids you can query (like for USB and PCI devices) and you can't reliably probe for the hardware. The device tree tells which drivers (kernel modules) should be loaded to serve the devices, not the other way around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.