README.hwconfig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. To enable this feature just define CONFIG_HWCONFIG in your board
  2. config file.
  3. This implements a simple hwconfig infrastructure: an
  4. interface for software knobs to control hardware.
  5. This a is very simple implementation, i.e. it is implemented
  6. via the `hwconfig' environment variable. Later we could write
  7. some "hwconfig <enable|disable|list>" commands, ncurses
  8. interface for Award BIOS-like interface, and frame-buffer
  9. interface for AMI GUI[1] BIOS-like interface with mouse
  10. support[2].
  11. Current implementation details/limitations:
  12. 1. Doesn't support options dependencies and mutual exclusion.
  13. We can implement this by integrating apt-get[3] into Das
  14. U-Boot. But I haven't bothered yet.
  15. 2. Since we don't implement a hwconfig command, i.e. we're working
  16. with the environment directly, there is no way to tell that
  17. toggling a particular option will need a reboot to take
  18. effect. So, for now it's advised to always reboot the
  19. target after modifying the hwconfig variable.
  20. 3. We support hwconfig options with arguments. For example,
  21. set hwconfig "dr_usb:mode=peripheral,phy_type=ulpi"
  22. This selects three hwconfig options:
  23. 1. dr_usb - enable Dual-Role USB controller;
  24. 2. dr_usb_mode:peripheral - USB in Function mode;
  25. 3. dr_usb_phy_type:ulpi - USB should work with ULPI PHYs.
  26. The purpose of this simple implementation is to refine the
  27. internal API and then we can continue improving the user
  28. experience by adding more mature interfaces, like a hwconfig
  29. command with bells and whistles. Or not adding, if we feel
  30. that the current interface fits people's needs.
  31. [1] http://en.wikipedia.org/wiki/American_Megatrends
  32. [2] Regarding ncurses and GUI with mouse support -- I'm just
  33. kidding.
  34. [3] The comment regarding apt-get is also a joke, meaning that
  35. dependency tracking could be non-trivial. For example, for
  36. enabling HW feature X we may need to disable Y, and turn Z
  37. into reduced mode (like RMII-only interface for ethernet,
  38. no MII).
  39. It's quite trivial to implement simple cases though.