README.hwconfig 1.9 KB

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