Galaxy Nexus Hardware Overview
Introduction
kernel hardware interfaces
Modem
- The modem is already working with libsamsung-ipc + samsung-ril with the following howto:
- checkout cyanogenmod ics-release
- Add theses 3 patches: [1] [2] [3]
- make libsamsung-ril
- adb root;adb remount; adb push the resulting library to the target
- rm/move the proprietary modem libraries
- setprop rild.libpath /system/lib/libsamsung-ril.so
- killall rild
- adb logcat -b main and adb logcat -b radio
Status(Under android with libsamsung-ipc and samsung-ril under android ICS):
- calls(with sound)
- SMS
- Data
- MMS should work
- USSD
Screen
The graphics subsystem of the omap is called OMAP DSS.
Activation
Here's how to activate the LCD output instead of the default HDMI.
echo "lcd" > /sys/devices/platform/omapdss/manager
Sound
Sound works out of the box if you use the right scenarios:
- boot in cyanogenmod, chroot into the SHR installation after mounting its /dev /proc /sys
while playing some music with the speakers do:
alsactl -f scenario store #under Android
And restore it in SHR:
alsactl -f scenario restore #under SHR
Wifi
The wifi driver is standard and compatible with cfg80211 kernel framework and so it's compatible with WEXT and nl80211 if you activate the right kernel options:
- Compile WEXT and remove CONFIG_ANDROID_PARANOID_NETWORK
root@tuna:~# ls /lib/firmware/ bcm4330.hcd bcmdhd.cal ducati-m3.bin fw_bcmdhd.bin fw_bcmdhd_apsta.bin fw_bcmdhd_p2p.bin hdcp.keys mms144_ts_rev31.fw mms144_ts_rev32.fw root@tuna:~# rfkill list 0: bcm4330 Bluetooth: bluetooth Soft blocked: yes Hard blocked: no 1: phy0: wlan Soft blocked: yes Hard blocked: no 2: brcmfmac-wifi: wlan Soft blocked: no Hard blocked: no root@tuna:~# rfkill unblock wlan root@tuna:~# rfkill list 0: bcm4330 Bluetooth: bluetooth Soft blocked: yes Hard blocked: no 1: phy0: wlan Soft blocked: no Hard blocked: no 2: brcmfmac-wifi: wlan Soft blocked: no Hard blocked: no root@tuna:~# ifconfig wlan0 up
GPS
see The replicant article on it
Camera
Has probably a free software camera library in android...but....uses a new interface(not v4l2) which is called TILER.... That is really problematic unless we find a way to use it in gstreamer...
See https://www.gitorious.org/gstreamer-omap for OMAP support in gstreamer.
Bluetooth
from init.tuna.rc:
# permissions for bluetooth. setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr" chown bluetooth bluetooth ro.bt.bdaddr_path chown bluetooth bluetooth /dev/ttyO1 chmod 0600 /dev/ttyO1 chmod 0660 /sys/class/rfkill/rfkill0/state chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
service hciattach /system/bin/brcm_patchram_plus --enable_hci --no2bytes --enable_lpm \ --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 \ --patchram /vendor/firmware/bcm4330.hcd /dev/ttyO1 class main user bluetooth group bluetooth net_bt_admin disabled oneshot
NOTE: The steps below are not needed any longer. The bug in the kernel was fixed with https://github.com/shr-distribution/linux/commit/1b57754aa578bc8617bed4f3926cf92219aa55f4
Tentative to make it work(fails)
root@tuna:~# rfkill unblock bluetooth root@tuna:~# opkg install brcm-patchram-plus Installing brcm-patchram-plus (4.1.1+gitr1+69371f6ecc82ed44e1292eae7d92313a5bfa68a8-r0) to root... Downloading http://192.168.7.1/shr/armv7a-vfp-neon/brcm-patchram-plus_4.1.1+gitr1+69371f6ecc82ed44e1292eae7d92313a5bfa68a8-r0_armv7a-vfp-neon.ipk. Configuring brcm-patchram-plus. root@tuna:~# brcm_patchram_plus --enable_hci --no2bytes --enable_lpm --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 --patchram /lib/firmware/bcm4330.hcd /dev/ttyO1 Done setting line discpline
mdbus2 -s org.bluez /org/bluez/1049/hci0 org.bluez.Adapter.CreateDevice "00:12:A1:69:41:77" ('/org/bluez/1049/hci0/dev_00_12_A1_69_41_77',) root@tuna:~# mdbus2 -s org.bluez /org/bluez/1049/hci0/dev_00_12_A1_69_41_77 [METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:xml) [METHOD] org.bluez.Device.GetProperties() -> (a{sv}:properties) [METHOD] org.bluez.Device.SetProperty(s:name, v:value) -> () [METHOD] org.bluez.Device.DiscoverServices(s:pattern) -> (a{us}:services) [METHOD] org.bluez.Device.CancelDiscovery() -> () [METHOD] org.bluez.Device.Disconnect() -> () [SIGNAL] org.bluez.Device.PropertyChanged(s:name, v:value) [SIGNAL] org.bluez.Device.DisconnectRequested() [METHOD] org.bluez.Input.Connect() -> () [METHOD] org.bluez.Input.Disconnect() -> () [METHOD] org.bluez.Input.GetProperties() -> (a{sv}:properties) [SIGNAL] org.bluez.Input.PropertyChanged(s:name, v:value) root@tuna:~# mdbus2 -s org.bluez /org/bluez/1049/hci0/dev_00_12_A1_69_41_77 org.bluez.Input.Connect [ERR]: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
Here's the bluetoothd log:
root@tuna:~# bluetoothd -n bluetoothd[1049]: Bluetooth daemon 4.101 bluetoothd[1049]: Starting SDP server bluetoothd[1049]: Listening for HCI events on hci0 bluetoothd[1049]: HCI dev 0 up bluetoothd[1049]: Parsing /etc/bluetooth/serial.conf failed: No such file or directory bluetoothd[1049]: Could not get the contents of DMI chassis type bluetoothd[1049]: Unable to load keys to adapter_ops: Function not implemented (38) bluetoothd[1049]: Adapter /org/bluez/1049/hci0 has been enabled bluetoothd[1049]: Discovery session 0x93690 with :1.31 activated bluetoothd[1049]: Discovery session 0x93690 with :1.33 activated bluetoothd[1049]: Discovery session 0x8e670 with :1.34 activated bluetoothd[1049]: Discovery session 0xb25b0 with :1.35 activated bluetoothd[1049]: Inquiry Failed with status 0x12 bluetoothd[1049]: Discovery session 0xb25b0 with :1.36 activated *** glibc detected *** bluetoothd: free(): invalid next size (fast): 0x0008e3f0 *** Aborted
how to make it work(success)
root@tuna:~# rfkill unblock bluetooth root@tuna:~# opkg install brcm-patchram-plus Installing brcm-patchram-plus (4.1.1+gitr1+69371f6ecc82ed44e1292eae7d92313a5bfa68a8-r0) to root... Downloading http://192.168.7.1/shr/armv7a-vfp-neon/brcm-patchram-plus_4.1.1+gitr1+69371f6ecc82ed44e1292eae7d92313a5bfa68a8-r0_armv7a-vfp-neon.ipk. Configuring brcm-patchram-plus. root@tuna:~# brcm_patchram_plus --enable_hci --no2bytes --enable_lpm --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 --patchram /lib/firmware/bcm4330.hcd /dev/ttyO1 Done setting line discpline
compile the hidd wrapper
root@tuna:~# ./hidd --connect "00:12:A1:69:41:77" =>it works
Graphics
The device is using a Imagination Technologies PowerVR SGX 540.
Drivers and userland libraries can be found here:
Openwebos graphics requirements:
- luna-sysmgr needs EGL/GLES/GLES2 for accelerated graphics
- qt4-palm needs to be compiled against EGL/egl.h
Android partitions
ls -al /dev/block/platform/omap/omap_hsmmc.0/by-name
lrwxrwxrwx root root 2012-08-27 21:25 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-08-27 21:25 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2012-08-27 21:25 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-08-27 21:25 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-08-27 21:25 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2012-08-27 21:25 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-08-27 21:25 param -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-08-27 21:25 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-08-27 21:25 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-08-27 21:25 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-08-27 21:25 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2012-08-27 21:25 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2012-08-27 21:25 xloader -> /dev/block/mmcblk0p1
Sensors
Ambient Light Sensors
Input Device: /dev/input/event4
Implementation Details (using evdev): https://github.com/CyanogenMod/android_device_samsung_tuna/blob/cm-10.1/libsensors/LightSensor.cpp