Hi! We're discussing a clarification of the content license; please look over to Current events if you're interested in editing.

Dream

From Htc-linux

Jump to: navigation, search

Contents

[edit] Introduction

The HTC Dream comes with android installed,you need to "root" it in order to be able to do what you want such as software modifications.

Here are some newer links that point to external resources that explain how to get "root":

XDA developers forum: [1] Android and me: [2]

TODO: If the links are outdated please go ahead and update them.


Source(s): Android solutions

[edit] Research

[edit] Kernel

Kernel#Kernel_for_QCT_MSM7xxxA_based_devices

Note GNU conform . this is a special branch of the google kernel for use with normal (non-android) linux userspace.

With bootloader HBOOT-0.95.3000, the kernel size should be smaller than 2MB to boot from flash.

[edit] Builds

Check DreamBuilds for ready to use builds along with detailed instructions on how to use them


[edit] Android

Android comes with many prorietary components :

  • akmd -> compass/accelerometers [1]
  • libgps.so -> gps
  • libhtc_ril.so -> telephony [2]
  • libhgl.so -> 3D opengl ES driver
  • libacoustic -> audio driver
  • ... and more

But also some non free applications such as the market and others

[edit] Standard GNU/Linux

[edit] Core Status

The status is currently compiled against FSO userspace and msm-gnuconform kernel branch at git://gitorious.org/htc-msm-2-6-32/leviathan-incoming.git

Component Working? Notes Info on how to get it working TODO
screen(framebuffer) Kdrive and xorg work fine with kernel patches:
  • rotation is only static in xorg(you need to restart xorg for rotating)
  • evdev is now used for input which permit to rotate statically xrg without crash

Notes about xf86-video-msm: http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/xorg-driver/xf86-video-msm_git.bb The hardware accelerated blitting in this driver depends on dri2 which depends on a kernel drm driver named MSM_KGSL_DRM which depends on MSM_KGSL,which depend on QSD8x50 or MSM7x27,so better improve xf86-video-fbdev

  • implement FBIOBLANK cleanly
  • implement xrandr -o 1 in xf86-video-fbdev
touchscreen yes
  • using evdev
trackball yes a bit slow, if used directly as mouse device (any way to tweak sensitivity?) otherwise fine as indicator for scrolling through lists etc.
sound working ok in alsa, but without decoding offload,

