Jump to content

HTC HD2 (htc-leo): Difference between revisions

From postmarketOS Wiki
Halamix2 (talk | contribs)
m not booting: fix table
m Add type
 
(31 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = HTC
| manufacturer = HTC
| name = HD 2
| name = HD 2
| codename = leo
| codename = htc-leo
| image = File:Htc-leo.jpg
| image = File:Htc-leo.jpg
| imagecaption = HTC HD2
| imagecaption = HTC HD2
| releaseyear = 2009
| releaseyear = 2009
| originalsoftware = Windows Mobile 6.5 Professional
| originalsoftware = Windows Mobile
| chipset = Qualcomm QSD8250 Snapdragon S1
| originalversion = 6.5 Professional
| chipset = Qualcomm Snapdragon S1 (QSD8250)
| cpu = 1.0 GHz Scorpion
| cpu = 1.0 GHz Scorpion
| gpu = Adreno 200
| gpu = Adreno 200
| display = 480x800
| display = 480x800
| storage = 512 MB
| storage = 512 MB / 1024 MB
| memory = 448 MB
| memory = 576 MB
| architecture = armhf
| architecture = armv7
| status_usbnet =  
| type = handset
| status_flashing =  
| status_usbnet = N
| status_touch =  
| status_flashing = Y
| status_screen =  
| status_touch = Y
| status_wifi =  
| status_screen = Y
| status_wifi = Y
| status_xwayland =  
| status_xwayland =  
| status_fde =  
| status_fde =  
| status_mainline =  
| status_mainline = P
| status_battery =
| status_battery = Y
| status_3d =  
| status_3d = N
| status_accel =  
| status_accel =  
| status_audio =  
| status_audio =  
Line 32: Line 34:
| status_sms =  
| status_sms =  
| status_calls =
| status_calls =
| status = kernel compiles. working on flashing
| status = kernel boots, display and touchscreen also works
| booting = no
| booting = yes
| non_android = 🔼
}}
}}


Line 40: Line 41:
* Langoor
* Langoor
* (others on IRC)
* (others on IRC)
* Dominduchami
* (others on the Matrix chat : Henri Dellal, knuxify and others)


