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