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