== What works ==
== What works ==
* Nothing
* Kernel boots
* Display and touchscreen works
* Boots with xfce and mate (UI's that require 3D acceleration are not working)
* Wifi works correctly


== What does not work ==
== What does not work ==
* Everything
* Usb networking
 
* 3D acceleration
== Progress ==
* Everything else
* Got the kernel to compile, based on [https://github.com/maniacx/android_kernel_htc_qsd8k maniacx's nougat android kernel]
 
== Next steps ==
* Find a way to test the kernel on the device (black cLK?)


== Bootloaders ==
== Bootloaders ==
Because of the age of the HD2, there are serval 3rd party bootloaders available, most commonly used:
Because of the age of the HD2, there are serval 3rd party bootloaders available, most commonly used:
* Haret, Haret is a bootloader (provided as haret.exe) to boot linux or android from WITHIN windows mobile, you start windows mobile, not a great choice for postmarketOS.
* Haret, Haret is a bootloader (provided as haret.exe) to boot linux or android from WITHIN windows mobile, you start windows mobile, not a great choice for postmarketOS.
* a(MagLDR), Propitary 3rd party bootloader developed by Cotulla, some folks over at [https://androidforum.tytung.com Tytung's android forum], reverse egineered it and created aMagLdr, still propietary (?)
* a(MagLDR), proprietary 3rd party bootloader developed by Cotulla and DFT, some folks over at [https://androidforum.tytung.com Tytung's android forum], tried to reverse engineer it and created aMagLdr (1.13.04), unfortunately still proprietary
*[https://forum.xda-developers.com/showthread.php?t=1114053 cLK], based on littlekernel and download possible with cwm or twrp recovery embedded, seems to be the best option. Littlekernel also provides fastboot wich is handy.
*[https://forum.xda-developers.com/showthread.php?t=1114053 cLK], based on littlekernel and download possible with cwm or twrp recovery embedded, seems to be the best option. Littlekernel also provides fastboot wich is handy. Only this bootloader is tested right now.
* An open source port of EDK2 is available [https://github.com/HTC-Leo-Revival-Project/HtcLeoPkg here]
 
== Mainline Kernel ==
A close-to-mainline kernel port is available [https://github.com/HTC-Leo-Revival-Project/linux here]
with basic support for :
* screen via the EFI framebuffer
* interrupt controller
* timer
 
== Installation ==
* Install [https://forum.xda-developers.com/showthread.php?t=611433 HSPL]
* Install the [https://forum.xda-developers.com/showthread.php?t=901305 CLK bootloader]
MAGLDR would probably also work, but using CLK is easier because of fastboot access.
* Install the rootfs using an SD Card <code>pmbootstrap install --sdcard=/dev/sd?</code>
* Insert the SD Card
* Boot the device into the CLK bootloader
* Flash the kernel to the boot partition using <code>pmbootstrap flasher flash_kernel</code> (flashing to the additional partitions such as sboot or tboot should work too)
* Select the first option (or the other boot partion if it was chosen in the previous step) to boot the kernel.
Flashing the rootfs and the kernel to NAND would probably work on the T-mobile US version of HD2 (it has 1gb of storage space), but it is untested for now.
 
== Hardware ==
 
* USB: ci-hdrc-usb2
* Light sensor: Capella CM3602
* Wi-Fi: Broadcom BCM4329
* Magnetometer: Asahi Kasei AK8976A
* Battery charger: DS2746
 
== How the wlan support was done ==
* Find what wlan chip is being used : bcm4329 in this case
* Read [https://wiki.postmarketos.org/wiki/WiFi WiFi] page
* Check what package contains firmware for the chip, in this case it is "firmware-aosp-broadcom-wlan"
* Change the firmware path in the kernel config
* Add a nonfree_firmware section :
<syntaxhighlight lang="bash">
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-aosp-broadcom-wlan"
mkdir "$subpkgdir"
}
</syntaxhighlight>
* Update checksums, rebuild device and linux packages and boot the device
 
== See also ==
* {{MR|1666|pmaports}} Merge request
* {{Device package|htc-leo}}
* {{Kernel package|htc-leo}}

Latest revision as of 09:18, 12 September 2024

HTC HD 2
HTC HD2
HTC HD2
Manufacturer HTC
Name HD 2
Codename htc-leo
Released 2009
Type handset
Hardware
Chipset Qualcomm Snapdragon S1 (QSD8250)
CPU 1.0 GHz Scorpion
GPU Adreno 200
Display 480x800
Storage 512 MB / 1024 MB
Memory 576 MB
Architecture armv7
Software
Original software Windows Mobile
Original version 6.5 Professional
postmarketOS
Category testing
Pre-built images no
Mainline partial
Features
Flashing
Works
USB Networking
Broken
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

  • Langoor
  • (others on IRC)
  • Dominduchami
  • (others on the Matrix chat : Henri Dellal, knuxify and others)

What works

  • Kernel boots
  • Display and touchscreen works
  • Boots with xfce and mate (UI's that require 3D acceleration are not working)
  • Wifi works correctly

What does not work

  • Usb networking
  • 3D acceleration
  • Everything else

Bootloaders

Because of the age of the HD2, there are serval 3rd party bootloaders available, most commonly used:

  • Haret, Haret is a bootloader (provided as haret.exe) to boot linux or android from WITHIN windows mobile, you start windows mobile, not a great choice for postmarketOS.
  • a(MagLDR), proprietary 3rd party bootloader developed by Cotulla and DFT, some folks over at Tytung's android forum, tried to reverse engineer it and created aMagLdr (1.13.04), unfortunately still proprietary
  • cLK, based on littlekernel and download possible with cwm or twrp recovery embedded, seems to be the best option. Littlekernel also provides fastboot wich is handy. Only this bootloader is tested right now.
  • An open source port of EDK2 is available here

Mainline Kernel

A close-to-mainline kernel port is available here with basic support for :

  • screen via the EFI framebuffer
  • interrupt controller
  • timer

Installation

MAGLDR would probably also work, but using CLK is easier because of fastboot access.

  • Install the rootfs using an SD Card pmbootstrap install --sdcard=/dev/sd?
  • Insert the SD Card
  • Boot the device into the CLK bootloader
  • Flash the kernel to the boot partition using pmbootstrap flasher flash_kernel (flashing to the additional partitions such as sboot or tboot should work too)
  • Select the first option (or the other boot partion if it was chosen in the previous step) to boot the kernel.

Flashing the rootfs and the kernel to NAND would probably work on the T-mobile US version of HD2 (it has 1gb of storage space), but it is untested for now.

Hardware

  • USB: ci-hdrc-usb2
  • Light sensor: Capella CM3602
  • Wi-Fi: Broadcom BCM4329
  • Magnetometer: Asahi Kasei AK8976A
  • Battery charger: DS2746

How the wlan support was done

  • Find what wlan chip is being used : bcm4329 in this case
  • Read WiFi page
  • Check what package contains firmware for the chip, in this case it is "firmware-aosp-broadcom-wlan"
  • Change the firmware path in the kernel config
  • Add a nonfree_firmware section :
nonfree_firmware() {
	pkgdesc="Wifi firmware"
	depends="firmware-aosp-broadcom-wlan"
	mkdir "$subpkgdir"
}
  • Update checksums, rebuild device and linux packages and boot the device

See also