Posts: 23
Joined: Mon Nov 26, 2012 9:54 am

Kernel module loading

Thu Jul 31, 2014 3:13 pm


is there already some documentation how to load kernel modules based on the content of the ID EEPROM?

Best regards

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2669
Joined: Thu Jul 11, 2013 2:37 pm

Re: Kernel module loading

Thu Jul 31, 2014 3:36 pm

The entire process is WIP (and depends on quite a bit of software development) but the eventual process will be thus:

1. Videocore bootloader probes ID_SC and ID_SD pins at boot-time, before the ARM is booted, for an eeprom. Parses and loads the GPIO map and devicetree fragment.
2. Videocore adds device nodes specified in the DT fragment to the device tree that it builds internally.
3. Videocore fixes up several device nodes according to e.g. ram size and GPU memory split.
4. VC then passes the entire DT to the ARM, which it then allows to boot.
5. A DT-aware ARM kernel will parse all the devicetree nodes and, as necessary, load kernel modules compatible with those device nodes.

If everything works correctly, i.e. the DT blob points to valid hardware that the kernel has the right drivers for, there should be absolutely no need to manually probe drivers.

Getting to this point will be a bit of a slog as we have to move our existing kernel forward to the point where it can boot and understand DT, along with modification to the VC bootloader to add this EEPROM probe functionality. Tools to build the DT fragment from a text file also need making (the required patches to the devicetree compiler are not yet mainline).

For this reason, initial HATs can be shipped with a blank EEPROM and instructions on how to manually install drivers. There are methods available for adding i2c devices manually, for example.
Rockets are loud.

Return to “HATs and other add-ons”