Community Added Features on LO kernel
From OMAPpedia
Contents |
USB Keyboard and Mouse
The kernel currently has g_zero support. The devices keyboard and mouse have been added based on that. The config changes to enable these are.
Configuration changes
Modify the Zoom2 Defconfig (kernel_omap3/arch/arm/configs/omap_zoom2_defconfig) for the below.
# # Userland interfaces # # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y
# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y CONFIG_KEYBOARD_TWL4030=y
# CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_INPUT_UINPUT=y CONFIG_INPUT_GPIO=y CONFIG_INPUT_KEYCHORD=y
The changes will soon be pushed upstream.
How to install the devices
The devices work over the USB OTG. To setup USB OTG, refer to Support Tools page
Building the USB gadget
Once the kernel has been built with the above modified Zoom2 defconfig, build the modules which will generate the g_zero.ko file. To build the modules
# make CROSS_COMPILE=arm-none-linux-gnueabi- modules The g_zero.ko file will be at kernel/drivers/usb/gadget
Installing the devices
Copy g_zero.ko to the SD card or another accessible location.
Once the file system has loaded, install the gadget module.
# insmod g_zero.ko
This will install the gadget module and the USB devices would be detected. Some example logs are shown below.
The devices are plug and play and you can add or remove devices.
To list the devices,
# lsusb
HDMI
HDMI has been enabled on the LO kernel using the patches from Android kernel. The instructions are provided here for anyone to take the changes to enable HDMI on another kernel.
Code to enable HDMI
Below are the patches and pull them in order 10965, 10760, 10761, 10762
https://review.source.android.com/#change,10762 https://review.source.android.com/#change,10761 https://review.source.android.com/#change,10760 https://review.source.android.com/#change,10965
With the above changes, HDMI is enabled on the kernel.
How to test HDMI
Check the devices (HDMI may be on display1 or 2 depending on whether you have DVI and which one it was assigned to)
lcd=/sys/devices/platform/omapdss/display0 hdmi=/sys/devices/platform/omapdss/display1
To enable HDMI
echo "0" > $lcd/enabled echo "1" > $hdmi/enabled
To switch back to LCD from HDMI
echo "1" > $lcd/enabled echo "0" > $hdmi/enabled
Known Limitations
- The HDMI works with certain TVs while others don't detect the input because of some clock issues
- HDMI has been tested on Angstrom. A video clip that has audio can be played on TV. But the image is not full screen. This probably has to be enabled at user space from Angstrom.