Jump to content

Fairphone 2 (fairphone-fp2): Difference between revisions

From postmarketOS Wiki
CmdrWgls (talk | contribs)
No edit summary
m Installation: source -> syntaxhighlight
 
(45 intermediate revisions by 17 users not shown)
Line 1: Line 1:
[[Category:Unsupported Devices]]
{{Infobox device
| manufacturer = Fairphone
| name = 2
| codename = fairphone-fp2
| image = File:Fairphone 2.jpg
| imagecaption = Fairphone 2
| releaseyear = 2015
| category = testing
| originalsoftware = Android
| originalversion = 5.1
| chipset = Qualcomm Snapdragon 801 (MSM8974AB-AB)
| cpu = 4x 2.26 GHz Krait 400
| gpu = Adreno 330
| display = 1080x1920 IPS
| storage = 32 GB
| memory = 2 GB
| architecture = armv7
| type = handset
<!-- Features -->
| status_usbnet = Y
| status_flashing = Y
| status_touch = Y
| status_screen = Y
| status_wifi = Y
| status_xwayland = Y
| status_fde = Y
| status_mainline = Y
| status_battery = N
| status_3d = Y
| status_audio = N
| status_bluetooth = Y
| status_camera = P
| status_gps = P
| status_mobiledata = Y
| status_sms = Y
| status_calls = P
| status_otg = Y
| status_nfc = -
<!-- Sensors -->
| status_accel = N
| status_magnet = N
| status_light = N
| status_proximity = N
| status_hall = -
| status_barometer = -
| status_powersensor = -
<!-- Misc -->
| status_cameraflash = N
| status_keyboard = -
| status_touchpad = -
| status_usba = N
| status_hdmidp = -
| status_irtx = -
| status_irrx = -
| status_stylus = -
| status_haptics = Y
| status_ethernet = -
| status_fossbootloader = Y
 
| booting = yes
}}
 
{{Note|This wiki page is made for <code>mainline</code> kernel. The <code>downstream</code> kernel in the <code>pmbootstrap init</code> selection is not covered here, see the [[Fairphone_2_(fairphone-fp2)/Downstream_kernel|dedicated wiki page for downstream]].}}
 