some apps can have audio issue but mplayer(intone) and aplay(fso) works fine

  • set the alsa_send_buffer function real time(use code from qdsp5)
  • use -ao sdl to get rid of buffer underflow in mplayer (rest of the app can still have buffer underruns)
  • fix the remaining routing bugs
  • fix a bug where audmgr_rpc (kernel thread) keep beeing spawned(each time you open the audio) because it blocks before exiting (msm_rpc_read in audmgr_rpc_thread in audmgr.c)
  • clean the driver using Mark Brown's comment in the alsa-devel mailing list
  • make the driver a real SOC driver( for now it's only an abuse of the API)
  • add mmap( look at sound/soc/msm7kv2 ) support for dmix for having multiple stream at the same time(usefull for ringing while playing music)
  • understand why -ao sdl works fine with mplayer,and convert the other apps to that.
  • add in-call volume control, look at AudioHardware android library sources
Modem/GSM fairly complete w/ FSO2
  • Handle phone calls volume if possible
wifi use wireless-compat for old kernels(included in recent kernels)

You MUST include debugfs in the rernel (kernel so braindead, it oopses without) Then read the bob copeland howto for the firmware and the calibration, then use that:

modprobe wl1251_sdio
modprobe msm_wifi #if it doesn't request the firmware try a second time(rmmod msm_wifi && sleep sometime and modprobe msm_wifi)
echo 1 > /sys/class/rfkill/rfkill1/state

If you want PSM you need this patch on top of compat-wireless (compat-wireless-2010-04-25.tar.bz2 worked fine for me) you could configure the kenrel for enabling psm by default in cfg80211 ( enable powersave by default (CFG80211_DEFAULT_PS) ) or:

iwconfig wlan0 power on

or:

iw dev wlan0 power_save on

iw should be compiled against libnl2 and should have the following fix:

diff --git a/Makefile b/Makefile
index e21900a..57b6ac1 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefil
 
 iw:    $(OBJS)
        @$(NQ) ' CC  ' iw
-       $(Q)$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o iw
+       $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o iw
 
 check:
        $(Q)$(MAKE) all CC="REAL_CC=$(CC) CHECK=\"sparse -Wall\" cgcc"
  • commit newer sdio and irq implementation
  • Fix sdio which would fix PSM (after a while or a short time you have no more network while still beeing associated) or keep waiting/trying new compat wireless with pandora patches on top
Power management CPUfreq (dynamically scaling frequency due to workload) perfect
  • Real Suspend/Resume (freezing tasks and halting main CPU) is now working
  • initial wokring implementation of userland suspend handling is present in fsousaged
  • fix error messages with PSM in the SDIO driver
It needs this kernel http://gitorious.org/htc-msm-2-6-32/leviathan-incoming/commit/636fa4daf243826ef6cebb64dd0509f3b079fcb5 the following commits break suspend.

Also select CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL when configuring the kernel And suspend like that: standby:

echo mem > /sys/power/state

finally resuming:

echo on > /sys/power/state

Note that it requires no wakelocks active for really suspending

GPS NMEA on /dev/smd27
  • phh got it working using me as a tester:
  • rebase phh's lib in the standalone activator for more redeable source code
keyboard yes
  • basic keys works
  • extended keys needs: that
  • need to finish every keyboard combinaison mapping(de and it done)
usbnet yes available on usb0 on the host computer and target device you just need to select the msm controller in usb gadget,and of course use usbnet,should also now work as module
Accelerated GL no OEM's Provide libhgl.so Needs to be reverse engineered on a per device basis, most chips are currently qualcomm. Means no accelerated media (H264 etc.)
camera we have a driver but it makes some oops
  • debug the oops
vibrator works fine use something like this to make it vibrate:
echo 2000 > /sys/class/timed_output/vibrator/enable 

needs CONFIG_ANDROID_TIMED_GPIO

compas
lcd backlight was working as led but there were some issues with FSO,so it is now converted from a led driver to a real backlight one
Accelerometers Unknown
Bluetooth connected trough serial,required firmware
#copy the firmware to /etc/firmware
echo 1 > /sys/class/rfkill/rfkill0/state
hciattach     -n -s 115200 /dev/ttyHS0 texasalt 115200 flow
echo 1 > /sys/class/rfkill/rfkill1/state #if rfkill1 is still bluetooth class and not wifi(for instance if msm_wifi is not loaded)
hciconfig hci0 up

For enabling it

[edit] Userspace

[edit] GUI

  • in /usr/share/themes/shr-theme-gtk-e17lookalike/gtk-2.0/gtkrc change:
gtk-font-name = "Sans 5"

into:

gtk-font-name = "Sans 10"
  • in /usr/share/applications/vala-terminal.desktop change:
Exec=vala-terminal

into:

Exec=vala-terminal -fs 10
  • in SHR image remove /etc/X11/Xinit.d/89xTs_Calibrate_xinput_calibrator which blocks xorg startup (calibrate with ts_calibrate)

[edit] Wifi

Add that :

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:df:*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"       

into /etc/udev/rules.d/70-persistent-net.rules,in order to prevent the interface renaming at each boot,I was told that the interface renaming was because the wifi chip does not store the mac address.

[edit] FSO

TODO:

  • modify fsodeficed's config for using the kernel 2.6 firmware loader for wifi

[edit] Sound

change

ao=oss,

to:

ao=alsa,

in /usr/etc/mplayer/mplayer.conf

(optionally change mad to ffmp3 which is faster)

[edit] devtmpfs

do:

rm /etc/init.d/device

to get sound,modem etc...working

[edit] Misc userspace

  • Do something for permitting a continuous music playback with intone and prevent the phone to sleep:
Apr 25 12:56:42 <mickeyl>       no wakelock
Apr 25 12:56:47 <mickeyl>       but rather requesting the FSO CPU resource

=> use fsoraw