== Contributors ==
== Contributors ==
* Luca Weiss (z3ntu)
== Device owners ==
{{Device owners}}
== How to enter flash mode ==
Hold {{button|Volume Down}} while booting the device. The notification LED will blink blue when in fastboot mode.
== Installation ==
{{Note|If you have a very old bootloader installed, installation might fail. Flash any recent stock software onto the device first if you experience any such problem.}}
For installation you need to flash [[lk2nd]] and flash the rootfs. Do not flash the <code>boot</code> partition since lk2nd uses [https://github.com/msm8916-mainline/lk2nd/issues/113 fs-boot] functionality to boot the kernel from the <code>/boot</code> partition of the rootfs.
<syntaxhighlight lang="shell-session">
$ pmbootstrap flasher flash_lk2nd
$ pmbootstrap flasher flash_rootfs --partition userdata
</syntaxhighlight>


* z3ntu
Phosh and Plasma Mobile UIs have been shown to work.


== What works ==
== Device status ==


* The building process
While the infobox gives a general overview, there's some important extra notes here.


=== Current Boot Process ===
=== Stability ===


This is what I did:<br />
In general msm8974 devices on mainline kernel aren't particularly stable. You may find random reboots which can lead to data loss. IOMMU is not yet supported so there's no memory protection for components like GPU. No CPU frequency scaling is supported so your device might run hot. No fuel gauge (for battery percentage reporting) is supported so you won't see if your battery runs below 0% and won't turn off, which might damage your battery.
Use the efidroid lk.img (have to compile yourself right now) for working around an fastboot/lk issue in the stock Fairphone bootloader.


<pre>fastboot boot lk.img
=== Display module (panel/touchscreen) ===
fastboot flash system pmOS_system.img</pre>
Booting the boot.img doesn't work currently because of dt problems. Probably a similar issue as on the [https://github.com/postmarketOS/pmbootstrap/wiki/Mozilla-Flame#current-boot-process Mozilla Flame].


pmOS branch: https://github.com/postmarketOS/pmbootstrap/tree/device-fairphone-fp2<br />
The kernel should support both the old and new display modules. You can identify the display module on your device based on [https://forum.fairphone.com/t/how-to-recognize-the-new-fp2-display-module/35519/13 this forum post]. However if you have the old display module, the touchscreen might not work due to issues with power sequencing (turning screen off turns touchscreen off, however turning screen on doesn't reinitialize the touchscreen).
z3ntu's branch (maybe more up-to-date): https://github.com/z3ntu/pmbootstrap


== Abbreviations ==
Lk2nd should automatically detect which display panel is installed and adjust the Linux dtb accordingly.


'''lk''' = Little Kernel (that's what the bootloader which includes fastboot is based on for most newer devices)
== Links ==


'''dt''' = Device Tree (method of describing hardware, see https://www.devicetree.org/)
* [[Fairphone_2_(fairphone-fp2)/Downstream_kernel|postmarketOS wiki page for downstream kernel only]]
* [https://github.com/LineageOS/android_kernel_fairphone_msm8974/ LineageOS kernel source]
* [https://github.com/FairphoneMirrors/android_kernel_lk_fairphone_fp2 Bootloader/lk source]
* [https://forum.fairphone.com/t/postmarketos-ten-years-support/32279/10 Fairphone Forum thread]

Latest revision as of 21:57, 4 September 2024

Fairphone 2
Fairphone 2
Fairphone 2
Manufacturer Fairphone
Name 2
Codename fairphone-fp2
Released 2015
Type handset
Hardware
Chipset Qualcomm Snapdragon 801 (MSM8974AB-AB)
CPU 4x 2.26 GHz Krait 400
GPU Adreno 330
Display 1080x1920 IPS
Storage 32 GB
Memory 2 GB
Architecture armv7
Software
Original software Android
Original version 5.1
FOSS bootloader yes
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Broken
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Partial
Camera Flash
Broken
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Partial
Modem
Calls
Partial
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Works
USB-A
Broken
USB OTG
Works
Sensors
Accelerometer
Broken
Magnetometer
Broken
Ambient Light
Broken
Proximity
Broken
Haptics
Works


Note This wiki page is made for mainline kernel. The downstream kernel in the pmbootstrap init selection is not covered here, see the dedicated wiki page for downstream.

Contributors

  • Luca Weiss (z3ntu)

Device owners

  • DancesWithCycles (Notes: orange coat: tbd)
  • DancesWithCycles (Notes: white coat: tbd)
  • Jrfern (Notes: Panel otm1902b, original cameras)
  • Kbingham (Notes: Camera Set A)
  • Kbingham (Notes: Camera Set B)
  • Roboe (Notes: (borrowed) physically broken radio or modem, I don't recall right now)
  • Roboe (Notes: mostly unused after 7 years daily driving; first revision display module, a spare upgraded one available; running Lineage OS)
  • Rudloff
  • TPJS (Notes: stock, unknown screen type)
  • UltrasonicMadness (Notes: Runs Ubuntu Touch 16.04, has occasional problems with screen flickering and unreliable touch screen)
  • Unrznbl (Notes: 2022-09-21 old hardware panel so not supported in mainline and no touchscreen, though display works)
  • Vladuwka12 (Notes: Running Ubuntu Touch 16.04)
  • Z3ntu


How to enter flash mode

Hold Volume Down while booting the device. The notification LED will blink blue when in fastboot mode.

Installation

Note If you have a very old bootloader installed, installation might fail. Flash any recent stock software onto the device first if you experience any such problem.

For installation you need to flash lk2nd and flash the rootfs. Do not flash the boot partition since lk2nd uses fs-boot functionality to boot the kernel from the /boot partition of the rootfs.

$ pmbootstrap flasher flash_lk2nd
$ pmbootstrap flasher flash_rootfs --partition userdata

Phosh and Plasma Mobile UIs have been shown to work.

Device status

While the infobox gives a general overview, there's some important extra notes here.

Stability

In general msm8974 devices on mainline kernel aren't particularly stable. You may find random reboots which can lead to data loss. IOMMU is not yet supported so there's no memory protection for components like GPU. No CPU frequency scaling is supported so your device might run hot. No fuel gauge (for battery percentage reporting) is supported so you won't see if your battery runs below 0% and won't turn off, which might damage your battery.

Display module (panel/touchscreen)

The kernel should support both the old and new display modules. You can identify the display module on your device based on this forum post. However if you have the old display module, the touchscreen might not work due to issues with power sequencing (turning screen off turns touchscreen off, however turning screen on doesn't reinitialize the touchscreen).

Lk2nd should automatically detect which display panel is installed and adjust the Linux dtb accordingly.

Links