https://wiki.postmarketos.org/api.php?action=feedcontributions&user=Alexeymin&feedformat=atom
postmarketOS - User contributions [en]
2024-03-28T23:28:34Z
User contributions
MediaWiki 1.39.6
https://wiki.postmarketos.org/index.php?title=Projects&diff=56904
Projects
2024-03-16T03:47:00Z
<p>Alexeymin: use full project name to make it cear why it is soted this way (alphabetically)</p>
<hr />
<div>This page lists all of the various projects that postmarketOS maintains, along with the team members that maintain them.<br />
<br />
{| class="wikitable" style="margin:auto"<br />
|+ Caption text<br />
|-<br />
! Project !! Maintainers<br />
|-<br />
| [https://gitlab.com/postmarketOS/apkbrowser apkbrowser] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/aports-turbo aports-turbo] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/artwork artwork] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/asus-transformer-blobtools asus-transformer-blobtools] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/boot-deploy boot-deploy] || [[User:craftyguy|craftyguy]] ([[User:Kalube|Caleb]] trying to help)<br />
|-<br />
| [https://gitlab.com/postmarketOS/bootmac bootmac] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/buffybox BuffyBox] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/build.postmarketos.org build.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/cast.postmarketos.org cast.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/charging-sdl charging-sdl] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ci-common ci-common] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/fbdebug fbdebug] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/gnss-share gnss-share] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/gpmbootstrap gpmbootstrap] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/hkdm HKDM] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/install-makedepends install-makedepends] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/jonathan jonathan] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/libapk-qt libapk-qt (ApkQt)] || [[User:Alexeymin|Alexey Min]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/mobile-config-firefox mobile-config-firefox] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/monitoring monitoring] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/mrhlpr mrhlpr] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/msm-cros-efs-loader msm-cros-efs-loader] || [[User:Jenneron|Jenneron]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/msm-firmware-loader msm-firmware-loader] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/obex-capabilities obex-capabilities] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ondev2 ondev2] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/openrc-settingsd openrc-settingsd] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/osk-sdl osk-sdl] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/pbsplash pbsplash] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmaports pmaports] || Various, see [https://gitlab.com/postmarketOS/pmaports/-/blob/master/CODEOWNERS CODEOWNERS] and APKBUILDs in repo<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmbootstrap pmbootstrap] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-android-recovery-installer postmarketos-android-recovery-installer] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-apparmor-profiles postmarketos-apparmor-profiles] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-backup postmarketos-backup] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-demos postmarketos-demos] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-mkinitfs postmarketos-mkinitfs] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-ondev postmarketos-ondev] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-release-upgrade postmarketos-release-upgrade] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-testing-template-generator postmarketos-testing-template-generator] || [[User:Jenneron|Jenneron]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-theme postmarketos-theme] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-tweaks postmarketos-tweaks] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-upgrade-gtk3 postmarketOS Upgrade GTK3] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-welcome postmarketOS Welcome] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos.org postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/q6voiced q6voiced] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/reboot-mode reboot-mode] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/status.postmarketos.org status.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/swclock-offset swclock-offset] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/tinydm tinydm] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ttq ttq] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ttyescape TTYEscape] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/unudhcpd unudhcpd] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/webflash webflash] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/wiki wiki] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/xfce4-phone xfce4-phone] ||<br />
|}<br />
<br />
== Archived Projects ==<br />
<br />
{| class="wikitable" style="margin:auto"<br />
|+ Caption text<br />
|-<br />
! Project !! Maintainers<br />
|-<br />
| [https://gitlab.com/postmarketOS/anbox-image-make anbox-image-make] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/gps-nokia-n900 gps-nokia-n900] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/linux-postmarketos-archive linux-postmarketos-archive] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/matrix-bot matrix-bot] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/megapixels megapixels] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmOS-repo-scripts pmOS-repo-scripts] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-images postmarketos-images] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-splash postmarketos-splash] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postprocessd postprocessd] ||<br />
|}</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Projects&diff=56903
Projects
2024-03-16T03:42:42Z
<p>Alexeymin: add myself</p>
<hr />
<div>This page lists all of the various projects that postmarketOS maintains, along with the team members that maintain them.<br />
<br />
{| class="wikitable" style="margin:auto"<br />
|+ Caption text<br />
|-<br />
! Project !! Maintainers<br />
|-<br />
| [https://gitlab.com/postmarketOS/apkbrowser apkbrowser] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/aports-turbo aports-turbo] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/artwork artwork] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/asus-transformer-blobtools asus-transformer-blobtools] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/boot-deploy boot-deploy] || [[User:craftyguy|craftyguy]] ([[User:Kalube|Caleb]] trying to help)<br />
|-<br />
| [https://gitlab.com/postmarketOS/bootmac bootmac] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/buffybox BuffyBox] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/build.postmarketos.org build.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/cast.postmarketos.org cast.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/charging-sdl charging-sdl] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ci-common ci-common] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/fbdebug fbdebug] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/gnss-share gnss-share] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/gpmbootstrap gpmbootstrap] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/hkdm HKDM] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/install-makedepends install-makedepends] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/jonathan jonathan] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/libapk-qt ApkQt] || [[User:Alexeymin|Alexey Min]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/mobile-config-firefox mobile-config-firefox] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/monitoring monitoring] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/mrhlpr mrhlpr] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/msm-cros-efs-loader msm-cros-efs-loader] || [[User:Jenneron|Jenneron]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/msm-firmware-loader msm-firmware-loader] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/obex-capabilities obex-capabilities] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ondev2 ondev2] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/openrc-settingsd openrc-settingsd] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/osk-sdl osk-sdl] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/pbsplash pbsplash] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmaports pmaports] || Various, see [https://gitlab.com/postmarketOS/pmaports/-/blob/master/CODEOWNERS CODEOWNERS] and APKBUILDs in repo<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmbootstrap pmbootstrap] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-android-recovery-installer postmarketos-android-recovery-installer] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-apparmor-profiles postmarketos-apparmor-profiles] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-backup postmarketos-backup] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-demos postmarketos-demos] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-mkinitfs postmarketos-mkinitfs] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-ondev postmarketos-ondev] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-release-upgrade postmarketos-release-upgrade] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-testing-template-generator postmarketos-testing-template-generator] || [[User:Jenneron|Jenneron]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-theme postmarketos-theme] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-tweaks postmarketos-tweaks] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-upgrade-gtk3 postmarketOS Upgrade GTK3] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-welcome postmarketOS Welcome] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos.org postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/q6voiced q6voiced] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/reboot-mode reboot-mode] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/status.postmarketos.org status.postmarketos.org] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/swclock-offset swclock-offset] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/tinydm tinydm] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ttq ttq] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/ttyescape TTYEscape] || [[User:Kalube|Caleb]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/unudhcpd unudhcpd] || [[User:craftyguy|craftyguy]]<br />
|-<br />
| [https://gitlab.com/postmarketOS/webflash webflash] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/wiki wiki] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/xfce4-phone xfce4-phone] ||<br />
|}<br />
<br />
== Archived Projects ==<br />
<br />
{| class="wikitable" style="margin:auto"<br />
|+ Caption text<br />
|-<br />
! Project !! Maintainers<br />
|-<br />
| [https://gitlab.com/postmarketOS/anbox-image-make anbox-image-make] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/gps-nokia-n900 gps-nokia-n900] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/linux-postmarketos-archive linux-postmarketos-archive] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/matrix-bot matrix-bot] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/megapixels megapixels] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/pmOS-repo-scripts pmOS-repo-scripts] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-images postmarketos-images] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postmarketos-splash postmarketos-splash] ||<br />
|-<br />
| [https://gitlab.com/postmarketOS/postprocessd postprocessd] ||<br />
|}</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_POCO_F2_Pro_(xiaomi-lmi)&diff=56881
Xiaomi POCO F2 Pro (xiaomi-lmi)
2024-03-15T14:48:16Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = POCO F2 Pro (Redmi K30 Pro)<br />
| codename = xiaomi-lmi<br />
| image = File:Xiaomi-poco-f2-pro.jpg<br />
| imagecaption = POCO F2 Pro<br />
| releaseyear = 2020<br />
| category = testing<br />
| originalsoftware = Android<br />
| originalversion = 10 (MIUI 12)<br />
| chipset = Qualcomm Snapdragon 865 (SM8250)<br />
| cpu = 8-core (1x 2.84 GHz Kryo 585 & 3x 2.42 GHz Kryo 585 & 4x 1.80 GHz Kryo 585)<br />
| gpu = Adreno 650<br />
| storage = 128/256 GB<br />
| display = 1080 x 2400<br />
| memory = 6/8 GB<br />
| architecture = aarch64<br />
| type = handset<br />
| status_usbnet = <br />
| status_flashing = <br />
| status_touch = <br />
| status_screen = <br />
| status_wifi = <br />
| status_xwayland = <br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = <br />
| status_3d = <br />
| status_accel = <br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status = none<br />
| booting = no<br />
| pmoskernel = <br />
| whet_dhry = <br />
| status_otg = <br />
}}<br />
<br />
The device is also known as '''Xiaomi Redmi K30 Pro'''. Some resources call POCO F2 Pro a "rebranded version of Redmi K30 Pro".<br />
<br />
'''Xiaomi Redmi K30 5G''' is ''NOT'' <code>xiaomi-lmi</code>! it's <code>xiaomi-picasso</code>!<br />
<br />
== Contributors ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Maintainer(s) ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
<br />
== Links ==<br />
* [https://www.gsmarena.com/xiaomi_poco_f2_pro-10220.php GSMARENA]<br />
* [https://www.deviceinfohw.ru/devices/item.php?item=74897 Deviceinfo HW link]<br />
* [https://github.com/ungeskriptet/linux/tree/xiaomi-lmi Mainline kernel]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_5_Pro_(xiaomi-whyred)&diff=55173
Xiaomi Redmi Note 5 Pro (xiaomi-whyred)
2024-01-28T10:38:39Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 5 Pro<br />
| codename = xiaomi-whyred<br />
| image = File:xiaomi-whyred.jpg<br />
| imagecaption = Xiaomi Redmi Note 5 Pro<br />
| releaseyear = 2018<br />
| originalsoftware = Android (MIUI)<br />
| originalversion = 9<br />
| chipset = Qualcomm Snapdragon 636 (SDM636)<br />
| cpu = Octa-core Kryo 260 1.8 GHz<br />
| gpu = Adreno 509<br />
| storage = 64 GB<br />
| display = 2160x1080 (403 PPI) IPS<br />
| memory = 4/6 GB<br />
| architecture = aarch64<br />
| type = Handset<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = <br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = <br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = <br />
| status_battery = Y<br />
| status_3d = <br />
| status_accel = N<br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status = <br />
| booting = yes<br />
| pmoskernel = 4.4.78<br />
<br />
<!-- you can also use these lines if you need to:<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = Y<br />
--><br />
}}<br />
<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 636}}<br />
<br />
== Contributors ==<br />
* javabird25<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
* javabird25<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
# Turn off the device<br />
# Press {{Button|Power}} + {{Button|Volume Down}} to enter fastboot<br />
<br />
== Installation ==<br />
{{note|<b>CAUTION</b>: Flashing any image with antirollback index lower than 4 (Android 8 or lower, for example) could potentially <b>brick</b> your device due to Anti-rollback protection. See [https://forum.xda-developers.com/redmi-note-5-pro/how-to/faq-questions-answered-t3816185 a related XDA Developers post] for more information.}}<br />
<br />
Here's how to boot pmOS via fastboot:<br />
<br />
# Install to a SD card with <code>pmbootstrap install --sdcard=/dev/sdX</code><br />
# Insert the SD card into the device<br />
# Connect the device to your PC<br />
# Enter the fastboot mode<br />
# In order to boot an image with fastboot, an 8-Kb image of zeros should be flashed to the <code>antirbpass</code> partition every time we want to use <code>pmbootstrap flasher boot</code> or <code>fastboot boot</code>. Create an image if you haven't done that already: <syntaxhighlight lang="shell-session">$ dd if=/dev/zero of=dummy.img bs=8K count=1</syntaxhighlight><br />
# Flash the freshly created <code>dummy.img</code> to the <code>antirbpass</code> partition: <syntaxhighlight lang="shell-session">$ fastboot flash antirbpass dummy.img</syntaxhighlight><br />
# Finally, boot pmOS. Note that it does take a while to load the desktop: <syntaxhighlight lang="shell-session">$ pmbootstrap flasher boot</syntaxhighlight><br />
<br />
Alternatively, flashing a zip image through the recovery does not appear to trigger anti-rollback protection. <br><br />
This has only been tested on one device with the following procedure, proceed at your own risk:<br />
<br />
# Create a recovery zip with <code>pmbootstrap install --android-recovery-zip</code><br />
# Export the zip with <code>pmbootstrap export</code>, this will create a link to the zip at <code>/tmp/postmarketOS-export/pmos-xiaomi-whyred.zip</code><br />
# Copy the zip to your device and flash with the recovery of your choice, though this has only been tested on OrangeFox Recovery R11.0.<br />
<br />
Your recovery may show some warnings during the install process and warn you that no OS is installed after flashing postmarketOS. You can ignore those warnings.<br />
<br />
For more info on using recovery zips, see [[Installation_from_recovery_mode|Installation from recovery mode]]<br />
<br />
== Accessing UART ==<br />
* Disassemble the device<br />
* Unscrew the battery connector holder<br />
* Disconnect charging board connector (Note: UART test point is under the charging board connector so you can't use usb while accessing UART or you solder thin wires to it)<br />
<gallery><br />
File:Whyred-uart.jpg|Test point locations<br />
</gallery><br />
<br />
<br />
== See also ==<br />
* {{MR|1088|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-whyred}}<br />
* {{Kernel package|xiaomi-whyred}}</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_Snapdragon_660/630/636_(SDM660/SDM630/SDM636)&diff=55172
Qualcomm Snapdragon 660/630/636 (SDM660/SDM630/SDM636)
2024-01-28T10:35:04Z
<p>Alexeymin: BT = yes</p>
<hr />
<div>{{Infobox soc<br />
| name = SDM630<br />
| image = File:Qualcomm_SDM630.jpg<br />
| imagecaption = Qualcomm SDM630 in ceramic package<br />
| codenames = msmtriton/apqtriton<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster<br />
| gpu = Adreno 508<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = Y<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM636<br />
| image = File:Qualcomm_SDM636.jpg<br />
| imagecaption = Qualcomm SDM636 in ceramic package<br />
| codenames = <br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Kryo 260 Gold PERF cluster + 4x Kryo 260 Silver PWR cluster<br />
| gpu = Adreno 509<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = Y<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM660<br />
| image = File:Qualcomm_SDM660.jpg<br />
| imagecaption = Qualcomm SDM660 in ceramic package<br />
| codenames = msmfalcon/apqfalcon<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x 2.2 GHz Kryo 260 Gold, 4x 1.84 GHz Kryo 260 Silver<br />
| gpu = Adreno 512<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = Y<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
== General description ==<br />
[https://www.qualcomm.com/products/sdm660 SDM660]/636/[https://fccid.io/PY7-67442A/Schematics/Schematics-20171116-v1-PY7-67442A-Schematic-Diagram-3652761 630] are Qualcomm SoCs released in 2017, with mostly out-of-tree mainline support.<br />
<br />
According to [https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems-on-chip#Snapdragon_630,_636_and_660_(2017) Wikipedia], they all are pretty similar. Their advantage is price; these SoCs are usually used in middle-range devices.<br />
<br />
Closest similar SoC is [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998 Snapdragon 835]] (which has decent mainline support), and it seems that several drivers from [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998]] can be reused for SDM660.<br />
<br />
== Devices ==<br />
=== SDM660 (Snapdragon 660) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 660 (SDM660)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM636 (Snapdragon 636) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 636 (SDM636)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM630 (Snapdragon 630) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 630 (SDM630)'<br />
|more results text=<br />
}}<br />
<br />
== Battery/Charging == <br />
Most devices seem to use the PMIC-provided QPNP-charger which currently does not have a mainline driver.<br />
<br />
== CPU ==<br />
All cores are up, PSCI is working. Marked as partial because there is no support for CPU frequency scaling. <br />
It is advised to use only 4 CPUs for now due to the lack of cluster interconnect scaling, which results in 8 cores being slower than 4.<br />
<br />
== Display ==<br />
At least four 630 boards can successfully use display (both command- and video-mode) via DRM/MSM (and of course CPU rendering) with some (for now) out-of-tree patches.<br />
Most devices make use of PMIC-provided WLED backlight, which does have a mainline driver, but there happens to be an issue with it not working.<br />
<br />
== GPU ==<br />
Adreno 508/509/512 are not supported in the mainline kernel yet.<br />
<br />
There are patches sent to upstream for enabling support for those GPUs.<br />
See kholk commits to upstream for more info<br />
<br />
== Modem Subsystem ==<br />
The remote processor responsible for modem subsystem shows up and shows *some* signs of life, but neither the modem itself, nor the Wi-Fi chip currently work. The phone also gets very hot with it enabled, which might suggest it's not really fine right now. Of course it needs firmware.<br />
<br />
== Pinctrl ==<br />
Was ported from downstream kernel to mainline by [[User:opendata|opendata]] in 2018.<br />
<br />
== SMMUs / IOMMUs ==<br />
This platform is very picky about its SMMUs and therefore requires many downstream workarounds to be implemented. Upstream maintainers aren't exactly happy with that.<br />
<br />
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=355881&archive=both<br />
<br />
== Storage ==<br />
At least SDHCI (eMMC) was tested to work. UFS is untested (if anybody knows about a sdm630/36/60-based device using UFS, leave a note here!).<br />
<br />
== USB ==<br />
There is WIP support for USB 2.0 only (no USB 3) by [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs<br />
<br />
Do note that most devices only have USB 2.0 wired up in hardware.<br />
<br />
== WiFi ==<br />
Wireless network should be available via the ath10k_snoc driver, provided the modem subsystem is alive. It also needs firmware (which is possibly signed per-device or per-vendor - though it's unconfirmed!).<br />
<br />
== Work done so far ==<br />
=== Who is working on it ===<br />
* [[User:opendata]] worked on initial basic SoC support (pinctrl-sdm660, gcc-sdm660) (+ [https://gitlab.com/opendata26/linux/-/tree/nile-mainline-submit-2 various branches])<br />
* [https://developer.sony.com/posts/pavel-dubrova-selected-as-the-first-2018-hero-open-source-developer/ Pavel Dubrova] worked on SDM630 SoC support based on kernel 5.3. It is unknown where the sources are located.<br />
* [[User:Alexeymin]] tried to continue opendata's work. WIP Branch is in [https://gitlab.com/postmarketOS/linux-postmarketos/-/commits/qcom-sdm660/ linux-postmarketos] repo.<br />
* [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs (warning: frequent forcepushes!)<br />
* SoMainline on GitHub: https://github.com/SoMainline/linux/<br />
<br />
=== Upstream commits related to sdm630/636/660 ===<br />
<br />
Hopefully this can serve as history log, a step-by-step example of what needs to be done to bring new SoC support to mainline kernel from zero.<br />
<br />
Commits merged in 4.20:<br />
* [https://github.com/torvalds/linux/commit/9cf0c526bc5874d77208751ae42f7e4c62bfdd4d pinctrl: qcom: Add sdm660 pinctrl driver] submitted by opendata<br />
* [https://github.com/torvalds/linux/commit/5db0b0a298d26c007e06a96d7e60849b4829a57c pinctrl: sdm660: Set tile property for pingroups]<br />
* [https://github.com/torvalds/linux/commit/f2a76a2955c0eb7514cdb5885e3d60a973301ae0 clk: qcom: Add Global Clock controller (GCC) driver for SDM660] by Taniya Das, who sent opendata's unsubmitted work after opendata had disappeared<br />
Commits merged in 5.1:<br />
* [https://github.com/torvalds/linux/commit/4e2256d31f0f24107c36dae35a1d84dff0fced30 soc: qcom: smd-rpm: Add sdm660 compatible] by opendata<br />
Commits merged in 5.6:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=faf8e30acb219849725aa75302d36e0ffdb6a258 dt-bindings: arm: Add kryo260 compatible] by alexeymin<br />
Commits merged in 5.8:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aab86bbbd3e32a10ca7e5cd1d3b9a473cf5909bb dt-bindings: arm: qcom: Add sdm630 and sdm660 SoCs] by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=feec34411d4c0a9759106ef4f7d563438b3881ae arm64: dts: qcom: Add SDM660 SoC support] done by opendata sent by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23a6da79fe8b7f0b5725b40126a7b0638c016ef3 arm64: dts: qcom: Add Xiaomi Redmi Note 7 (lavender)] by alexeymin<br />
Commits merged in 5.9:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30dee220c8502a478477cd503729994e8dc850c2 soc: qcom: socinfo: Add socinfo entry for SDM630] by konradybcio (why not do it for 636 and 660 in one go though?)<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b608013ac5b55a2e42d8734f29f9757b75d26165 clk: qcom: smd: Add support for SDM660 rpm clocks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4870c76c00d178956cf3e1c17aab6b00a61dc30f arm64: dts: qcom: pm660(l): Add base dts files] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b190fb010664c769da16c5240be0e972cb3b267a arm64: dts: qcom: sdm630: Add sdm630 dts file] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e781633b6067eee13001faa1175851e91143d738 arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform)] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=234d7d6b4cbfab0e900f12658053689bb3376141 arm64: dts: qcom: Add support for Sony Xperia 10/10 Plus (Ganges platform)] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=17cc38e7846b462e03b718d1ca231da96809407d pinctrl: qcom: spmi-gpio: Add pm660(l) compatibility] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7203d3684eafd711bfa1ebda7d36b89f4ac20c4c Documentation: Document pm660(l) SPMI GPIOs compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b538304da7855f4e31f91f915f259936eb67a1e6 clk: qcom: gcc-sdm660: Add missing modem reset] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3386af51d3bcebcba3f7becdb1ef2e384abe90cf clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=694dd304cc294b69db7191cec1d83e5a29c6a4b0 drm/msm/dsi: Add phy configuration for SDM630/636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75c1437ceb77ffcdb9358688b3b56245c6ba3851 drm/msm/mdp5: Add MDP5 configuration for SDM630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=033f47f7f12168b39c10158551576b15dec61505 drm/msm/dsi: Add DSI configuration for SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=974b7115a73d8d3ff77cfd6f69408d20c1bb7d06 drm/msm/mdp5: Add MDP5 configuration for SDM636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfbf813e598125293493341bc2238acdf6ba6a6f mailbox: qcom: Add sdm660 hmss compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9bb4a068b206f61ef01057cfeafdb852fb244c5 regulator: core: Enlarge max OF property name length to 64 chars] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b5a21870694ab4c75a783f77b158840908f04a1 Merge series "Support for PM660/PM660L SPMI and SMD regulators" from kholk]<br />
<br />
Commits merged in 5.10:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=326407d2c576995464fda64e92b5e37f3589e5ee arm64: dts: sdm630: Temporarily disable SMMUs by default] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d46e5a39f9be9288f1ce2170c4c7f8098f4e7f68 clk: qcom: gcc-sdm660: Fix wrong parent_map] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
<br />
Commits merged in 5.11:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b812834b5329fe78d643c9a61350d227db904361 iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4863b93cfd2dfe88557f820b3399c3fa2163ec43 media: camss: csiphy: Set rate on csiX_phy clock on SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e486781b74cc611d85e66ff0fc6324f65b25196c media: camss: csiphy-3ph: Add support for SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e5d158189c6a6259c1c78bc95d8ae950b4ec66a media: camss: Add support for SDM630/636/660 camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3cba9d22c358a3a095cbfcc7bec26e67c29ee361 media: dt-bindings: media: qcom,camss: Add bindings for SDM660 camss] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4b9be29f4bfc391da2eafc1a2cbc96b6774ab79 mfd: qcom-spmi-pmic: Add support for PM660/PM660L] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b831fba3b0e184930747761adc9fdaccc3c49ff4 arm64: dts: sdm630: Fix dma node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd7fb438b7ce40918fc059afe77b12b5fe46ce2 soc: qcom: rpmpd: Add SDM660 power-domains] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee84049c1391d45c6e3ecccf45b5f679e4914253 dt-bindings: power: rpmpd: Add SDM660 power-domains bindings] by konradybcio<br />
<br />
Commits merged in 5.12:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e16831bf402c4db4a0b3c4921223ff68cdb5d0a0 dt-bindings: clock: Add QCOM SDM630 and SDM660 graphics clock bindings] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79b5d1fc93a1f114a0974a076b5a25ca64b37b0f clk: qcom: Add SDM660 GPU Clock Controller (GPUCC) driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7cbb78a99db658e48868e3af9fb15bacb624bd50 clk: qcom: rcg2: Stop hardcoding gfx3d pingpong parent numbers] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9502d488b1fc9019edc190bcd2f1aacec9e37bc3 dt-bindings: clock: Add support for the SDM630 and SDM660 mmcc] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5db3ae8b33de627ac3a73b7a772e5ae9f8c31da9 clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c3656218386a40d884d8a757e1683028147c6e1c clk: qcom: gcc-sdm660: Mark GPU CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe121bfe261717e930abdb4a905e5c01b7f47cc3 clk: qcom: gcc-sdm660: Mark MMSS NoC CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=785c02eb35009a4be6dbc68f4f7d916e90b7177d clk: qcom: gdsc: Implement NO_RET_PERIPH flag] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=731806da2916f7b0f0b86ac5f80b287f08bfcf42 drm/msm/dpu: Add prog_fetch_lines_worst_case to INTF_BLK macro] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d832ab30ce64abe30571bc12931a296a8a27c4d drm/msm/a5xx: Add support for Adreno 508, 509, 512 GPUs] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e49c2912dbfa81cbe62849e4695f967f81c9350c arm64: dts: qcom: sdm630: add ICE registers and clocks] by ebiggers<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71edb0b4fa0e3bc248df564ba01a0f7c41607c8e dt-bindings: phy: qcom-qusb2: Document SDM660 compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0e7f781fc9958bfb57527a49c5a1eb1f423439c phy: qcom-qusb2: Add configuration for SDM660] by kholk<br />
<br />
Commits merged in 5.13:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7014dfee4e83348d04c450c698ae29add6e9f58f interconnect: qcom: sdm660: Fix kerneldoc warning] by Georgi Djakov<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6761996a8c4d72bda053e18c548b0c392a189110 media: dt-bindings: media: camss: Add qcom,sdm660-camss binding] by Robert Foss<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f80a1d41432869dd78dfe8373060371918a05326 interconnect: qcom: Add SDM660 interconnect provider driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33ad2800348e6c20f05b86ef01e8216fc3e3c762 dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC] by kholk<br />
<br />
Commits merged in 5.15:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=90b7c1c66132c20e8a550006011a3cbfb73dbfc1 drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in poll_for_ready] by Marijn Suijten<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1878f4b7ec9ed013da8a7efb63fed1fbae0215ae arm64: dts: qcom: sdm630: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=13404ac8882f5225af07545215f4975a564c3740 interconnect: qcom: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf49e366020396ad83845c1c3bdbaa3c1406f5ce dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5833c9b8766298e73c11766f9585d4ea4fa785ff interconnect: qcom: sdm660: Correct NOC_QOS_PRIORITY shift and mask] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a06c2e5c048e5e07fac9daf3073bd0b6582913c7 interconnect: qcom: sdm660: Fix id of slv_cnoc_mnoc_cfg] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da09577ab562e2700f0aba3f17cc741717ca9e38 clk: qcom: gcc-sdm660: Replace usage of parent_names] by Bjorn Andersson<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a61ca021fe28ab7163ca879fc3532c3cca25063c clk: qcom: gcc-sdm660: Move parent tables after PLLs] by Stephen Boyd<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=462f7017a6918d152870bfb8852f3c70fd74b296 drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=639dfdbecd88ec05bda87b1d5d419afad50af21c arm64: dts: qcom: sdm630: don't use underscore in node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c81210e38966cfa1c784364e4035081c3227cf5b arm64: dts: qcom: sdm660: use reg value for memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfdf0c27639571d7a99d00fe1ce931daa6726c27 arm64: dts: qcom: sdm630: don't use empty memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=712e245fcbfd92f385ea5bc12af399d97953a298 arm64: dts: qcom: sdm630: Add DMA to I2C hosts] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=536f44285ff618087256f2059d0d6b5581d3748d arm64: dts: qcom: sdm630: Add I2C functions to I2C pins] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18abedf7d4e6d069f89ba056223a03ba1e17af3b arm64: dts: qcom: sdm630-nile: Remove gpio-keys autorepeat] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e634d8196f7da05b81a4574e1572ef559f1ba85f arm64: dts: qcom: sdm630-nile: Enable uSD card slot] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bc81940d8ca568f887d5337ccf97f104a60be955 arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8fc1c43c51b4aad8a88d2c968d2a63b5ef7ed13 arm64: dts: qcom: sdm630-nile: Add Synaptics touchscreen.] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c1d849ec047dde4e21dca7f20f300575307a660 arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fcbcd062a894067f1f622f927ed7c448723d6f06 arm64: dts: qcom: sdm630-nile: Add Volume up key] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c616239f255a66e5989e8fa5cdaefc25eec3d00 arm64: dts: qcom: sdm630-nile: Add USB] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=158f80a68148d7febdbcc3586d2d17e455453563 arm64: dts: qcom: sdm630-nile: Use &labels] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b36c824b9a77a8816258fdd00997a5f78542814 arm64: dts: qcom: sdm630-xperia-nile: Add all RPM and fixed regulators] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab290284398d8a33a5e7e9ebe7c7364b481f6dd8 arm64: dts: qcom: sdm660: Add required nodes for DSI1] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3d5d3cc69710344f152c6b65e54ccc8c818b9d4 arm64: dts: qcom: sdm630: Configure the camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c21512cbfbfdcb72ba3b41e714266149433b11c8 arm64: dts: qcom: sdm630: Add IMEM node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36c7b98f7935110ff5a65b49f03ae3bbf1cbe181 arm64: dts: qcom: Add device tree for SDM636] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=05aa0eb325c98f7e06eeb3f251cbab1b27586c8e arm64: dts: qcom: sdm660: Make the DTS an overlay on top of 630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bf09754050652885bc123454615ef4f74f9586c arm64: dts: qcom: pm660(l): Add VADC and temp alarm nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a1fbb121aa6d87c618f7f345c3c498cb8a65446 arm64: dts: qcom: pm660l: Support SPMI regulators on PMIC sid 3] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b56a804e58b1670cb8f17b66543facd21af4dd2 arm64: dts: qcom: pm660l: Add WLED support] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b59b058c623d274919b4cae5e0625f8231cbb474 arm64: dts: qcom: pm660: Support SPMI regulators on PMIC sid 1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5cf69dcbec8bd6620ecef601a6744489d5201e0e arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adc57d4a463b59ec7d3adf7125758de5a1db3944 arm64: dts: qcom: sdm630: Raise tcsr_mutex_regs size] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ca2ebc90a4624b361c9b7291d7cafa2deab2c1a arm64: dts: qcom: sdm630: Add ADSP remoteproc configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3332c59649fea6b00f437c20e294e8b29f07fca7 arm64: dts: qcom: sdm630: Add thermal-zones configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8236767599afb43d4e274cc56efecfe47c55332 arm64: dts: qcom: sdm630: Add modem/ADSP SMP2P nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c54b82b4545386bb576b7c5df5b8d4f95f11a5b arm64: dts: qcom: sdm630: Add TSENS node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=056d4ff8279a1df70eaf2fccb5977508c83627aa arm64: dts: qcom: sdm630: Add qcom,adreno-smmu compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6bb717fe56f67218715fd3b8eaf65bb1fe8f8458 arm64: dts: qcom: sdm630: Add clocks and power domains to SMMU nodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a64fa0e23b5f712828379319d20b32546e0cfb94 arm64: dts: qcom: sdm630: Add GPU Clock Controller node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=738777ab85ea9aced9e6e139be921c5dd89498f3 arm64: dts: qcom: sdm630: Add interconnect and opp table to sdhc_1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b700aa1b3e6240bc9885b18700c95bce6c1d948 arm64: dts: qcom: sdm630: Add SDHCI2 node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36a0d47aee6a8cfd3c6cf4274732d8ef994a25b4 arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c65a4ed2ea8bca368e8e8822b61f7309aa706171 arm64: dts: qcom: sdm630: Add USB configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=142662f8f43c1725418ff13a2c83fb218d2b0911 arm64: dts: qcom: sdm630: Add qfprom subnodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b52555d590d1609ea9577f25f06d366e397afe96 arm64: dts: qcom: sdm630: Add MDSS nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=045547a022529d29ad2ddc1981817743d1dac91e arm64: dts: qcom: sdm630: Add interconnect provider nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01b182d920a8147f185adfc5364952aeed9eb086 arm64: dts: qcom: sdm630: Add MMCC node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ce921ae3d30ef86f8313d753e07b67f9bcfc8f8 arm64: dts: qcom: sdm630: Add RPMPD nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=26e02c98a9ad63eb21b9be4ac92002f555130d3b arm64: dts: qcom: sdm630: Rewrite memory map] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0a77028c85ad1f6f36c3ceea21b30dc43721665 remoteproc: q6v5_pas: Add sdm660 ADSP PIL compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f35ef8e4ea0a2b2b35a2c7009fc07b6d80a2b2f3 dt-bindings: remoteproc: qcom: adsp: Add SDM660 ADSP] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0132bf6f395837fc77fb38ac3d2806d22426be51 drivers: usb: dwc3-qcom: Add sdm660 compatible] by konradybcio<br />
<br />
see also:<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Linux-SDM630-SDM660-Patches Article on Phoronix, Linux-SDM630-SDM660-Patches]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=54770
Xiaomi Redmi Note 7 (xiaomi-lavender)
2024-01-15T19:13:18Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android (MIUI)<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| type = Handset<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_emmc = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_audio = N<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status_sdcard = Y<br />
| status_accel = N<br />
| status_magnet = N<br />
| status_light = N<br />
| status_proximity = N<br />
| status_barometer = -<br />
| status_powersensor = -<br />
| status_irtx = -<br />
| status_irrx = -<br />
| status_hall = -<br />
| status_haptics = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 6.7<br />
| status_otg = N<br />
| status_nfc = N<br />
| status_fossbootloader = P<br />
| status_uboot = P<br />
| status_uboot_mainline = -<br />
| status_uboot_primary = N<br />
| status_uboot_secondary = P<br />
| status_uboot_internalstorage = Y<br />
| status_uboot_sd = N<br />
| status_uboot_usbhost = N<br />
| status_uboot_usbperipheral = Y<br />
| status_uboot_screen = Y<br />
| status_uboot_keyboard = N<br />
| status_uboot_buttons = N<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/testing/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* [https://github.com/sdm660-mainline/linux Close-to mainline kernel source repository]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* {{issue|494|pmaports}} (OLD) How to make Wi-Fi work?<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Pad_4_(xiaomi-clover)&diff=54769
Xiaomi Mi Pad 4 (xiaomi-clover)
2024-01-15T19:12:58Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Pad 4<br />
| codename = xiaomi-clover<br />
| image = File:xiaomi-clover.jpg<br />
| imagecaption = Mi Pad 4 running Sxmo<br />
| releaseyear = 2018<br />
| originalsoftware = Android<br />
| originalversion = 8<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Qualcomm Kryo 260 Silver @ 1.8GHz + 4x Qualcomm Kryo 260 Gold @ 2.2GHz<br />
| gpu = Adreno 512<br />
| storage = 32GB<br />
| display = 1920x1200 IPS<br />
| memory = 3GB<br />
| architecture = aarch64<br />
| type = tablet<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = N<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = booting<br />
| booting = yes<br />
| pmoskernel = 6.7<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
There are 3 different variant to take note:<br />
* WiFi only model (SDA660, 8 inch)<br />
* LTE model (SDM660, 8 inch)<br />
* Plus model with LTE (SDM660, 10 inch, different touch controller/display)<br />
<br />
== Contributors ==<br />
* nergzd723<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
You have to press {{Button|Power}} + {{Button|Volume Down}} to enter the bootloader.<br />
<br />
== Installation ==<br />
In order to install postmarketOS the bootloader must be unlocked.<br />
Unlocking is done by following [https://en.miui.com/unlock/download_en.html the official process provided by Xiaomi] (read the FAQ for detailed instructions).<br />
<br />
Follow Installation guide using [[pmbootstrap]] to build your own image.<br />
<br />
1. Run <code>pmbootstrap init</code> and select xiaomi as vendor and clover as device.<br />
<br />
2. Follow the onscreen instruction and configure as your needs.<br />
<br />
Next, we will build the system:<br />
<pre><br />
$ pmbootstrap install<br />
</pre><br />
<br />
Flash the kernel and rootfs:<br />
<pre><br />
$ pmbootstrap flasher flash_kernel<br />
$ pmbootstrap flasher flash_rootfs --partition userdata<br />
</pre><br />
<br />
=== Installation to SD card ===<br />
You can take advantage of Mi Pad 4's SD card slot to install postmarketOS for testing.<br />
<br />
Install to the SD card:<br />
<pre><br />
$ pmbootstrap install --sdcard=/dev/sde <br />
</pre><br />
<br />
To boot from SD, with the device in fastboot mode (with device off, press Power + Volume Down until it enters fastboot mode), type:<br />
<pre><br />
$ pmbootstrap flasher boot<br />
</pre><br />
<br />
Note: This uses pmbootstrap from your computer to boot postmarketOS from the SD card without disturbing your bootloader or your system.<br />
<br />
== Additional information ==<br />
=== UART pins location ===<br />
[[File:Xiaomi_clover_uart.png|200px|Xiaomi Mi PAD 4 (clover) UART test pins]]<br />
<br />
== See also ==<br />
* {{MR|2003|pmaports}} Initial merge request<br />
* Deviceinfo HW links: [http://www.deviceinfohw.ru/devices/item.php?item=78188 Mi Pad 4], [http://www.deviceinfohw.ru/devices/item.php?item=81215 Mi Pad 4 PLUS]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Pad_4_(xiaomi-clover)&diff=54768
Xiaomi Mi Pad 4 (xiaomi-clover)
2024-01-15T19:10:49Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Pad 4<br />
| codename = xiaomi-clover<br />
| image = File:xiaomi-clover.jpg<br />
| imagecaption = Mi Pad 4 running Sxmo<br />
| releaseyear = 2018<br />
| originalsoftware = Android<br />
| originalversion = 8<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Qualcomm Kryo 260 Silver @ 1.8GHz + 4x Qualcomm Kryo 260 Gold @ 2.2GHz<br />
| gpu = Adreno 512<br />
| storage = 32GB<br />
| display = 1920x1200 IPS<br />
| memory = 3GB<br />
| architecture = aarch64<br />
| type = tablet<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_emmc = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = N<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = booting<br />
| booting = yes<br />
| pmoskernel = 6.7.0<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
There are 3 different variant to take note:<br />
* WiFi only model (SDA660, 8 inch)<br />
* LTE model (SDM660, 8 inch)<br />
* Plus model with LTE (SDM660, 10 inch, different touch controller/display)<br />
<br />
== Contributors ==<br />
* nergzd723<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
You have to press {{Button|Power}} + {{Button|Volume Down}} to enter the bootloader.<br />
<br />
== Installation ==<br />
In order to install postmarketOS the bootloader must be unlocked.<br />
Unlocking is done by following [https://en.miui.com/unlock/download_en.html the official process provided by Xiaomi] (read the FAQ for detailed instructions).<br />
<br />
Follow Installation guide using [[pmbootstrap]] to build your own image.<br />
<br />
1. Run <code>pmbootstrap init</code> and select xiaomi as vendor and clover as device.<br />
<br />
2. Follow the onscreen instruction and configure as your needs.<br />
<br />
Next, we will build the system:<br />
<pre><br />
$ pmbootstrap install<br />
</pre><br />
<br />
Flash the kernel and rootfs:<br />
<pre><br />
$ pmbootstrap flasher flash_kernel<br />
$ pmbootstrap flasher flash_rootfs --partition userdata<br />
</pre><br />
<br />
=== Installation to SD card ===<br />
You can take advantage of Mi Pad 4's SD card slot to install postmarketOS for testing.<br />
<br />
Install to the SD card:<br />
<pre><br />
$ pmbootstrap install --sdcard=/dev/sde <br />
</pre><br />
<br />
To boot from SD, with the device in fastboot mode (with device off, press Power + Volume Down until it enters fastboot mode), type:<br />
<pre><br />
$ pmbootstrap flasher boot<br />
</pre><br />
<br />
Note: This uses pmbootstrap from your computer to boot postmarketOS from the SD card without disturbing your bootloader or your system.<br />
<br />
== Additional information ==<br />
=== UART pins location ===<br />
[[File:Xiaomi_clover_uart.png|200px|Xiaomi Mi PAD 4 (clover) UART test pins]]<br />
<br />
== See also ==<br />
* {{MR|2003|pmaports}} Initial merge request<br />
* Deviceinfo HW links: [http://www.deviceinfohw.ru/devices/item.php?item=78188 Mi Pad 4], [http://www.deviceinfohw.ru/devices/item.php?item=81215 Mi Pad 4 PLUS]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=54695
Xiaomi Redmi Note 7 (xiaomi-lavender)
2024-01-12T10:44:28Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android (MIUI)<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| type = Handset<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_emmc = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_audio = N<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status_sdcard = Y<br />
| status_accel = N<br />
| status_magnet = N<br />
| status_light = N<br />
| status_proximity = N<br />
| status_barometer = -<br />
| status_powersensor = -<br />
| status_irtx = -<br />
| status_irrx = -<br />
| status_hall = -<br />
| status_haptics = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 6.6<br />
| status_otg = N<br />
| status_nfc = N<br />
| status_fossbootloader = P<br />
| status_uboot = P<br />
| status_uboot_mainline = -<br />
| status_uboot_primary = N<br />
| status_uboot_secondary = P<br />
| status_uboot_internalstorage = Y<br />
| status_uboot_sd = N<br />
| status_uboot_usbhost = N<br />
| status_uboot_usbperipheral = Y<br />
| status_uboot_screen = Y<br />
| status_uboot_keyboard = N<br />
| status_uboot_buttons = N<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/testing/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* [https://github.com/sdm660-mainline/linux Close-to mainline kernel source repository]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* {{issue|494|pmaports}} (OLD) How to make Wi-Fi work?<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Asus_Zenfone_Max_Pro_M1_(asus-x00td)&diff=54537
Asus Zenfone Max Pro M1 (asus-x00td)
2024-01-07T14:07:31Z
<p>Alexeymin: /* See also */</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Asus<br />
| name = Zenfone Max Pro M1<br />
| codename = asus-x00td<br />
| image = File:Asus-x00td.jpg<br />
| imagecaption = Zenfone Max Pro M1<br />
| releaseyear = 2018<br />
| originalsoftware = Android<br />
| originalversion = 8.1<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster<br />
| gpu = Adreno 509<br />
| storage = 64 GB<br />
| display = 1080x2160 IPS LCD<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? --><br />
| status_mainline = P<br />
| status_battery = <!-- Charging the battery with charging-sdl is possible --><br />
| status_3d = P<br />
| status_accel = <!-- The sensor that measures proper acceleration works --><br />
| status_audio = <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = Y<br />
| status_camera = <!-- Taking photos and videos works. --><br />
| status_gps = <!-- The Global Positioning System sensor works. --><br />
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = <!-- Talking to other people over the cellular network. --><br />
| status = Boots, not upstreamed, see {{MR|1484|pmaports}} for details<br />
| booting = yes<br />
| pmoskernel = 5.19.0<br />
<!-- Need to add after benchmarking<br />
| whet_dhry = 0.0<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* alice-koul<br />
<br />
== Maintainer(s) ==<br />
* Aboothahir<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
<br />
Unlock your phone's bootloader.<br />
<br />
Hold {{Button|Power}} and {{Button|Volume Up}} to enter fastboot mode.<br />
<br />
== Installation ==<br />
<br />
<syntaxhighlight lang=shell><br />
pmbootstrap flasher flash_rootfs<br />
<br />
pmbootstrap flasher flash_kernel<br />
</syntaxhighlight><br />
Please note, pmbootstrap flasher boot doesn't work<br />
<br />
== See also ==<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|1484|pmaports}} Initial merge request<br />
* [https://www.gsmarena.com/asus_zenfone_max_pro_(m1)_zb601kl_zb602k-9173.php GSM Arena for asus-x00td]<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|DEVICE_CODENAME}}<br />
* {{Kernel package|DEVICE_CODENAME}}<br />
--><br />
* [[Qualcomm_Snapdragon_660_(SDM660)]]<br />
* [https://github.com/edk2-porting/edk2-msm/pull/373 edk2-msm pull request]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_Snapdragon_660/630/636_(SDM660/SDM630/SDM636)&diff=54517
Qualcomm Snapdragon 660/630/636 (SDM660/SDM630/SDM636)
2024-01-06T16:55:13Z
<p>Alexeymin: Small updates on status</p>
<hr />
<div>{{Infobox soc<br />
| name = SDM630<br />
| image = File:Qualcomm_SDM630.jpg<br />
| imagecaption = Qualcomm SDM630 in ceramic package<br />
| codenames = msmtriton/apqtriton<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster<br />
| gpu = Adreno 508<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = P<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM636<br />
| image = File:Qualcomm_SDM636.jpg<br />
| imagecaption = Qualcomm SDM636 in ceramic package<br />
| codenames = <br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Kryo 260 Gold PERF cluster + 4x Kryo 260 Silver PWR cluster<br />
| gpu = Adreno 509<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = P<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM660<br />
| image = File:Qualcomm_SDM660.jpg<br />
| imagecaption = Qualcomm SDM660 in ceramic package<br />
| codenames = msmfalcon/apqfalcon<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x 2.2 GHz Kryo 260 Gold, 4x 1.84 GHz Kryo 260 Silver<br />
| gpu = Adreno 512<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = Y<br />
| status_gpu = P<br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_spi = Y<br />
| status_npu = -<br />
| status_audio = N<br />
| status_video = Y<br />
| status_thermal = Y<br />
| status_wifi = Y<br />
| status_bluetooth = P<br />
| status_modem = Y<br />
| status_camera = P<br />
}}<br />
<br />
== General description ==<br />
[https://www.qualcomm.com/products/sdm660 SDM660]/636/[https://fccid.io/PY7-67442A/Schematics/Schematics-20171116-v1-PY7-67442A-Schematic-Diagram-3652761 630] are Qualcomm SoCs released in 2017, with mostly out-of-tree mainline support.<br />
<br />
According to [https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems-on-chip#Snapdragon_630,_636_and_660_(2017) Wikipedia], they all are pretty similar. Their advantage is price; these SoCs are usually used in middle-range devices.<br />
<br />
Closest similar SoC is [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998 Snapdragon 835]] (which has decent mainline support), and it seems that several drivers from [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998]] can be reused for SDM660.<br />
<br />
== Devices ==<br />
=== SDM660 (Snapdragon 660) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 660 (SDM660)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM636 (Snapdragon 636) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 636 (SDM636)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM630 (Snapdragon 630) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 630 (SDM630)'<br />
|more results text=<br />
}}<br />
<br />
== Battery/Charging == <br />
Most devices seem to use the PMIC-provided QPNP-charger which currently does not have a mainline driver.<br />
<br />
== CPU ==<br />
All cores are up, PSCI is working. Marked as partial because there is no support for CPU frequency scaling. <br />
It is advised to use only 4 CPUs for now due to the lack of cluster interconnect scaling, which results in 8 cores being slower than 4.<br />
<br />
== Display ==<br />
At least four 630 boards can successfully use display (both command- and video-mode) via DRM/MSM (and of course CPU rendering) with some (for now) out-of-tree patches.<br />
Most devices make use of PMIC-provided WLED backlight, which does have a mainline driver, but there happens to be an issue with it not working.<br />
<br />
== GPU ==<br />
Adreno 508/509/512 are not supported in the mainline kernel yet.<br />
<br />
There are patches sent to upstream for enabling support for those GPUs.<br />
See kholk commits to upstream for more info<br />
<br />
== Modem Subsystem ==<br />
The remote processor responsible for modem subsystem shows up and shows *some* signs of life, but neither the modem itself, nor the Wi-Fi chip currently work. The phone also gets very hot with it enabled, which might suggest it's not really fine right now. Of course it needs firmware.<br />
<br />
== Pinctrl ==<br />
Was ported from downstream kernel to mainline by [[User:opendata|opendata]] in 2018.<br />
<br />
== SMMUs / IOMMUs ==<br />
This platform is very picky about its SMMUs and therefore requires many downstream workarounds to be implemented. Upstream maintainers aren't exactly happy with that.<br />
<br />
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=355881&archive=both<br />
<br />
== Storage ==<br />
At least SDHCI (eMMC) was tested to work. UFS is untested (if anybody knows about a sdm630/36/60-based device using UFS, leave a note here!).<br />
<br />
== USB ==<br />
There is WIP support for USB 2.0 only (no USB 3) by [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs<br />
<br />
Do note that most devices only have USB 2.0 wired up in hardware.<br />
<br />
== WiFi ==<br />
Wireless network should be available via the ath10k_snoc driver, provided the modem subsystem is alive. It also needs firmware (which is possibly signed per-device or per-vendor - though it's unconfirmed!).<br />
<br />
== Work done so far ==<br />
=== Who is working on it ===<br />
* [[User:opendata]] worked on initial basic SoC support (pinctrl-sdm660, gcc-sdm660) (+ [https://gitlab.com/opendata26/linux/-/tree/nile-mainline-submit-2 various branches])<br />
* [https://developer.sony.com/posts/pavel-dubrova-selected-as-the-first-2018-hero-open-source-developer/ Pavel Dubrova] worked on SDM630 SoC support based on kernel 5.3. It is unknown where the sources are located.<br />
* [[User:Alexeymin]] tried to continue opendata's work. WIP Branch is in [https://gitlab.com/postmarketOS/linux-postmarketos/-/commits/qcom-sdm660/ linux-postmarketos] repo.<br />
* [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs (warning: frequent forcepushes!)<br />
* SoMainline on GitHub: https://github.com/SoMainline/linux/<br />
<br />
=== Upstream commits related to sdm630/636/660 ===<br />
<br />
Hopefully this can serve as history log, a step-by-step example of what needs to be done to bring new SoC support to mainline kernel from zero.<br />
<br />
Commits merged in 4.20:<br />
* [https://github.com/torvalds/linux/commit/9cf0c526bc5874d77208751ae42f7e4c62bfdd4d pinctrl: qcom: Add sdm660 pinctrl driver] submitted by opendata<br />
* [https://github.com/torvalds/linux/commit/5db0b0a298d26c007e06a96d7e60849b4829a57c pinctrl: sdm660: Set tile property for pingroups]<br />
* [https://github.com/torvalds/linux/commit/f2a76a2955c0eb7514cdb5885e3d60a973301ae0 clk: qcom: Add Global Clock controller (GCC) driver for SDM660] by Taniya Das, who sent opendata's unsubmitted work after opendata had disappeared<br />
Commits merged in 5.1:<br />
* [https://github.com/torvalds/linux/commit/4e2256d31f0f24107c36dae35a1d84dff0fced30 soc: qcom: smd-rpm: Add sdm660 compatible] by opendata<br />
Commits merged in 5.6:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=faf8e30acb219849725aa75302d36e0ffdb6a258 dt-bindings: arm: Add kryo260 compatible] by alexeymin<br />
Commits merged in 5.8:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aab86bbbd3e32a10ca7e5cd1d3b9a473cf5909bb dt-bindings: arm: qcom: Add sdm630 and sdm660 SoCs] by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=feec34411d4c0a9759106ef4f7d563438b3881ae arm64: dts: qcom: Add SDM660 SoC support] done by opendata sent by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23a6da79fe8b7f0b5725b40126a7b0638c016ef3 arm64: dts: qcom: Add Xiaomi Redmi Note 7 (lavender)] by alexeymin<br />
Commits merged in 5.9:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30dee220c8502a478477cd503729994e8dc850c2 soc: qcom: socinfo: Add socinfo entry for SDM630] by konradybcio (why not do it for 636 and 660 in one go though?)<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b608013ac5b55a2e42d8734f29f9757b75d26165 clk: qcom: smd: Add support for SDM660 rpm clocks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4870c76c00d178956cf3e1c17aab6b00a61dc30f arm64: dts: qcom: pm660(l): Add base dts files] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b190fb010664c769da16c5240be0e972cb3b267a arm64: dts: qcom: sdm630: Add sdm630 dts file] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e781633b6067eee13001faa1175851e91143d738 arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform)] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=234d7d6b4cbfab0e900f12658053689bb3376141 arm64: dts: qcom: Add support for Sony Xperia 10/10 Plus (Ganges platform)] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=17cc38e7846b462e03b718d1ca231da96809407d pinctrl: qcom: spmi-gpio: Add pm660(l) compatibility] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7203d3684eafd711bfa1ebda7d36b89f4ac20c4c Documentation: Document pm660(l) SPMI GPIOs compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b538304da7855f4e31f91f915f259936eb67a1e6 clk: qcom: gcc-sdm660: Add missing modem reset] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3386af51d3bcebcba3f7becdb1ef2e384abe90cf clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=694dd304cc294b69db7191cec1d83e5a29c6a4b0 drm/msm/dsi: Add phy configuration for SDM630/636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75c1437ceb77ffcdb9358688b3b56245c6ba3851 drm/msm/mdp5: Add MDP5 configuration for SDM630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=033f47f7f12168b39c10158551576b15dec61505 drm/msm/dsi: Add DSI configuration for SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=974b7115a73d8d3ff77cfd6f69408d20c1bb7d06 drm/msm/mdp5: Add MDP5 configuration for SDM636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfbf813e598125293493341bc2238acdf6ba6a6f mailbox: qcom: Add sdm660 hmss compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9bb4a068b206f61ef01057cfeafdb852fb244c5 regulator: core: Enlarge max OF property name length to 64 chars] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b5a21870694ab4c75a783f77b158840908f04a1 Merge series "Support for PM660/PM660L SPMI and SMD regulators" from kholk]<br />
<br />
Commits merged in 5.10:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=326407d2c576995464fda64e92b5e37f3589e5ee arm64: dts: sdm630: Temporarily disable SMMUs by default] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d46e5a39f9be9288f1ce2170c4c7f8098f4e7f68 clk: qcom: gcc-sdm660: Fix wrong parent_map] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
<br />
Commits merged in 5.11:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b812834b5329fe78d643c9a61350d227db904361 iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4863b93cfd2dfe88557f820b3399c3fa2163ec43 media: camss: csiphy: Set rate on csiX_phy clock on SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e486781b74cc611d85e66ff0fc6324f65b25196c media: camss: csiphy-3ph: Add support for SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e5d158189c6a6259c1c78bc95d8ae950b4ec66a media: camss: Add support for SDM630/636/660 camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3cba9d22c358a3a095cbfcc7bec26e67c29ee361 media: dt-bindings: media: qcom,camss: Add bindings for SDM660 camss] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4b9be29f4bfc391da2eafc1a2cbc96b6774ab79 mfd: qcom-spmi-pmic: Add support for PM660/PM660L] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b831fba3b0e184930747761adc9fdaccc3c49ff4 arm64: dts: sdm630: Fix dma node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd7fb438b7ce40918fc059afe77b12b5fe46ce2 soc: qcom: rpmpd: Add SDM660 power-domains] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee84049c1391d45c6e3ecccf45b5f679e4914253 dt-bindings: power: rpmpd: Add SDM660 power-domains bindings] by konradybcio<br />
<br />
Commits merged in 5.12:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e16831bf402c4db4a0b3c4921223ff68cdb5d0a0 dt-bindings: clock: Add QCOM SDM630 and SDM660 graphics clock bindings] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79b5d1fc93a1f114a0974a076b5a25ca64b37b0f clk: qcom: Add SDM660 GPU Clock Controller (GPUCC) driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7cbb78a99db658e48868e3af9fb15bacb624bd50 clk: qcom: rcg2: Stop hardcoding gfx3d pingpong parent numbers] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9502d488b1fc9019edc190bcd2f1aacec9e37bc3 dt-bindings: clock: Add support for the SDM630 and SDM660 mmcc] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5db3ae8b33de627ac3a73b7a772e5ae9f8c31da9 clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c3656218386a40d884d8a757e1683028147c6e1c clk: qcom: gcc-sdm660: Mark GPU CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe121bfe261717e930abdb4a905e5c01b7f47cc3 clk: qcom: gcc-sdm660: Mark MMSS NoC CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=785c02eb35009a4be6dbc68f4f7d916e90b7177d clk: qcom: gdsc: Implement NO_RET_PERIPH flag] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=731806da2916f7b0f0b86ac5f80b287f08bfcf42 drm/msm/dpu: Add prog_fetch_lines_worst_case to INTF_BLK macro] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d832ab30ce64abe30571bc12931a296a8a27c4d drm/msm/a5xx: Add support for Adreno 508, 509, 512 GPUs] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e49c2912dbfa81cbe62849e4695f967f81c9350c arm64: dts: qcom: sdm630: add ICE registers and clocks] by ebiggers<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71edb0b4fa0e3bc248df564ba01a0f7c41607c8e dt-bindings: phy: qcom-qusb2: Document SDM660 compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0e7f781fc9958bfb57527a49c5a1eb1f423439c phy: qcom-qusb2: Add configuration for SDM660] by kholk<br />
<br />
Commits merged in 5.13:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7014dfee4e83348d04c450c698ae29add6e9f58f interconnect: qcom: sdm660: Fix kerneldoc warning] by Georgi Djakov<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6761996a8c4d72bda053e18c548b0c392a189110 media: dt-bindings: media: camss: Add qcom,sdm660-camss binding] by Robert Foss<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f80a1d41432869dd78dfe8373060371918a05326 interconnect: qcom: Add SDM660 interconnect provider driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33ad2800348e6c20f05b86ef01e8216fc3e3c762 dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC] by kholk<br />
<br />
Commits merged in 5.15:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=90b7c1c66132c20e8a550006011a3cbfb73dbfc1 drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in poll_for_ready] by Marijn Suijten<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1878f4b7ec9ed013da8a7efb63fed1fbae0215ae arm64: dts: qcom: sdm630: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=13404ac8882f5225af07545215f4975a564c3740 interconnect: qcom: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf49e366020396ad83845c1c3bdbaa3c1406f5ce dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5833c9b8766298e73c11766f9585d4ea4fa785ff interconnect: qcom: sdm660: Correct NOC_QOS_PRIORITY shift and mask] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a06c2e5c048e5e07fac9daf3073bd0b6582913c7 interconnect: qcom: sdm660: Fix id of slv_cnoc_mnoc_cfg] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da09577ab562e2700f0aba3f17cc741717ca9e38 clk: qcom: gcc-sdm660: Replace usage of parent_names] by Bjorn Andersson<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a61ca021fe28ab7163ca879fc3532c3cca25063c clk: qcom: gcc-sdm660: Move parent tables after PLLs] by Stephen Boyd<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=462f7017a6918d152870bfb8852f3c70fd74b296 drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=639dfdbecd88ec05bda87b1d5d419afad50af21c arm64: dts: qcom: sdm630: don't use underscore in node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c81210e38966cfa1c784364e4035081c3227cf5b arm64: dts: qcom: sdm660: use reg value for memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfdf0c27639571d7a99d00fe1ce931daa6726c27 arm64: dts: qcom: sdm630: don't use empty memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=712e245fcbfd92f385ea5bc12af399d97953a298 arm64: dts: qcom: sdm630: Add DMA to I2C hosts] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=536f44285ff618087256f2059d0d6b5581d3748d arm64: dts: qcom: sdm630: Add I2C functions to I2C pins] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18abedf7d4e6d069f89ba056223a03ba1e17af3b arm64: dts: qcom: sdm630-nile: Remove gpio-keys autorepeat] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e634d8196f7da05b81a4574e1572ef559f1ba85f arm64: dts: qcom: sdm630-nile: Enable uSD card slot] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bc81940d8ca568f887d5337ccf97f104a60be955 arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8fc1c43c51b4aad8a88d2c968d2a63b5ef7ed13 arm64: dts: qcom: sdm630-nile: Add Synaptics touchscreen.] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c1d849ec047dde4e21dca7f20f300575307a660 arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fcbcd062a894067f1f622f927ed7c448723d6f06 arm64: dts: qcom: sdm630-nile: Add Volume up key] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c616239f255a66e5989e8fa5cdaefc25eec3d00 arm64: dts: qcom: sdm630-nile: Add USB] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=158f80a68148d7febdbcc3586d2d17e455453563 arm64: dts: qcom: sdm630-nile: Use &labels] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b36c824b9a77a8816258fdd00997a5f78542814 arm64: dts: qcom: sdm630-xperia-nile: Add all RPM and fixed regulators] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab290284398d8a33a5e7e9ebe7c7364b481f6dd8 arm64: dts: qcom: sdm660: Add required nodes for DSI1] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3d5d3cc69710344f152c6b65e54ccc8c818b9d4 arm64: dts: qcom: sdm630: Configure the camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c21512cbfbfdcb72ba3b41e714266149433b11c8 arm64: dts: qcom: sdm630: Add IMEM node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36c7b98f7935110ff5a65b49f03ae3bbf1cbe181 arm64: dts: qcom: Add device tree for SDM636] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=05aa0eb325c98f7e06eeb3f251cbab1b27586c8e arm64: dts: qcom: sdm660: Make the DTS an overlay on top of 630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bf09754050652885bc123454615ef4f74f9586c arm64: dts: qcom: pm660(l): Add VADC and temp alarm nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a1fbb121aa6d87c618f7f345c3c498cb8a65446 arm64: dts: qcom: pm660l: Support SPMI regulators on PMIC sid 3] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b56a804e58b1670cb8f17b66543facd21af4dd2 arm64: dts: qcom: pm660l: Add WLED support] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b59b058c623d274919b4cae5e0625f8231cbb474 arm64: dts: qcom: pm660: Support SPMI regulators on PMIC sid 1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5cf69dcbec8bd6620ecef601a6744489d5201e0e arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adc57d4a463b59ec7d3adf7125758de5a1db3944 arm64: dts: qcom: sdm630: Raise tcsr_mutex_regs size] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ca2ebc90a4624b361c9b7291d7cafa2deab2c1a arm64: dts: qcom: sdm630: Add ADSP remoteproc configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3332c59649fea6b00f437c20e294e8b29f07fca7 arm64: dts: qcom: sdm630: Add thermal-zones configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8236767599afb43d4e274cc56efecfe47c55332 arm64: dts: qcom: sdm630: Add modem/ADSP SMP2P nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c54b82b4545386bb576b7c5df5b8d4f95f11a5b arm64: dts: qcom: sdm630: Add TSENS node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=056d4ff8279a1df70eaf2fccb5977508c83627aa arm64: dts: qcom: sdm630: Add qcom,adreno-smmu compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6bb717fe56f67218715fd3b8eaf65bb1fe8f8458 arm64: dts: qcom: sdm630: Add clocks and power domains to SMMU nodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a64fa0e23b5f712828379319d20b32546e0cfb94 arm64: dts: qcom: sdm630: Add GPU Clock Controller node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=738777ab85ea9aced9e6e139be921c5dd89498f3 arm64: dts: qcom: sdm630: Add interconnect and opp table to sdhc_1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b700aa1b3e6240bc9885b18700c95bce6c1d948 arm64: dts: qcom: sdm630: Add SDHCI2 node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36a0d47aee6a8cfd3c6cf4274732d8ef994a25b4 arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c65a4ed2ea8bca368e8e8822b61f7309aa706171 arm64: dts: qcom: sdm630: Add USB configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=142662f8f43c1725418ff13a2c83fb218d2b0911 arm64: dts: qcom: sdm630: Add qfprom subnodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b52555d590d1609ea9577f25f06d366e397afe96 arm64: dts: qcom: sdm630: Add MDSS nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=045547a022529d29ad2ddc1981817743d1dac91e arm64: dts: qcom: sdm630: Add interconnect provider nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01b182d920a8147f185adfc5364952aeed9eb086 arm64: dts: qcom: sdm630: Add MMCC node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ce921ae3d30ef86f8313d753e07b67f9bcfc8f8 arm64: dts: qcom: sdm630: Add RPMPD nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=26e02c98a9ad63eb21b9be4ac92002f555130d3b arm64: dts: qcom: sdm630: Rewrite memory map] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0a77028c85ad1f6f36c3ceea21b30dc43721665 remoteproc: q6v5_pas: Add sdm660 ADSP PIL compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f35ef8e4ea0a2b2b35a2c7009fc07b6d80a2b2f3 dt-bindings: remoteproc: qcom: adsp: Add SDM660 ADSP] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0132bf6f395837fc77fb38ac3d2806d22426be51 drivers: usb: dwc3-qcom: Add sdm660 compatible] by konradybcio<br />
<br />
see also:<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Linux-SDM630-SDM660-Patches Article on Phoronix, Linux-SDM630-SDM660-Patches]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=54516
Xiaomi Redmi Note 7 (xiaomi-lavender)
2024-01-06T16:50:32Z
<p>Alexeymin: More updates on status</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android (MIUI)<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| type = Handset<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_emmc = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_audio = N<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status_sdcard = Y<br />
| status_accel = N<br />
| status_magnet = N<br />
| status_light = N<br />
| status_proximity = N<br />
| status_barometer = -<br />
| status_powersensor = -<br />
| status_irtx = -<br />
| status_irrx = -<br />
| status_hall = -<br />
| status_haptics = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 6.6<br />
| status_otg = N<br />
| status_nfc = N<br />
| status_fossbootloader = P<br />
| status_uboot = P<br />
| status_uboot_mainline = -<br />
| status_uboot_primary = N<br />
| status_uboot_secondary = P<br />
| status_uboot_internalstorage = Y<br />
| status_uboot_sd = N<br />
| status_uboot_usbhost = N<br />
| status_uboot_usbperipheral = N<br />
| status_uboot_screen = Y<br />
| status_uboot_keyboard = N<br />
| status_uboot_buttons = N<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/testing/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* [https://github.com/sdm660-mainline/linux Close-to mainline kernel source repository]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* {{issue|494|pmaports}} (OLD) How to make Wi-Fi work?<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=54515
Xiaomi Redmi Note 7 (xiaomi-lavender)
2024-01-06T16:34:54Z
<p>Alexeymin: update on recent features</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android (MIUI)<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| type = Handset<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = P<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 6.6<br />
| status_otg = N<br />
| status_nfc = N<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/testing/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* [https://github.com/sdm660-mainline/linux Close-to mainline kernel source repository]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* {{issue|494|pmaports}} (OLD) How to make Wi-Fi work?<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=54514
User:Alexeymin
2024-01-06T16:24:53Z
<p>Alexeymin: </p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User SourceHut|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|Test subject #1.2. For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|For occasional pmOS testing}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, almost like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Test subject #1.1. Old phone in good shape with new battery}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|I'll have to give up on this port temporarily}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|In my hands again! 6/64 variant}}<br />
{{Owns device|Xiaomi_Mi_Pad_4_(xiaomi-clover)|Mi Pad 4 PLUS actually}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|Daily driver, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|Test subject #2}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: [[Template:Infobox_device]], [[PostmarketOS:Templates]], [https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10 Search in Templates namespace]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Hardware_video_acceleration&diff=45170
Hardware video acceleration
2023-06-20T04:27:34Z
<p>Alexeymin: </p>
<hr />
<div>{{note|This page is a stub. Please contribute what you know!}}<br />
<br />
Hardware video acceleration makes it possible for the video card (FIXME: it is not video card) to decode/encode video, thus offloading the CPU and saving power.<br />
<br />
== Qualcomm Snapdragon ==<br />
<br />
On Qualcomm SoCs you can find a video encode and decode accelerator called Venus.<br />
<br />
Generally (with some exceptions) the following formats are supported with various performance at various resolutions:<br />
<br />
* '''Decode:''' H.264, HEVC, VP8, VP9, MPEG-2<br />
* '''Encode:''' H.264, HEVC, VP8<br />
<br />
== Samsung Exynos ==<br />
<br />
On Samsung SoCs you can find a video encode and decode accelerator called MFC (Multi Format Codec).<br />
<br />
=== Revisions ===<br />
<br />
There are several MFC versions:<br />
<br />
* v5: Exynos 4, S5PV210<br />
* v6: Exynos 5250<br />
* v7: Exynos 5420, 3250<br />
* v8: Exynos 5800<br />
<br />
=== Supported codecs ===<br />
<br />
==== MFC v5 ====<br />
<br />
* '''Decode:''' H264, VC1, MPEG4, MPEG2, H263, VC1RCV<br />
* '''Encode:''' H264, MPEG4, H263<br />
<br />
==== MFC v6+ ====<br />
<br />
* '''Decode:''' H264, H264 MVC, VC1, MPEG4, MPEG2, H263, VC1RCV, VP8, HEVC, VP9<br />
* '''Encode:''' H264, H264 MVC, MPEG4, H263, VP8, HEVC<br />
<br />
== Usage ==<br />
<br />
'''TODO: Add potential good examples and validate. Potential candidates:'''<br />
<br />
* https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-reference-manual/camera-and-video/video-decode<br />
* https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_450/625/626/632_(MSM8953)#Video_Encoder_.2F_Decoder_.28Venus.29<br />
* <code>gst-launch-1.0 videotestsrc ! videoconvert ! v4l2vp8enc ! queue ! v4l2vp8dec ! xvimagesink</code> (from https://wiki.postmarketos.org/wiki/Xiaomi_Mi_Note_2_(xiaomi-scorpio)#Mainline)<br />
* https://flathub.org/apps/com.github.rafostar.Clapper can use v4l2-request api<br />
* for v4l2m2m <code>ffmpeg -vcodec h264_v4l2m2m file.mp4</code> can be used for testing. there seem to be no apps supporting it besides ffplay <br />
<br />
[[Category:Technical Reference]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=44535
Xiaomi Redmi Note 7 (xiaomi-lavender)
2023-05-29T04:19:04Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = N<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 6.3<br />
| status_otg = Y<br />
| status_nfc = -<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Tested UIs ==<br />
* weston<br />
* xfce4<br />
* plasma-mobile<br />
<br />
=== Running Plasma Mobile UI on framebuffer backend ===<br />
See [[Plasma_Mobile#Software_rendering]]<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* {{Kernel package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/main/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* {{issue|494|pmaports}} How to make Wi-Fi work?<br />
* [https://github.com/sdm660-mainline/linux/tree/sdm660-next-stable Current mainline kernel development branch]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Redmi_Note_7_(xiaomi-lavender)&diff=44534
Xiaomi Redmi Note 7 (xiaomi-lavender)
2023-05-29T04:18:40Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Redmi Note 7<br />
| codename = xiaomi-lavender<br />
| image = File:Xiaomi-lavender-phosh-llvm.jpg<br />
| imagecaption = Redmi Note 7<br />
| releaseyear = 2019<br />
| category = testing<br />
| originalsoftware = Android<br />
| originalversion = 9 (MIUI 10)<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 32/64/128 GB<br />
| display = 1080 x 2340<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = N<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = Boots and has USB, framebuffer and touch<br />
| booting = yes<br />
| pmoskernel = 5.17.0<br />
| status_otg = Y<br />
| status_nfc = -<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Maintainer(s) ==<br />
* ''[[user:alexeymin|Alexey Min]]''<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
=== Fastboot boot ===<br />
In theory <code>pmbootstrap flasher boot</code> allows to directly boot kernel through USB without flashing it, but does not currently work. Bootloader does not like something about kernel compression:<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Bootloader UART logs during "pmbootstrap flasher boot":<br />
<div class="mw-collapsible-content"><br />
Handling Cmd: boot<br />
Booting Into Mission Mode<br />
avb_slot_verify.c:432: DEBUG: Loading vbmeta struct from partition 'vbmeta'.<br />
Partition found: vbmeta<br />
avb_slot_verify.c:627: ERROR: vbmeta: Public key used to sign data rejected.<br />
avb_slot_verify.c:704: DEBUG: vbmeta: VERIFICATION_DISABLED bit is set.<br />
avb_slot_verify.c:317: DEBUG: dtbo: Loading entire partition.<br />
Partition found: dtbo<br />
State: Unlocked, AvbSlotVerify returned ERROR_PUBLIC_KEY_REJECTED, continue boot<br />
VB2: Authenticate complete! boot state is: orange<br />
VB2: boot state: orange(1)<br />
Display menu is not enabled!<br />
Device is unlocked, Skipping boot verification<br />
VB2: BootState = 1<br />
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3<br />
ReadKeyInternal: Read KEY = 0x0<br />
bootstate = 4<br />
Cannot find GraphicsHandles.<br />
ImageWidth=1080,ImageHeight=1920,LogoPosX=0,LogoPosY=0<br />
Avoid flicking for 2160x1080 images <br />
Cannot find GraphicsHandles.<br />
Render Splash [3360687]<br />
VB2: RenderSplashScreen end , BootState = 4 <br />
No Ffbm cookie found, ignore: Not Found<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 3360690 ms<br />
Error in decompression: Something went wrong while decompression<br />
Decompressing kernel image failed!!!<br />
</div><br />
</div><br />
But it was reported to work for some people. Try it, might work for you<br />
<br />
== Installation ==<br />
<br />
* [[Installing_pmbootstrap|Install pmbootstrap]] first on your PC<br />
* make sure you have TWRP installed on the phone, it will help you to make backups:<br />
* backup <code>boot</code>, <code>dtbo</code> and <code>system</code> partitions first from TWRP, something like this, for example, to SD card:<br />
adb shell<br />
dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/backups/orig_boot.img<br />
dd if=/dev/block/bootdevice/by-name/dtbo of=/external_sd/backups/orig_dtbo.img<br />
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/backups/orig_system.img<br />
* zap & reinit pmbootstrap (<code>pmbootstrap -y zap ; pmbootstrap init</code>), choose <code>xiaomi-lavender</code> as a device<br />
* proceed with installation as usual: reboot device to fastboot mode, then:<br />
pmbootstrap install<br />
pmbootstrap flasher flash_kernel<br />
pmbootstrap flasher flash_rootfs<br />
pmbootstrap flasher flash_vbmeta<br />
<br />
For mainline kernel only (where nothing works except UART):<br />
fastboot erase dtbo<br />
<br />
And then<br />
fastboot reboot<br />
<br />
== Tested UIs ==<br />
* weston<br />
* xfce4<br />
* plasma-mobile<br />
<br />
=== Running Plasma Mobile UI on framebuffer backend ===<br />
See [[Plasma_Mobile#Software_rendering]]<br />
<br />
== Photos ==<br />
<gallery><br />
File:Lavender downstream weston.jpg|thumb|left|Weston on downstream kernel<br />
File:Lavender boot log sm.jpg|thumb|left|Lavender booting mainline<br />
File:Lavender_plamo_ds_01.jpg|thumb|left|PlaMo on fbdev 1<br />
File:Lavender_plamo_ds_02.jpg|thumb|left|PlaMo on fbdev 2<br />
File:RMN7_XFCE.png|thumb|left|X11 (Xfce) on fbdev<br />
File:Lavender_plasma_desktop_framebuffer.jpg|thumb|left|Plasma Desktop on fbdev<br />
</gallery><br />
<br />
== Additional info ==<br />
=== Partition list ===<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition list<br />
<div class="mw-collapsible-content"><br />
<br />
{| class="wikitable"<br />
|-<br />
! Device !! Label !! Size in blocks !! Size in bytes !! Stock FS<br />
|-<br />
| mmcblk0p1 || switch || 8 || 8192 ||<br />
|-<br />
| mmcblk0p2 || dpo || 8 || 8192 ||<br />
|-<br />
| mmcblk0p3 || fsc || 8 || 8192 ||<br />
|-<br />
| mmcblk0p4 || limits || 32 || 32768 ||<br />
|-<br />
| mmcblk0p5 || ssd || 32 || 32768 ||<br />
|-<br />
| mmcblk0p6 || sec || 20 || 20480 ||<br />
|-<br />
| mmcblk0p7 || vbmeta || 64 || 65536 ||<br />
|-<br />
| mmcblk0p8 || vbmetabak || 64 || 65536 ||<br />
|-<br />
| mmcblk0p9 || storsec || 128 || 128K ||<br />
|-<br />
| mmcblk0p10 || storsecbak || 128 || 128K ||<br />
|-<br />
| mmcblk0p11 || apdp || 256 || 256K ||<br />
|-<br />
| mmcblk0p12 || msadp || 256 || 256K ||<br />
|-<br />
| mmcblk0p13 || keystore || 512 || 512K ||<br />
|-<br />
| mmcblk0p14 || frp || 512 || 512K ||<br />
|-<br />
| mmcblk0p15 || rpm || 512 || 512K ||<br />
|-<br />
| mmcblk0p16 || rpmbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p17 || hyp || 512 || 512K ||<br />
|-<br />
| mmcblk0p18 || hypbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p19 || pmic || 512 || 512K ||<br />
|-<br />
| mmcblk0p20 || pmicbak || 512 || 512K ||<br />
|-<br />
| mmcblk0p21 || cmnlib || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p22 || cmnlibbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p23 || cmnlib64 || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p24 || cmnlib64bak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p25 || abl || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p26 || ablbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p27 || dip || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p28 || ddr || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p29 || toolsfv || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p30 || devcfgbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p31 || devcfg || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p32 || tz || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p33 || tzbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p34 || mdtpsecapp || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p35 || mdtpsecappbak || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p36 || keymaster || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p37 || keymasterbak || 1024 || 1024K ||<br />
|-<br />
| mmcblk0p38 || bluetooth || 1024 || 1024K || vfat<br />
|-<br />
| mmcblk0p39 || lsti || 2048 || 2048K ||<br />
|-<br />
| mmcblk0p40 || xbl || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p41 || xblbak || 3584 || 3584K ||<br />
|-<br />
| mmcblk0p42 || misc || 4096 || 4096K ||<br />
|-<br />
| mmcblk0p43 || devinfo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p44 || logfs || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p45 || fsg || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p46 || modemst1 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p47 || modemst2 || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p48 || dsp || 16384 || 16.0M || vfat<br />
|-<br />
| mmcblk0p49 || bk1 || 24576 || 24.0M ||<br />
|-<br />
| mmcblk0p50 || mdtp || 32768 || 32.0M ||<br />
|-<br />
| mmcblk0p51 || bk2 || 16384 || 16.0M ||<br />
|-<br />
| mmcblk0p52 || dtbo || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p53 || dtbobak || 8192 || 8192K ||<br />
|-<br />
| mmcblk0p54 || splash || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p55 || persist || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p56 || persistbak || 32768 || 32.0M || ext4<br />
|-<br />
| mmcblk0p57 || logdump || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p58 || modem || 196608 || 192M || vfat<br />
|-<br />
| mmcblk0p59 || rawdump || 131072 || 128M ||<br />
|-<br />
| mmcblk0p60 || boot || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p61 || recovery || 65536 || 64.0M ||<br />
|-<br />
| mmcblk0p62 || cache || 262144 || 256M || ext4<br />
|-<br />
| mmcblk0p63 || system || 3670016 || 3584M || ext4<br />
|-<br />
| mmcblk0p64 || vendor || 2097152 || 2048M || ext4<br />
|-<br />
| mmcblk0p65 || cust || 851968 || 832M || ext4<br />
|-<br />
| mmcblk0p66 || userdata || 22802415 || 21.7G || encrypted (dm-0)<br />
|-<br />
| mmcblk0rpmb || || 4096 ||<br />
|}<br />
<br />
</div><br />
</div><br />
<br />
=== Android Verified Boot (vbmeta) ===<br />
This device is using [[Android_Verified_Boot_(AVB)]] so, if you did not flash any custom Android ROM, you may need to flash <code>vbmeta</code> partition with <code>vbmeta.img</code> with verification disabled flag. pmbootstrap now can generate such empty vbmeta image and flash it with one command:<br />
$ pmbootstrap flasher flash_vbmeta<br />
<br />
=== DTBO partition ===<br />
This device is using a dedicated partition to store the [[Device_Tree_(dtb)|Device Tree Blob]] Overlay. Read more at https://source.android.com/devices/architecture/dto/partitions . <br />
<br />
Update: looks like '''dtbo''' partition is not used during boot by LineageOS's kernel, because it is using appended DTB (<code>CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y</code>)<br />
<br />
Update2: device tree from dtbo partition is used by bootloader to apply some fixups on top of appended dtb. Bootloader tries to apply overlay dtb from dtbo partition over a dtb found appended to kernel, and if it fails to do so, it falls back into fastboot mode. Example bootloader debug UART output in that case:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2700 ms<br />
Decompressing kernel image done: 2852 ms<br />
ufdt apply overlay failed<br />
Launching fastboot<br />
<br />
See also Zhuowei's notes on creating custom dtbo partition: https://gitlab.com/zhuowei/dtbo-google-crosshatch-mainline<br />
<br />
For mainline kernel just <code>fastboot erase dtbo</code> works. Bootloader ignores missing dtbo, example output when dtbo partition is erased:<br />
Memory Base Address: 0x40000000<br />
Decompressing kernel image start: 2641 ms<br />
Decompressing kernel image done: 2793 ms<br />
Dtbo hdr magic mismatch 0, with D7B7AB1E<br />
Best match DTB tags 317/00020008/0x00000000/0/1001B/102001A/0/0/(offset)0x97128304/(size)0x00000653<br />
Using pmic info 0x1001B/0x102001A/0x0/0x0 for device 0x2001B/0x102001A/0x0/0x0<br />
Memory Base Address: 0x40000000<br />
smem protocol = 9C2FA0A0<br />
board_id1 is 1<br />
board_id2 is 1<br />
board_id3 is 0<br />
board_id is 1<br />
get_boardid_from_smem,SUCCESS ,board_id=0x102,cpu_id=0x39148C8C,hwdefined=0<br />
PON Reason is 17 cold_boot:1 charger path: 1<br />
...(proceeding to normal boot procedure)...<br />
<br />
For downstream kernel, leave stock dtbo partition untouched.<br />
<br />
=== Bootloader cmdline ===<br />
Stock bootloader is doing nasty things with kernel command line: it passes a lot of arguments that make booting custom OS (like postmarketOS) impossible<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Full list of stock command line parameters:<br />
<div class="mw-collapsible-content"><br />
<pre><br />
ramoops_memreserve=4M<br />
<br />
rcupdate.rcu_expedited=1<br />
console=ttyMSM0,115200,n8<br />
androidboot.console=ttyMSM0<br />
earlycon=msm_serial_dm,0xc170000<br />
androidboot.hardware=qcom<br />
user_debug=31<br />
msm_rtb.filter=0x37<br />
ehci-hcd.park=3<br />
lpm_levels.sleep_disabled=1<br />
sched_enable_hmp=1<br />
sched_enable_power_aware=1<br />
service_locator.enable=1<br />
swiotlb=1<br />
firmware_class.path=/vendor/firmware_mnt/image<br />
loop.max_part=7<br />
androidboot.selinux=permissive<br />
buildvariant=eng<br />
<br />
androidboot.verifiedbootstate=orange<br />
androidboot.keymaster=1<br />
root=PARTUUID=2a7f6d6d-1c23-febe-7efb-9ccfa1432ace<br />
androidboot.bootdevice=c0c4000.sdhci<br />
androidboot.serialno=ac1dde4e<br />
androidboot.cpuid=0x39148c8c<br />
androidboot.dp=0x0<br />
androidboot.baseband=sdm<br />
mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt36672a_tianma_fhdplus_video:config0:1:none:cfg:single_dsi<br />
skip_initramfs<br />
rootwait<br />
ro<br />
init=/init<br />
androidboot.dtbo_idx=0<br />
androidboot.fpsensor=fpc<br />
androidboot.secureboot=1<br />
androidboot.hwc=Global<br />
androidboot.hwversion=1.29.0<br />
androidboot.hwlevel=MP<br />
androidboot.hwdevice=lavender<br />
</pre><br />
</div><br />
</div><br />
<br />
<code>ramoops_memreserve=4M</code> comes from defconfig, next from boot.img, others (starting with first <code>androidboot.</code> and below) come from bootloader directly.<br />
<br />
==== Harmful kernel command line params from bootloader ====<br />
Options like <code>root=</code>, <code>skip_initramfs</code> make kernel look for a specific partition to mount at /, skipping initramfs, which is incompatible with default booting methods of postmarketOS. That's why some tricky patches are needed like by opendata26: [https://gitlab.com/opendata26/linux/commit/40095e9a8b1eb32ad7ccd705c8990792e692ba1d init: ignore bootloader cmdline params for mounts]<br />
<br />
Some info on <code>skip_initramfs</code> kernel cmdline parameter: https://forum.xda-developers.com/apps/magisk/pixel-2-pixel-2-xl-support-t3697427/post74361728#post74361728<br />
<br />
=== Way to get boot log ===<br />
This device known to ship with the <code>oem getlog</code> fastboot command.<br />
<br />
This is not a trivial command to use, but it is extremely useful as it allows side-stepping the need to boot in a known working system to use the ramoops<br />
console. The output of the command is a jumble, but is still usable for figuring out early boot issues. It is much better than having to rely on a booted system to<br />
get the information, but still not as good as having a dedicated serial access.<br />
<br />
Example usage follows.<br />
<br />
<br />
$ fastboot oem getlog 2>&1<br />
(bootloader) [ 0.000000] Booting Linux on physical CPU 0x0<br />
[ 0.000<br />
(bootloader) 000] Initializing cgroup subsys cpuset<br />
[ 0.000000] Initi<br />
(bootloader) alizing cgroup subsys cpu<br />
[ 0.000000] Initializing cgrou<br />
(bootloader) p subsys cpuacct<br />
[ 0.000000] Initializing cgroup subsys<br />
(bootloader) schedtune<br />
[ 0.000000] Linux version 4.4.153 (nixbld@loca<br />
(bootloader) lhost) (gcc version 4.9.4 (GCC) ) #2 SMP PREEMPT Sat Nov 23<br />
(bootloader) 20:31:33 UTC 2019<br />
[ 0.000000] Boot CPU: AArch64 Process<br />
(bootloader) or [51af8014]<br />
[...]<br />
<br />
<br />
As the output of the command is on stderr, here's how to output to a file.<br />
<br />
<br />
$ fastboot oem getlog > log.txt 2>&1<br />
<br />
<br />
It is unknown if there are ways to make the output better. (Apply some kind error correction algorithm?)<br />
<br />
EDIT: seems to not work for me, whatever you do, the output is:<br />
<br />
$ fastboot oem getlog<br />
(bootloader) [Macle]Maybe no last kmsg<br />
OKAY [ 0.000s]<br />
Finished. Total time: 0.000s<br />
<br />
Probably needs a crash? But I can read pstore-console (dmesg) logs from booted TWRP recovery fine..<br />
<br />
[[File:Xiaomi-lavender-uart-pins.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins schematic]]<br />
[[File:Xiaomi-lavender-uart-pins-real-photo.jpg|200px|thumb|right|Xiaomi Redmi Note 7 (lavender) UART test pins photo]]<br />
<br />
=== Getting logs through debug UART ===<br />
<br />
You have to disassemble the phone (just removing back cover is enough). You'll have to heat up edges of the back cover (as shown in disassembling video, see '''Links''' below) before trying to remove it. Be careful! It is made of glass! Also be careful about fingerprint sensor connector, it is connected to a back cover you are trying to remove. Don't rip it.<br />
<br />
In the center you will see 4 test points that are available. (See the picture) Two bigger ones (0.8mm) are '''EDL''' (FORCE_USB_BOOT) pins. UART test points are two smaller ones on the left (0.5mm). TP11 is '''UART TX''' (gpio 4), TP10 is '''UART RX''' (gpio 5). GND is that whole metal shielding, that covers the center of the board. So, to get debug logs from UART it is enough to connect UART TX from the board to RX pin on the converter, and connect GND between phone and GND pin on the converter.<br />
<br />
== Links ==<br />
* {{MR|1095|pmaports}} Initial merge request<br />
* {{Device package|xiaomi-lavender}}<br />
* {{Kernel package|xiaomi-lavender}}<br />
* [https://gitlab.com/postmarketOS/pmaports/tree/master/main/linux-postmarketos-qcom-sdm660 Mainline kernel package]<br />
* {{issue|494|pmaports}} How to make Wi-Fi work?<br />
* [https://github.com/sdm660-mainline/linux/tree/sdm660-next-stable Current mainline kernel development branch]<br />
* [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)/Mainline_development|Mainline development BLOG]]<br />
* [https://github.com/NixOS/mobile-nixos/pull/28 NixOS-mobile lavender MR]<br />
* https://www.youtube.com/watch?v=6GqXqW2Nygc Disassembling video (Rus)<br />
* https://www.anandtech.com/show/11338/qualcomm-announces-snapdragon-660-630-mobile-platforms<br />
* List of mobile phones on SDM660 SoC: [https://www.kimovil.com/en/list-smartphones-by-processor/qualcomm-snapdragon-660-msm8976-plus 1], [https://www.gsmarena.com/results.php3?nRamMin=2000&sFreeText=sdm660 2]<br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=File:Xiaomi-lavender-phosh-llvm.jpg&diff=44533
File:Xiaomi-lavender-phosh-llvm.jpg
2023-05-29T04:17:41Z
<p>Alexeymin: </p>
<hr />
<div></div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=HMD_Global_Nokia_6.1_(nokia-PL2)&diff=44211
HMD Global Nokia 6.1 (nokia-PL2)
2023-05-19T03:24:15Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = HMD Global<br />
| name = Nokia 6.1<br />
| codename = nokia-PL2<br />
| image = File:Nokia-6-2018-1.jpg<br />
| imagecaption = Nokia 6.1<br />
| releaseyear = 2018<br />
| originalsoftware = Android<br />
| originalversion = 8.1<br />
| extendedversion = 10<br />
| pmoskernel = 4.4.302<br />
| chipset = Qualcomm Snapdragon 630 (SDM630)<br />
| cpu = Octa-core 2.2 GHz Cortex-A53<br />
| gpu = Adreno 508<br />
| storage = 32/64 GB<br />
| display = 1080x1920 IPS<br />
| memory = 3/4 GB<br />
| architecture = aarch64<br />
| type = handset<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = P<br />
| status_flashing = Y<br />
| status_touch = P<br />
| status_screen = P<br />
| status_wifi = <br />
| status_xwayland = <br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = P<br />
| status_3d = <br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = <br />
| status_nfc = <br />
| status_usba = -<br />
| status_hdmidp = -<br />
| status_keyboard = -<br />
| status_touchpad = -<br />
| status_irtx = -<br />
| status_trustzone = <br />
| status_accel = <br />
| status_magnet = <br />
| status_light = <br />
| status_proximity = <br />
| status_hall = -<br />
| status_barometer = -<br />
| status_powersensor = -<br />
| status_fossbootloader = <br />
| booting = yes<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_630_(SDM630)|Snapdragon 630}}<br />
<br />
__TOC__<br />
<br />
== Contributors ==<br />
* [[User:FieryFlames|FieryFlames]]<br />
* [[user:Frost_I7|Frost_I7]] (''I'll try to keep the wiki page up-to-date with the available info when I'm active.'')<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
<!--<br />
== Information ==<br />
--><br />
<br />
== How to enter flash mode ==<br />
Hold {{Button|Power}} + {{Button|Volume Down}} (while connected to the USB) to boot into the fastboot.<br />
<br />
<!--<br />
== Installation ==<br />
--><br />
<br />
== Hardware ==<br />
{{note|W.I.P.}}<br />
{|class="wikitable feature-colors"<br />
! Feature<br />
! Hardware<br />
! Mainline<br />
! Links<br />
! Notes<br />
|-<br />
| GPU<br />
| Adreno 508<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/msm/adreno/a5xx_gpu.c Mainline driver]<br />
| <br />
|-<br />
| Panel<br />
| FT8716<br />
| N<br />
| <br />
| Works with the simple panel driver.<br />
|-<br />
| rowspan=2 | Touchscreen<br />
| Focaltech<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/touchscreen/edt-ft5x06.c Mainline driver]<br />
| Not the exact same chip, but the driver works.<br />
|-<br />
| Goodix GT1X<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/touchscreen/goodix.c Mainline driver]<br />
| <br />
|-<br />
| Wi-Fi<br />
| WCN3990<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k Mainline driver]<br />
| <br />
|-<br />
| Accelerometer</br>Gyroscope<br />
| BMI160<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/imu/bmi160 Mainline driver]<br />
| <br />
|-<br />
| Magnetometer<br />
| MMC3630KJ<br />
| N<br />
| <br />
|-<br />
| Ambient Light</br>Proximity<br />
| STK3X1X<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/light/stk3310.c Mainline driver]<br />
| <br />
|-<br />
|}<br />
<br />
== GPU ==<br />
The freedreno driver currently suffers from bugs causing large amounts of rendering artifacts on FD5xx chips. This can be worked around, at least for Phosh, by setting the environment variable <code>FD_MESA_DEBUG=inorder,gmem</code>.<br />
<br />
== Mainline ==<br />
The mainline kernel is somewhat easy to get up and running. The only things missing are the device tree and drivers for a ''few'' things.<br />
<br />
== Downstream ==<br />
The LineageOS kernel can be used, but it needs a few patches to make it work ''properly''.<br />
<br />
== See also ==<br />
* [https://wiki.lineageos.org/devices/PL2/ LineageOS device page]<br />
** [https://github.com/LineageOS/android_kernel_nokia_sdm660 LineageOS kernel]<br />
** [https://github.com/LineageOS/android_device_nokia_sdm660-common LineageOS common files]<br />
** [https://github.com/LineageOS/android_device_nokia_PL2 LineageOS device specific files]<br />
* [https://github.com/sdm660-mainline/linux/pull/6 W.I.P. Device Tree PR]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=HMD_Global_Nokia_6.1_(nokia-PL2)&diff=44210
HMD Global Nokia 6.1 (nokia-PL2)
2023-05-19T03:23:39Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = HMD Global<br />
| name = Nokia 6.1<br />
| codename = nokia-PL2<br />
| image = File:Nokia-6-2018-1.jpg<br />
| imagecaption = Nokia 6.1<br />
| releaseyear = 2018<br />
| originalsoftware = Android<br />
| originalversion = 8.1<br />
| extendedversion = 10<br />
| pmoskernel = 4.4.302<br />
| chipset = Qualcomm Snapdragon 630 (SDM630)<br />
| cpu = Octa-core 2.2 GHz Cortex-A53<br />
| gpu = Adreno 508<br />
| storage = 32/64 GB<br />
| display = 1080x1920 IPS<br />
| memory = 3/4 GB<br />
| architecture = aarch64<br />
| type = handset<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = P<br />
| status_flashing = Y<br />
| status_touch = P<br />
| status_screen = P<br />
| status_wifi = <br />
| status_xwayland = <br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = P<br />
| status_3d = <br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status_otg = <br />
| status_nfc = <br />
| status_usba = -<br />
| status_hdmidp = -<br />
| status_keyboard = -<br />
| status_touchpad = -<br />
| status_irtx = -<br />
| status_trustzone = <br />
| status_accel = <br />
| status_magnet = <br />
| status_light = <br />
| status_proximity = <br />
| status_hall = -<br />
| status_barometer = -<br />
| status_powersensor = -<br />
| status_fossbootloader = <br />
| booting = yes<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
__TOC__<br />
<br />
== Contributors ==<br />
* [[User:FieryFlames|FieryFlames]]<br />
* [[user:Frost_I7|Frost_I7]] (''I'll try to keep the wiki page up-to-date with the available info when I'm active.'')<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
<!--<br />
== Information ==<br />
--><br />
<br />
== How to enter flash mode ==<br />
Hold {{Button|Power}} + {{Button|Volume Down}} (while connected to the USB) to boot into the fastboot.<br />
<br />
<!--<br />
== Installation ==<br />
--><br />
<br />
== Hardware ==<br />
{{note|W.I.P.}}<br />
{|class="wikitable feature-colors"<br />
! Feature<br />
! Hardware<br />
! Mainline<br />
! Links<br />
! Notes<br />
|-<br />
| GPU<br />
| Adreno 508<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/msm/adreno/a5xx_gpu.c Mainline driver]<br />
| <br />
|-<br />
| Panel<br />
| FT8716<br />
| N<br />
| <br />
| Works with the simple panel driver.<br />
|-<br />
| rowspan=2 | Touchscreen<br />
| Focaltech<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/touchscreen/edt-ft5x06.c Mainline driver]<br />
| Not the exact same chip, but the driver works.<br />
|-<br />
| Goodix GT1X<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/input/touchscreen/goodix.c Mainline driver]<br />
| <br />
|-<br />
| Wi-Fi<br />
| WCN3990<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k Mainline driver]<br />
| <br />
|-<br />
| Accelerometer</br>Gyroscope<br />
| BMI160<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/imu/bmi160 Mainline driver]<br />
| <br />
|-<br />
| Magnetometer<br />
| MMC3630KJ<br />
| N<br />
| <br />
|-<br />
| Ambient Light</br>Proximity<br />
| STK3X1X<br />
| Y<br />
| [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/light/stk3310.c Mainline driver]<br />
| <br />
|-<br />
|}<br />
<br />
== GPU ==<br />
The freedreno driver currently suffers from bugs causing large amounts of rendering artifacts on FD5xx chips. This can be worked around, at least for Phosh, by setting the environment variable <code>FD_MESA_DEBUG=inorder,gmem</code>.<br />
<br />
== Mainline ==<br />
The mainline kernel is somewhat easy to get up and running. The only things missing are the device tree and drivers for a ''few'' things.<br />
<br />
== Downstream ==<br />
The LineageOS kernel can be used, but it needs a few patches to make it work ''properly''.<br />
<br />
== See also ==<br />
* [https://wiki.lineageos.org/devices/PL2/ LineageOS device page]<br />
** [https://github.com/LineageOS/android_kernel_nokia_sdm660 LineageOS kernel]<br />
** [https://github.com/LineageOS/android_device_nokia_sdm660-common LineageOS common files]<br />
** [https://github.com/LineageOS/android_device_nokia_PL2 LineageOS device specific files]<br />
* [https://github.com/sdm660-mainline/linux/pull/6 W.I.P. Device Tree PR]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Pad_4_(xiaomi-clover)&diff=44127
Xiaomi Mi Pad 4 (xiaomi-clover)
2023-05-14T23:26:01Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Pad 4<br />
| codename = xiaomi-clover<br />
| image = File:xiaomi-clover.jpg<br />
| imagecaption = Mi Pad 4 running Sxmo<br />
| releaseyear = 2018<br />
| originalsoftware = Android 8<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Qualcomm Kryo 260 Silver @ 1.8GHz + 4x Qualcomm Kryo 260 Gold @ 2.2GHz<br />
| gpu = Adreno 512<br />
| storage = 32GB<br />
| display = 1920x1200 IPS<br />
| memory = 3GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = N<br />
| status_mainline = Y<br />
| status_battery = N<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = booting<br />
| booting = yes<br />
| pmoskernel = 5.10<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* nergzd723<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
<br />
== Installation ==<br />
Follow Installation guide.<br />
<br />
== Additional information ==<br />
=== UART pins location ===<br />
[[File:Xiaomi_clover_uart.png|200px|Xiaomi Mi PAD 4 (clover) UART test pins]]<br />
<br />
== See also ==<br />
* {{MR|2003|pmaports}} Initial merge request<br />
* Deviceinfo HW links: [http://www.deviceinfohw.ru/devices/item.php?item=78188 Mi Pad 4], [http://www.deviceinfohw.ru/devices/item.php?item=81215 Mi Pad 4 PLUS]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_POCO_F2_Pro_(xiaomi-lmi)&diff=38122
Xiaomi POCO F2 Pro (xiaomi-lmi)
2023-04-07T11:36:32Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = POCO F2 Pro (Redmi K30 Pro)<br />
| codename = xiaomi-lmi<br />
| image = File:Xiaomi-poco-f2-pro.jpg<br />
| imagecaption = POCO F2 Pro<br />
| releaseyear = 2020<br />
| category = testing<br />
| originalsoftware = Android 10, MIUI 12<br />
| chipset = Qualcomm Snapdragon 865 (SM8250)<br />
| cpu = 8-core (1x 2.84 GHz Kryo 585 & 3x 2.42 GHz Kryo 585 & 4x 1.80 GHz Kryo 585)<br />
| gpu = Adreno 650<br />
| storage = 128/256 GB<br />
| display = 1080 x 2400<br />
| memory = 6/8 GB<br />
| architecture = aarch64<br />
| status_usbnet = <br />
| status_flashing = <br />
| status_touch = <br />
| status_screen = <br />
| status_wifi = <br />
| status_xwayland = <br />
| status_fde = <br />
| status_mainline = P<br />
| status_battery = <br />
| status_3d = <br />
| status_accel = <br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status = none<br />
| booting = no<br />
| pmoskernel = <br />
| whet_dhry = <br />
| status_otg = <br />
}}<br />
<br />
The device is also known as '''Xiaomi Redmi K30 Pro'''. Some resources call POCO F2 Pro a "rebranded version of Redmi K30 Pro".<br />
<br />
== Contributors ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Maintainer(s) ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
<br />
== Links ==<br />
* [https://www.gsmarena.com/xiaomi_poco_f2_pro-10220.php GSMARENA]<br />
* [http://www.deviceinfohw.ru/devices/item.php?item=74897 Deviceinfo HW link]<br />
* [https://github.com/ungeskriptet/linux/tree/xiaomi-lmi Mainline kernel]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Pad_4_(xiaomi-clover)&diff=38120
Xiaomi Mi Pad 4 (xiaomi-clover)
2023-04-07T10:10:28Z
<p>Alexeymin: Add xiaomi-clover debug UART pins schematic</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Pad 4<br />
| codename = xiaomi-clover<br />
| image = File:xiaomi-clover.jpg<br />
| imagecaption = Mi Pad 4 running Sxmo<br />
| releaseyear = 2018<br />
| originalsoftware = Android 8<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Qualcomm Kryo 260 Silver @ 1.8GHz + 4x Qualcomm Kryo 260 Gold @ 2.2GHz<br />
| gpu = Adreno 512<br />
| storage = 32GB<br />
| display = 1920x1200 IPS<br />
| memory = 3GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = N<br />
| status_mainline = Y<br />
| status_battery = N<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = booting<br />
| booting = yes<br />
| pmoskernel = 5.10<br />
}}<br />
<br />
== Contributors ==<br />
* nergzd723<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
<br />
== Installation ==<br />
Follow Installation guide.<br />
<br />
== Additional information ==<br />
=== UART pins location ===<br />
[[File:Xiaomi_clover_uart.png|200px|Xiaomi Mi PAD 4 (clover) UART test pins]]<br />
<br />
== See also ==<br />
* {{MR|2003|pmaports}} Initial merge request<br />
* Deviceinfo HW links: [http://www.deviceinfohw.ru/devices/item.php?item=78188 Mi Pad 4], [http://www.deviceinfohw.ru/devices/item.php?item=81215 Mi Pad 4 PLUS]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=File:Xiaomi_clover_uart.png&diff=38119
File:Xiaomi clover uart.png
2023-04-07T10:06:30Z
<p>Alexeymin: Alexeymin uploaded a new version of File:Xiaomi clover uart.png</p>
<hr />
<div>== Summary ==<br />
xiaomi-clover (Xiaomi Mi PAD 4) debug UART RX/TX pins board schematic<br />
== Licensing ==<br />
{{subst:No license from license selector|Somewebsite}}</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=File:Xiaomi_clover_uart.png&diff=38118
File:Xiaomi clover uart.png
2023-04-07T09:56:23Z
<p>Alexeymin: xiaomi-clover (Xiaomi Mi PAD 4) debug UART RX/TX pins board schematic</p>
<hr />
<div>== Summary ==<br />
xiaomi-clover (Xiaomi Mi PAD 4) debug UART RX/TX pins board schematic<br />
== Licensing ==<br />
{{subst:No license from license selector|Somewebsite}}</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Linusw&diff=38063
User:Linusw
2023-04-03T15:04:57Z
<p>Alexeymin: a little formatting change</p>
<hr />
<div>== Info ==<br />
<br />
'''Country:''' Sweden<br />
<br />
'''Languages:''' Swedish, English and a little Hungarian<br />
<br />
I worked on the kernel for [[ST-Ericsson NovaThor U8500]] when it was developed. I am a maintainer of GPIO and pin control in the upstream Linux kernel.<br />
<br />
== Devices ==<br />
<br />
<div style="float: right;"><br />
{{User_main_device|Samsung_Galaxy_Xcover_2_(samsung-skomer)}}<br />
</div><br />
<br />
{{My devices}}<br />
{{Owns device|Samsung_Galaxy_Ace_2_(samsung-codina)}}<br />
{{Owns device|Samsung_Galaxy_Amp_(samsung-kyle)}}<br />
{{Owns device|Samsung_Galaxy_Beam_(samsung-gavini)}}<br />
{{Owns device|Samsung_Galaxy_Exhibit_(samsung-codina-tmo)}}<br />
{{Owns device|Samsung_Galaxy_S_Advance_(samsung-janice)}}<br />
{{Owns device|Samsung_Galaxy_S_III_mini_(samsung-golden)}}<br />
{{Owns device|Samsung_Galaxy_Xcover_2_(samsung-skomer)}}<br />
<br />
== Compiling phoc and phosh from source on a device ==<br />
<br />
Yeah I did this crazy thing to rebuild phoc and phosh from source, on the device, and execute it. This was to test phosh 0.20 and fix bugs in phosh. I did this as root on [[Samsung Galaxy S Advance (samsung-janice)|Samsung Janice]] which is a dual-core Cortex-A9. It took some time to compile but not forever. Phoc is quick, phosh takes an hour+.<br />
<br />
=== Add required packages ===<br />
<br />
<code>apk add gcc cmake meson ninja musl-dev fribidi-dev gcr-dev gnome-desktop-dev libgudev-dev pulseaudio-dev callaudiod-dev networkmanager-dev polkit-dev elogind-dev polkit-elogind-dev libsecret-dev upower-dev linux-pam-dev glade-dev feedbackd-dev libhandy1-dev gtk+3.0-dev libinput-dev libseat-dev xcb-util-wm-dev libxcb-dev</code><br />
<br />
=== Clone the phoc and phosh source code ===<br />
<br />
<code>mkdir /src && cd /src && git clone https://gitlab.gnome.org/World/Phosh/phoc.git && git clone https://gitlab.gnome.org/World/Phosh/phosh.git</code><br />
<br />
=== Compile phoc and phosh ===<br />
<br />
<code>cd /src/phoc && meson . _build && ninja -C _build</code><br />
<br />
<code>cd /src/phosh && meson . _build && ninja -C _build</code><br />
<br />
=== Execute the development versions by default ===<br />
<br />
Edit <code>/var/lib/tinydm/default-session.desktop</code><br />
<br />
Set:<br />
<br />
<code>Exec=dbus-run-session /src/phoc/_build/run -C /src/phosh/data/phoc.ini -E /src/phosh/_build/run</code><br />
<br />
It should come up when you reboot.<br />
<br />
=== Get debug messages out ===<br />
<br />
Modify the last line of <code>/src/phosh/_build/run</code> to something like this:<br />
<br />
<code>exec ${WRAPPER} "${ABS_BUILDDIR}/src/phosh" -U $@ > /var/tmp/phosh.log</code><br />
<br />
Then use <code>g_debug()</code> to print debug messages and they will appear in the log file.</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=37849
User:Alexeymin
2023-03-29T14:26:30Z
<p>Alexeymin: new device get</p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User SourceHut|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|Test subject #1.2. For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|For occasional pmOS testing}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, almost like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Test subject #1.1. Old phone in good shape with new battery}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|I'll have to give up on this port temporarily, to keep sanity}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|In my hands again! 6/64 variant}}<br />
{{Owns device|Xiaomi_Mi_Pad_4_(xiaomi-clover)|Mi Pad 4 PLUS actually}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|Daily driver, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|Test subject #2}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: [[Template:Infobox_device]], [[PostmarketOS:Templates]], [https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10 Search in Templates namespace]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Pad_4_(xiaomi-clover)&diff=37848
Xiaomi Mi Pad 4 (xiaomi-clover)
2023-03-29T14:25:37Z
<p>Alexeymin: /* See also */ deviceinfo hw links</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Pad 4<br />
| codename = xiaomi-clover<br />
| image = File:xiaomi-clover.jpg<br />
| imagecaption = Mi Pad 4 running Sxmo<br />
| releaseyear = 2018<br />
| originalsoftware = Android 8<br />
| chipset = Qualcomm Snapdragon 660 (SDM660)<br />
| cpu = 4x Qualcomm Kryo 260 Silver @ 1.8GHz + 4x Qualcomm Kryo 260 Gold @ 2.2GHz<br />
| gpu = Adreno 512<br />
| storage = 32GB<br />
| display = 1920x1200 IPS<br />
| memory = 3GB<br />
| architecture = aarch64<br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = Y<br />
| status_fde = N<br />
| status_mainline = Y<br />
| status_battery = N<br />
| status_3d = N<br />
| status_accel = N<br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = booting<br />
| booting = yes<br />
| pmoskernel = 5.10<br />
}}<br />
<br />
== Contributors ==<br />
* nergzd723<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
<br />
== Installation ==<br />
Follow Installation guide.<br />
<br />
== See also ==<br />
* {{MR|2003|pmaports}} Initial merge request<br />
* Deviceinfo HW links: [http://www.deviceinfohw.ru/devices/item.php?item=78188 Mi Pad 4], [http://www.deviceinfohw.ru/devices/item.php?item=81215 Mi Pad 4 PLUS]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Inspecting_the_initramfs&diff=37520
Inspecting the initramfs
2023-03-24T20:15:56Z
<p>Alexeymin: /* Enable initramfs-extra */</p>
<hr />
<div>{{note|This is considered a '''security hole'''. Only use it for debugging, and uninstall the debug-shell hook afterwards.}}<br />
<br />
This page explains how to connect to your device when it has booted to the [[Initramfs-development|initramfs]] by installing the '''debug-shell''' hook. This is useful if you want to know more about the boot process, simply inspect the initramfs or if you want to debug why something doesn't work.<br />
<br />
It is possible to enable a telnet daemon that gives you a shell this way:<br />
<br />
<source lang="shell-session"><br />
$ pmbootstrap initfs hook_add debug-shell<br />
$ pmbootstrap flasher flash_kernel # or however you flash/boot the kernel<br />
(wait until the device booted up and you are connected to it)<br />
$ telnet 172.16.42.1<br />
Trying 172.16.42.1...<br />
Connected to 172.16.42.1.<br />
Escape character is '^]'.<br />
<br />
Type 'pmos_continue_boot' to continue booting:<br />
# echo "hello world"<br />
hello world<br />
# pmos_continue_boot<br />
Connection closed by foreign host.<br />
</source><br />
<br />
If the telnet command does not work out of the box, read [[connect via USB Networking in the Initramfs]].<br />
<br />
=== Enable initramfs-extra ===<br />
<br />
To enable functionality from initramfs-extra, run the following commands in the telnet shell:<br />
<source lang="shell-session"><br />
# . /etc/deviceinfo<br />
# . /init_functions.sh<br />
# mount_boot_partition /boot<br />
Mount boot partition (/dev/dm-0)<br />
# extract_initramfs_extra /boot/initramfs-extra<br />
Extract /boot/initramfs-extra<br />
24128 blocks<br />
</source><br />
<br />
In general, while inspecting the initramfs, you can execute commands in order listed in [https://gitlab.com/postmarketOS/pmaports/-/blob/master/main/postmarketos-initramfs/init.sh postmarketos-initramfs/init.sh], starting with the line <code>mount_boot_partition /boot</code> and below (everything above it was already executed before entering debug-shell).<br />
<br />
=== Additional programs ===<br />
After installing the <code>debug-shell</code> initramfs hook, the <code>evtest</code>, <code>fftest</code> and <code>fbdebug</code> programs are available in the initramfs ({{github|1358}}).<br />
<br />
=== Deleting the debug shell ===<br />
<source lang="shell-session"><br />
pmbootstrap initfs hook_del debug-shell<br />
</source><br />
<br />
=== Tips and tricks ===<br />
* [http://www.microhowto.info/howto/copy_a_file_from_one_machine_to_another_using_netcat.html copy files to/from the initramfs with <code>nc</code> while it is running]<br />
<br />
[[Category:Guide]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Inspecting_the_initramfs&diff=37519
Inspecting the initramfs
2023-03-24T20:13:48Z
<p>Alexeymin: /* Enable initramfs-extra */</p>
<hr />
<div>{{note|This is considered a '''security hole'''. Only use it for debugging, and uninstall the debug-shell hook afterwards.}}<br />
<br />
This page explains how to connect to your device when it has booted to the [[Initramfs-development|initramfs]] by installing the '''debug-shell''' hook. This is useful if you want to know more about the boot process, simply inspect the initramfs or if you want to debug why something doesn't work.<br />
<br />
It is possible to enable a telnet daemon that gives you a shell this way:<br />
<br />
<source lang="shell-session"><br />
$ pmbootstrap initfs hook_add debug-shell<br />
$ pmbootstrap flasher flash_kernel # or however you flash/boot the kernel<br />
(wait until the device booted up and you are connected to it)<br />
$ telnet 172.16.42.1<br />
Trying 172.16.42.1...<br />
Connected to 172.16.42.1.<br />
Escape character is '^]'.<br />
<br />
Type 'pmos_continue_boot' to continue booting:<br />
# echo "hello world"<br />
hello world<br />
# pmos_continue_boot<br />
Connection closed by foreign host.<br />
</source><br />
<br />
If the telnet command does not work out of the box, read [[connect via USB Networking in the Initramfs]].<br />
<br />
=== Enable initramfs-extra ===<br />
<br />
To enable functionality from initramfs-extra, run the following commands in the telnet shell:<br />
<source lang="shell-session"><br />
# . /etc/deviceinfo<br />
# . /init_functions.sh<br />
# mount_boot_partition /boot<br />
Mount boot partition (/dev/dm-0)<br />
# extract_initramfs_extra /boot/initramfs-extra<br />
Extract /boot/initramfs-extra<br />
24128 blocks<br />
</source><br />
<br />
In general, while inspecting the initramfs, you can execute commands in order listed in [https://gitlab.com/postmarketOS/pmaports/-/blob/master/main/postmarketos-initramfs/init.sh postmarketos-initramfs/init.sh], starting with the line <code>mount_boot_partition /boot</code> and below (everything above is was already executed before entering debug-shell).<br />
<br />
=== Additional programs ===<br />
After installing the <code>debug-shell</code> initramfs hook, the <code>evtest</code>, <code>fftest</code> and <code>fbdebug</code> programs are available in the initramfs ({{github|1358}}).<br />
<br />
=== Deleting the debug shell ===<br />
<source lang="shell-session"><br />
pmbootstrap initfs hook_del debug-shell<br />
</source><br />
<br />
=== Tips and tricks ===<br />
* [http://www.microhowto.info/howto/copy_a_file_from_one_machine_to_another_using_netcat.html copy files to/from the initramfs with <code>nc</code> while it is running]<br />
<br />
[[Category:Guide]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_Snapdragon_660/630/636_(SDM660/SDM630/SDM636)&diff=37514
Qualcomm Snapdragon 660/630/636 (SDM660/SDM630/SDM636)
2023-03-24T15:50:49Z
<p>Alexeymin: /* SMMUs / IOMMUs */</p>
<hr />
<div>{{Infobox soc<br />
| name = SDM630<br />
| image = File:Qualcomm_SDM630.jpg<br />
| imagecaption = Qualcomm SDM630 in ceramic package<br />
| codenames = msmtriton/apqtriton<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster<br />
| gpu = Adreno 508<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = P<br />
| status_gpu = <br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_audio = <br />
| status_video = <br />
| status_thermal = P<br />
| status_wifi = <br />
| status_bluetooth = <br />
| status_modem = P<br />
| status_camera = <br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM636<br />
| image = File:Qualcomm_SDM636.jpg<br />
| imagecaption = Qualcomm SDM636 in ceramic package<br />
| codenames = <br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x Kryo 260 Gold PERF cluster + 4x Kryo 260 Silver PWR cluster<br />
| gpu = Adreno 509<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = Y<br />
| status_usb = P<br />
| status_display = <br />
| status_gpu = <br />
| status_pinctrl = Y<br />
| status_i2c = Y<br />
| status_audio = <br />
| status_video = <br />
| status_thermal = <br />
| status_wifi = <br />
| status_bluetooth = <br />
| status_modem = <br />
| status_camera = <br />
}}<br />
<br />
{{Infobox soc<br />
| name = SDM660<br />
| image = File:Qualcomm_SDM660.jpg<br />
| imagecaption = Qualcomm SDM660 in ceramic package<br />
| codenames = msmfalcon/apqfalcon<br />
| manufacturer = Qualcomm<br />
| arch = aarch64<br />
| cpu = 4x 2.2 GHz Kryo 260 Gold, 4x 1.84 GHz Kryo 260 Silver<br />
| gpu = Adreno 512<br />
| year = 2017<br />
| process = 14<br />
| mainline = yes<br />
| community_page = https://github.com/sdm660-mainline<br />
| status_cpu = P<br />
| status_uart = Y<br />
| status_storage = P<br />
| status_usb = P<br />
| status_display = <br />
| status_gpu = <br />
| status_pinctrl = Y<br />
| status_i2c = <br />
| status_audio = <br />
| status_video = <br />
| status_thermal = <br />
| status_wifi = <br />
| status_bluetooth = <br />
| status_modem = <br />
| status_camera = <br />
}}<br />
<br />
== General description ==<br />
[https://www.qualcomm.com/products/sdm660 SDM660]/636/[https://fccid.io/PY7-67442A/Schematics/Schematics-20171116-v1-PY7-67442A-Schematic-Diagram-3652761 630] are Qualcomm SoCs released in 2017, with mostly out-of-tree mainline support.<br />
<br />
According to [https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems-on-chip#Snapdragon_630,_636_and_660_(2017) Wikipedia], they all are pretty similar. Their advantage is price; these SoCs are usually used in middle-range devices.<br />
<br />
Closest similar SoC is [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998 Snapdragon 835]] (which has decent mainline support), and it seems that several drivers from [[Qualcomm_Snapdragon_835_(MSM8998)|MSM8998]] can be reused for SDM660.<br />
<br />
== Devices ==<br />
=== SDM660 (Snapdragon 660) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 660 (SDM660)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM636 (Snapdragon 636) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 636 (SDM636)'<br />
|more results text=<br />
}}<br />
<br />
=== SDM630 (Snapdragon 630) ===<br />
{{#cargo_query:<br />
tables=Devices<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,StatusMainline=Mainline<br />
|order by=Devices.Manufacturer, Devices.Name<br />
|format=table<br />
|limit=9999<br />
|where=Devices.chipset='Qualcomm Snapdragon 630 (SDM630)'<br />
|more results text=<br />
}}<br />
<br />
== Battery/Charging == <br />
Most devices seem to use the PMIC-provided QPNP-charger which currently does not have a mainline driver.<br />
<br />
== CPU ==<br />
All cores are up, PSCI is working. Marked as partial because there is no support for CPU frequency scaling. <br />
It is advised to use only 4 CPUs for now due to the lack of cluster interconnect scaling, which results in 8 cores being slower than 4.<br />
<br />
== Display ==<br />
At least four 630 boards can successfully use display (both command- and video-mode) via DRM/MSM (and of course CPU rendering) with some (for now) out-of-tree patches.<br />
Most devices make use of PMIC-provided WLED backlight, which does have a mainline driver, but there happens to be an issue with it not working.<br />
<br />
== GPU ==<br />
Adreno 508/509/512 are not supported in the mainline kernel yet.<br />
<br />
There are patches sent to upstream for enabling support for those GPUs.<br />
See kholk commits to upstream for more info<br />
<br />
== Modem Subsystem ==<br />
The remote processor responsible for modem subsystem shows up and shows *some* signs of life, but neither the modem itself, nor the Wi-Fi chip currently work. The phone also gets very hot with it enabled, which might suggest it's not really fine right now. Of course it needs firmware.<br />
<br />
== Pinctrl ==<br />
Was ported from downstream kernel to mainline by [[User:opendata|opendata]] in 2018.<br />
<br />
== SMMUs / IOMMUs ==<br />
This platform is very picky about its SMMUs and therefore requires many downstream workarounds to be implemented. Upstream maintainers aren't exactly happy with that.<br />
<br />
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=355881&archive=both<br />
<br />
== Storage ==<br />
At least SDHCI (eMMC) was tested to work. UFS is untested (if anybody knows about a sdm630/36/60-based device using UFS, leave a note here!).<br />
<br />
== USB ==<br />
There is WIP support for USB 2.0 only (no USB 3) by [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs<br />
<br />
Do note that most devices only have USB 2.0 wired up in hardware.<br />
<br />
== WiFi ==<br />
Wireless network should be available via the ath10k_snoc driver, provided the modem subsystem is alive. It also needs firmware (which is possibly signed per-device or per-vendor - though it's unconfirmed!).<br />
<br />
== Work done so far ==<br />
=== Who is working on it ===<br />
* [[User:opendata]] worked on initial basic SoC support (pinctrl-sdm660, gcc-sdm660) (+ [https://gitlab.com/opendata26/linux/-/tree/nile-mainline-submit-2 various branches])<br />
* [https://developer.sony.com/posts/pavel-dubrova-selected-as-the-first-2018-hero-open-source-developer/ Pavel Dubrova] worked on SDM630 SoC support based on kernel 5.3. It is unknown where the sources are located.<br />
* [[User:Alexeymin]] tried to continue opendata's work. WIP Branch is in [https://gitlab.com/postmarketOS/linux-postmarketos/-/commits/qcom-sdm660/ linux-postmarketos] repo.<br />
* [[User:Konradybcio|Konrad Dybcio]] in https://github.com/konradybcio/linux/commits/ninges_labs (warning: frequent forcepushes!)<br />
* SoMainline on GitHub: https://github.com/SoMainline/linux/<br />
<br />
=== Upstream commits related to sdm630/636/660 ===<br />
<br />
Hopefully this can serve as history log, a step-by-step example of what needs to be done to bring new SoC support to mainline kernel from zero.<br />
<br />
Commits merged in 4.20:<br />
* [https://github.com/torvalds/linux/commit/9cf0c526bc5874d77208751ae42f7e4c62bfdd4d pinctrl: qcom: Add sdm660 pinctrl driver] submitted by opendata<br />
* [https://github.com/torvalds/linux/commit/5db0b0a298d26c007e06a96d7e60849b4829a57c pinctrl: sdm660: Set tile property for pingroups]<br />
* [https://github.com/torvalds/linux/commit/f2a76a2955c0eb7514cdb5885e3d60a973301ae0 clk: qcom: Add Global Clock controller (GCC) driver for SDM660] by Taniya Das, who sent opendata's unsubmitted work after opendata had disappeared<br />
Commits merged in 5.1:<br />
* [https://github.com/torvalds/linux/commit/4e2256d31f0f24107c36dae35a1d84dff0fced30 soc: qcom: smd-rpm: Add sdm660 compatible] by opendata<br />
Commits merged in 5.6:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=faf8e30acb219849725aa75302d36e0ffdb6a258 dt-bindings: arm: Add kryo260 compatible] by alexeymin<br />
Commits merged in 5.8:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aab86bbbd3e32a10ca7e5cd1d3b9a473cf5909bb dt-bindings: arm: qcom: Add sdm630 and sdm660 SoCs] by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=feec34411d4c0a9759106ef4f7d563438b3881ae arm64: dts: qcom: Add SDM660 SoC support] done by opendata sent by alexeymin<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23a6da79fe8b7f0b5725b40126a7b0638c016ef3 arm64: dts: qcom: Add Xiaomi Redmi Note 7 (lavender)] by alexeymin<br />
Commits merged in 5.9:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30dee220c8502a478477cd503729994e8dc850c2 soc: qcom: socinfo: Add socinfo entry for SDM630] by konradybcio (why not do it for 636 and 660 in one go though?)<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b608013ac5b55a2e42d8734f29f9757b75d26165 clk: qcom: smd: Add support for SDM660 rpm clocks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4870c76c00d178956cf3e1c17aab6b00a61dc30f arm64: dts: qcom: pm660(l): Add base dts files] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b190fb010664c769da16c5240be0e972cb3b267a arm64: dts: qcom: sdm630: Add sdm630 dts file] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e781633b6067eee13001faa1175851e91143d738 arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform)] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=234d7d6b4cbfab0e900f12658053689bb3376141 arm64: dts: qcom: Add support for Sony Xperia 10/10 Plus (Ganges platform)] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=17cc38e7846b462e03b718d1ca231da96809407d pinctrl: qcom: spmi-gpio: Add pm660(l) compatibility] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7203d3684eafd711bfa1ebda7d36b89f4ac20c4c Documentation: Document pm660(l) SPMI GPIOs compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b538304da7855f4e31f91f915f259936eb67a1e6 clk: qcom: gcc-sdm660: Add missing modem reset] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3386af51d3bcebcba3f7becdb1ef2e384abe90cf clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=694dd304cc294b69db7191cec1d83e5a29c6a4b0 drm/msm/dsi: Add phy configuration for SDM630/636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75c1437ceb77ffcdb9358688b3b56245c6ba3851 drm/msm/mdp5: Add MDP5 configuration for SDM630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=033f47f7f12168b39c10158551576b15dec61505 drm/msm/dsi: Add DSI configuration for SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=974b7115a73d8d3ff77cfd6f69408d20c1bb7d06 drm/msm/mdp5: Add MDP5 configuration for SDM636/660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfbf813e598125293493341bc2238acdf6ba6a6f mailbox: qcom: Add sdm660 hmss compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9bb4a068b206f61ef01057cfeafdb852fb244c5 regulator: core: Enlarge max OF property name length to 64 chars] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b5a21870694ab4c75a783f77b158840908f04a1 Merge series "Support for PM660/PM660L SPMI and SMD regulators" from kholk]<br />
<br />
Commits merged in 5.10:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=326407d2c576995464fda64e92b5e37f3589e5ee arm64: dts: sdm630: Temporarily disable SMMUs by default] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d46e5a39f9be9288f1ce2170c4c7f8098f4e7f68 clk: qcom: gcc-sdm660: Fix wrong parent_map] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f627691db72921f300e333fbbfe8349142a94807 regulator: dt-bindings: Document the PM660/PM660L PMICs entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d849653b00f2336efcd371fe85a7eb31bb094e9 regulator: qcom_smd: Add PM660/PM660L regulator support] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9f061a5486f6a87e32fac80223ae44d4aefc06f regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0074c4472dcb20e989d9870c0b3aba42d0aa44b8 regulator: qcom_spmi: Add PM660/PM660L regulators] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=328816c2033160a6929fb0c6f0018b7c8d75cefe regulator: qcom_spmi: Add support for new regulator types] by kholk<br />
<br />
Commits merged in 5.11:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b812834b5329fe78d643c9a61350d227db904361 iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4863b93cfd2dfe88557f820b3399c3fa2163ec43 media: camss: csiphy: Set rate on csiX_phy clock on SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e486781b74cc611d85e66ff0fc6324f65b25196c media: camss: csiphy-3ph: Add support for SDM630/660] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e5d158189c6a6259c1c78bc95d8ae950b4ec66a media: camss: Add support for SDM630/636/660 camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3cba9d22c358a3a095cbfcc7bec26e67c29ee361 media: dt-bindings: media: qcom,camss: Add bindings for SDM660 camss] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4b9be29f4bfc391da2eafc1a2cbc96b6774ab79 mfd: qcom-spmi-pmic: Add support for PM660/PM660L] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b831fba3b0e184930747761adc9fdaccc3c49ff4 arm64: dts: sdm630: Fix dma node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd7fb438b7ce40918fc059afe77b12b5fe46ce2 soc: qcom: rpmpd: Add SDM660 power-domains] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee84049c1391d45c6e3ecccf45b5f679e4914253 dt-bindings: power: rpmpd: Add SDM660 power-domains bindings] by konradybcio<br />
<br />
Commits merged in 5.12:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e16831bf402c4db4a0b3c4921223ff68cdb5d0a0 dt-bindings: clock: Add QCOM SDM630 and SDM660 graphics clock bindings] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79b5d1fc93a1f114a0974a076b5a25ca64b37b0f clk: qcom: Add SDM660 GPU Clock Controller (GPUCC) driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7cbb78a99db658e48868e3af9fb15bacb624bd50 clk: qcom: rcg2: Stop hardcoding gfx3d pingpong parent numbers] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9502d488b1fc9019edc190bcd2f1aacec9e37bc3 dt-bindings: clock: Add support for the SDM630 and SDM660 mmcc] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5db3ae8b33de627ac3a73b7a772e5ae9f8c31da9 clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver] by Martin Botka<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c3656218386a40d884d8a757e1683028147c6e1c clk: qcom: gcc-sdm660: Mark GPU CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe121bfe261717e930abdb4a905e5c01b7f47cc3 clk: qcom: gcc-sdm660: Mark MMSS NoC CFG AHB clock as critical] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=785c02eb35009a4be6dbc68f4f7d916e90b7177d clk: qcom: gdsc: Implement NO_RET_PERIPH flag] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=731806da2916f7b0f0b86ac5f80b287f08bfcf42 drm/msm/dpu: Add prog_fetch_lines_worst_case to INTF_BLK macro] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d832ab30ce64abe30571bc12931a296a8a27c4d drm/msm/a5xx: Add support for Adreno 508, 509, 512 GPUs] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e49c2912dbfa81cbe62849e4695f967f81c9350c arm64: dts: qcom: sdm630: add ICE registers and clocks] by ebiggers<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71edb0b4fa0e3bc248df564ba01a0f7c41607c8e dt-bindings: phy: qcom-qusb2: Document SDM660 compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0e7f781fc9958bfb57527a49c5a1eb1f423439c phy: qcom-qusb2: Add configuration for SDM660] by kholk<br />
<br />
Commits merged in 5.13:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7014dfee4e83348d04c450c698ae29add6e9f58f interconnect: qcom: sdm660: Fix kerneldoc warning] by Georgi Djakov<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6761996a8c4d72bda053e18c548b0c392a189110 media: dt-bindings: media: camss: Add qcom,sdm660-camss binding] by Robert Foss<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f80a1d41432869dd78dfe8373060371918a05326 interconnect: qcom: Add SDM660 interconnect provider driver] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33ad2800348e6c20f05b86ef01e8216fc3e3c762 dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC] by kholk<br />
<br />
Commits merged in 5.15:<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=90b7c1c66132c20e8a550006011a3cbfb73dbfc1 drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in poll_for_ready] by Marijn Suijten<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1878f4b7ec9ed013da8a7efb63fed1fbae0215ae arm64: dts: qcom: sdm630: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=13404ac8882f5225af07545215f4975a564c3740 interconnect: qcom: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf49e366020396ad83845c1c3bdbaa3c1406f5ce dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5833c9b8766298e73c11766f9585d4ea4fa785ff interconnect: qcom: sdm660: Correct NOC_QOS_PRIORITY shift and mask] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a06c2e5c048e5e07fac9daf3073bd0b6582913c7 interconnect: qcom: sdm660: Fix id of slv_cnoc_mnoc_cfg] by Shawn Guo<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da09577ab562e2700f0aba3f17cc741717ca9e38 clk: qcom: gcc-sdm660: Replace usage of parent_names] by Bjorn Andersson<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a61ca021fe28ab7163ca879fc3532c3cca25063c clk: qcom: gcc-sdm660: Move parent tables after PLLs] by Stephen Boyd<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=462f7017a6918d152870bfb8852f3c70fd74b296 drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=639dfdbecd88ec05bda87b1d5d419afad50af21c arm64: dts: qcom: sdm630: don't use underscore in node name] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c81210e38966cfa1c784364e4035081c3227cf5b arm64: dts: qcom: sdm660: use reg value for memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfdf0c27639571d7a99d00fe1ce931daa6726c27 arm64: dts: qcom: sdm630: don't use empty memory node] by vinodkoul<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=712e245fcbfd92f385ea5bc12af399d97953a298 arm64: dts: qcom: sdm630: Add DMA to I2C hosts] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=536f44285ff618087256f2059d0d6b5581d3748d arm64: dts: qcom: sdm630: Add I2C functions to I2C pins] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18abedf7d4e6d069f89ba056223a03ba1e17af3b arm64: dts: qcom: sdm630-nile: Remove gpio-keys autorepeat] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e634d8196f7da05b81a4574e1572ef559f1ba85f arm64: dts: qcom: sdm630-nile: Enable uSD card slot] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bc81940d8ca568f887d5337ccf97f104a60be955 arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8fc1c43c51b4aad8a88d2c968d2a63b5ef7ed13 arm64: dts: qcom: sdm630-nile: Add Synaptics touchscreen.] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c1d849ec047dde4e21dca7f20f300575307a660 arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fcbcd062a894067f1f622f927ed7c448723d6f06 arm64: dts: qcom: sdm630-nile: Add Volume up key] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c616239f255a66e5989e8fa5cdaefc25eec3d00 arm64: dts: qcom: sdm630-nile: Add USB] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=158f80a68148d7febdbcc3586d2d17e455453563 arm64: dts: qcom: sdm630-nile: Use &labels] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b36c824b9a77a8816258fdd00997a5f78542814 arm64: dts: qcom: sdm630-xperia-nile: Add all RPM and fixed regulators] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ab290284398d8a33a5e7e9ebe7c7364b481f6dd8 arm64: dts: qcom: sdm660: Add required nodes for DSI1] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3d5d3cc69710344f152c6b65e54ccc8c818b9d4 arm64: dts: qcom: sdm630: Configure the camera subsystem] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c21512cbfbfdcb72ba3b41e714266149433b11c8 arm64: dts: qcom: sdm630: Add IMEM node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36c7b98f7935110ff5a65b49f03ae3bbf1cbe181 arm64: dts: qcom: Add device tree for SDM636] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=05aa0eb325c98f7e06eeb3f251cbab1b27586c8e arm64: dts: qcom: sdm660: Make the DTS an overlay on top of 630] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bf09754050652885bc123454615ef4f74f9586c arm64: dts: qcom: pm660(l): Add VADC and temp alarm nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a1fbb121aa6d87c618f7f345c3c498cb8a65446 arm64: dts: qcom: pm660l: Support SPMI regulators on PMIC sid 3] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b56a804e58b1670cb8f17b66543facd21af4dd2 arm64: dts: qcom: pm660l: Add WLED support] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b59b058c623d274919b4cae5e0625f8231cbb474 arm64: dts: qcom: pm660: Support SPMI regulators on PMIC sid 1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5cf69dcbec8bd6620ecef601a6744489d5201e0e arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adc57d4a463b59ec7d3adf7125758de5a1db3944 arm64: dts: qcom: sdm630: Raise tcsr_mutex_regs size] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ca2ebc90a4624b361c9b7291d7cafa2deab2c1a arm64: dts: qcom: sdm630: Add ADSP remoteproc configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3332c59649fea6b00f437c20e294e8b29f07fca7 arm64: dts: qcom: sdm630: Add thermal-zones configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8236767599afb43d4e274cc56efecfe47c55332 arm64: dts: qcom: sdm630: Add modem/ADSP SMP2P nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c54b82b4545386bb576b7c5df5b8d4f95f11a5b arm64: dts: qcom: sdm630: Add TSENS node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=056d4ff8279a1df70eaf2fccb5977508c83627aa arm64: dts: qcom: sdm630: Add qcom,adreno-smmu compatible] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6bb717fe56f67218715fd3b8eaf65bb1fe8f8458 arm64: dts: qcom: sdm630: Add clocks and power domains to SMMU nodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a64fa0e23b5f712828379319d20b32546e0cfb94 arm64: dts: qcom: sdm630: Add GPU Clock Controller node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=738777ab85ea9aced9e6e139be921c5dd89498f3 arm64: dts: qcom: sdm630: Add interconnect and opp table to sdhc_1] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b700aa1b3e6240bc9885b18700c95bce6c1d948 arm64: dts: qcom: sdm630: Add SDHCI2 node] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36a0d47aee6a8cfd3c6cf4274732d8ef994a25b4 arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c65a4ed2ea8bca368e8e8822b61f7309aa706171 arm64: dts: qcom: sdm630: Add USB configuration] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=142662f8f43c1725418ff13a2c83fb218d2b0911 arm64: dts: qcom: sdm630: Add qfprom subnodes] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b52555d590d1609ea9577f25f06d366e397afe96 arm64: dts: qcom: sdm630: Add MDSS nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=045547a022529d29ad2ddc1981817743d1dac91e arm64: dts: qcom: sdm630: Add interconnect provider nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01b182d920a8147f185adfc5364952aeed9eb086 arm64: dts: qcom: sdm630: Add MMCC node] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ce921ae3d30ef86f8313d753e07b67f9bcfc8f8 arm64: dts: qcom: sdm630: Add RPMPD nodes] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=26e02c98a9ad63eb21b9be4ac92002f555130d3b arm64: dts: qcom: sdm630: Rewrite memory map] by kholk<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0a77028c85ad1f6f36c3ceea21b30dc43721665 remoteproc: q6v5_pas: Add sdm660 ADSP PIL compatible] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f35ef8e4ea0a2b2b35a2c7009fc07b6d80a2b2f3 dt-bindings: remoteproc: qcom: adsp: Add SDM660 ADSP] by konradybcio<br />
* [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0132bf6f395837fc77fb38ac3d2806d22426be51 drivers: usb: dwc3-qcom: Add sdm660 compatible] by konradybcio<br />
<br />
see also:<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Linux-SDM630-SDM660-Patches Article on Phoronix, Linux-SDM630-SDM660-Patches]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Mainlining&diff=37513
Mainlining
2023-03-24T15:31:02Z
<p>Alexeymin: /* Qualcomm DTS patches */</p>
<hr />
<div>[[Category:Socs]]<br />
Mainlining is the process of replacing the kernel provided by the device vendor (the "downstream" kernel), with a version close to the actively developed version released on [https://www.kernel.org kernel.org] (the "mainline" kernel). It involves porting (and most importantly: cleaning up) device-specific code from the downstream kernel to the mainline kernel. For some {{wikipedia|System_on_a_chip|SoCs}}, common support already exists in mainline, so you can focus on device-specific components.<br />
<br />
== Why? ==<br />
Mainlining is a fairly complicated process, especially if you're one of the first to start work on a given SoC. However through community effort there is a growing number of SoCs that have increasingly stable mainline ports (see below). In general it is relatively simple to take your existing Android kernel and boot it without any of the Android blobs, however from that point it can be a lot of working to create a working system and at the end of it you don't receive any security patches or general improvements.<br />
<br />
Apart from purely practical insufficiencies, the cold hard truth is that the downstream code is simply not meant to be maintained or get used outside Android. The code quality is often several magnitudes worse, which makes maintenance rather complicated. Often large parts of the drivers are moved into proprietary parts in Android userspace - which are generally impossible to use without emulating the expected Android environment. At the end, the effort to make such drivers work properly on long term is often as much as rewriting them properly for mainline.<br />
<br />
Successfully mainlining an SoC or device means that you benefit from every improvement the Linux kernel has to offer, you can run a fairly standard Linux distro (in theory even ''any'' Linux distro) and benefit from kernel updates and improvements without needing to compile your own kernel or deal with frustrating patches. A notable easy-to-notice benefit of running mainline is minimal-effort-needed GPU support for almost all GPUs (except PowerVR unfortunately), which is needed for using modern phone DEs like Plasma Mobile or Phosh with acceptable performance. Lastly, mainlining is a terrific learning opportunity that you will never regret.<br />
<br />
If your device's SoC is in the list below there's a very decent chance that you can get the same functionality working on your device and eventually upstream your patches to the kernel, helping to build a solid base for other devices too!<br />
<br />
== Overview ==<br />
<br />
=== Supported SoCs ===<br />
Some SoCs are already supported quite well and are used for some devices in postmarketOS. Getting started with one of these might be easier for you, because you can get help from others working with the same SoC. The feature matrix below shows which features are already supported for a particular SoC. The pages for each SoC will provide more information, plus hints how to get started and who you can contact.<br />
<br />
* '''CPU:''' SMP (bring up secondary CPU cores), CPU frequency scaling, CPUidle<br />
* '''Storage:''' eMMC, SD cards, UFS, ...<br />
* '''Video:''' Hardware-accelerated video de/encoding<br />
* '''Modem:''' Calls, SMS, Internet<br />
* '''Suspend:''' Can reach (all) low-power modes of the SoC during suspend (either system suspend or cpuidle).<br />
* Unavailable (-) means that such a feature is not built directly into SoC. For example, WiFi/BT are also often used through SDIO/UART which can be chosen independently from the SoC.<br />
'''Note:''' The statuses displayed below signify if a particular feature was tested on a device by someone in the postmarketOS community - not necessarily the components supported in the mainline kernel.<br />
<br />
{{#cargo_query:<br />
tables=Socs<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=SoC,Arch,Year,StatusUart=UART,StatusUsb=USB,StatusStorage=Storage,StatusDisplay=Display,StatusCpu=CPU,StatusGpu=GPU,StatusPinctrl=Pinctrl,StatusI2c=I²C,StatusAudio=Audio,StatusVideo=Video,StatusThermal=Thermal,StatusWiFi=WiFi,StatusBluetooth=BT,StatusModem=Modem,StatusGps=GPS,StatusCamera=Camera,StatusSuspend=Suspend<br />
|order by=Socs.Manufacturer, Socs.Name<br />
|where=Mainline="1"<br />
|format=table<br />
|limit=9999<br />
|more results text=<br />
}}<br />
<br />
=== Getting help ===<br />
Mainlining related to postmarketOS is primarily discussed in the [[Matrix_and_IRC|#postmarketOS-mainline]] channel. For one of the SoCs above there should be someone around who is able to help you to some extent. Note that you will be on your own for some of the problems - there are often device specific problems or components that no one has experience with yet.<br />
<br />
Below are some more chat channels / mailing list that may be helpful for further help or if you want to work on a SoC that is not listed above (yet!):<br />
<br />
In Matrix, you can browse most of Linux kernel development related channels in [https://matrix.to/#/#linux-kernel-devspace:matrix.org #linux-kernel-devspace]<br />
<br />
{| class="wikitable"<br />
! SoC<br />
! Where to ask for help<br />
|-<br />
|<br />
| [[Matrix_and_IRC|#postmarketOS-mainline]] (SoC-specific questions might be limited to those listed above)<br />
|-<br />
| Allwinner<br />
| #linux-sunxi on [https://www.oftc.net/ OFTC], [https://groups.google.com/g/linux-sunxi/ linux-sunxi@googlegroups.com]<br />
|-<br />
| Amlogic<br />
| #linux-amlogic on [https://libera.chat/ Libera.chat], [https://lore.kernel.org/linux-amlogic/ linux-amlogic@lists.infradead.org]; general information is available at [https://linux-meson.com/ linux-meson.com].<br />
|-<br />
| [[Broadcom Kona]]<br />
| ask [[User:Knuxfanwin8|knuxify]], [https://github.com/bcm-kona-mainline bcm-kona-mainline on GitHub]<br />
|-<br />
| Exynos<br />
| #replicant (with focus on older variants) or #linux-exynos on [https://libera.chat/ Libera.chat] (ask forkbomb, Putti, krzk), [https://lore.kernel.org/linux-samsung-soc/ linux-samsung-soc@vger.kernel.org]<br />
|-<br />
| MediaTek<br />
| #linux-mediatek on [https://libera.chat/ Libera.chat], [https://lore.kernel.org/linux-mediatek/ linux-mediatek@lists.infradead.org]<br />
|-<br />
| [[MediaTek MT6735]]<br />
| MediaTek entry + join [https://matrix.to/#/#mt6735-foss:matrix.org #mt6735-foss:matrix.org]<br />
|-<br />
| OMAP3 / OMAP4<br />
| ask [https://gitlab.com/pavelm @pavelm], [https://lore.kernel.org/linux-omap/ linux-omap@vger.kernel.org]<br />
|-<br />
| Qualcomm (msm...)<br />
| #linux-msm on [https://www.oftc.net/ OFTC], [https://lore.kernel.org/linux-arm-msm/ linux-arm-msm@vger.kernel.org]<br />
|-<br />
| [[Qualcomm Snapdragon 210 (MSM8909)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 410/412 (MSM8916)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 600 (APQ8064)]] and [[Qualcomm Snapdragon S4 Plus (MSM8960)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#linux-apq8064:matrix.org #linux-apq8064:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 615/616 (MSM8939)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 730/730G/732G (SM7150)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#sm7150-mainline:matrix.org #sm7150-mainline:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 820/821 (MSM8996)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8996-mainline:matrix.org #msm8996-mainline:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 845 (SDM845)]]<br />
| Qualcomm entry + ask [[User:Kalube|Caleb]] and join [https://matrix.to/#/#sdm845:postmarketos.org #sdm845:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 865/865+/870 (SM8250)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#sm8250-mainline:matrix.org #sm8250-mainline:matrix.org]<br />
|-<br />
| nVidia Tegra<br />
| #postmarketOS-on-transformers on [https://matrix.org matrix.org] (although focused on the Asus Eee Pad Transformer family, they also offer help with other Tegra devices), #tegra on [https://libera.chat/ Libera.chat], [https://www.spinics.net/lists/linux-tegra/ linux-tegra@vger.kernel.org]<br />
|-<br />
|}<br />
<br />
== Getting Started ==<br />
* Collect as much information about your device as you can: downstream kernel sources, specifications, schematics (can be sometimes found with your favorite search engine) are all going to prove invaluable when attempting to port a device to mainline.<br />
* [[Serial debugging]] will be helpful especially in the beginning (before USB or network is working). Some devices expose it through the USB port or the audio jack; others have test points available on the mainboard.<br />
* Choose a kernel tree:<br />
** '''Mainline:''' (the last kernel version released by Linus Torvalds) Usually a good compromise of being recent, yet quite stable. [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git torvalds/linux.git]<br />
** '''linux-next:''' A collection of recently merged changes from many subsystems; use this if you are working on a very recent SoC. [https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git next/linux-next.git]<br />
** There may be more WIP changes available in Linux kernel trees specific to your SoC.<br />
* [[Compiling kernels with envkernel.sh]] is very useful to integrate kernel development into postmarketOS.<br />
* If you are attempting to port to a SoC listed above, check the SoC wiki page for further help and instructions.<br />
* Do not attempt to copy any code as-is from downstream. In general this won't work, and most importantly: it won't be accepted for inclusion into the mainline kernel upstream.<br />
** Instead, try to understand what the downstream code does, and rewrite it from scratch for mainline by looking at similar code.<br />
<br />
== Materials to look into ==<br />
This section include many useful sources to help you with mainlining as possible.<br />
<br />
Note: Linux architecture regarding to embedded devices moving fast forward, so be aware that some specific information can get outdated in 2 – 3 years.<br />
<br />
'''Books:'''<br />
* Mastering Linux Device Driver Development: Write custom device drivers to support computer peripherals in Linux operating systems (2021, John Madieu) [https://www.packtpub.com/product/mastering-linux-device-driver-development/9781789342048 Packtpub (on SALE for $ 5)] [https://1lib.to/book/11637490/9a0f71 1lib.to]<br />
* Linux Driver Development for Embedded Processors - Second Edition: Learn to develop Linux embedded drivers with kernel 4.9 LTS (2018, Alberto Liberal De Los Ríos) [https://www.amazon.com/Linux-Driver-Development-Embedded-Processors/dp/1729321828 amazon.com] [https://1lib.to/book/5325784/29ef3d 1lib.to]<br />
<br />
'''Intro:'''<br />
* Porting mainline Linux to mobile phones, Luca Weiss, 2022 (40:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_mainline/ FOSDEM]<br />
* Running Mainline Linux on Snapdragon 410, Nikita Travkin, 2022 (40:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_snapdragon_410/ FOSDEM]<br />
* From Android to mainline on the Snapdragon 845, Caleb Connolly, 2022 (30:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_snapdragon_845/ FOSDEM]<br />
* Qualcomm SoC upstreaming adventures in 2020 [https://www.youtube.com/watch?v=xu-3CmRefvc Youtube] [https://odysee.com/@PortingLinuxPhones:5/Qualcomm-SoC-upstreaming-adventures-in-2020-xu-3CmRefvc:9 Odysee]<br />
* Porting Linux to your favorite obscure Arm SoC, 2020 [https://media.ccc.de/v/rc3-80571-porting_linux_to_your_favorite_obscure_arm_soc media.ccc.de] [https://www.youtube.com/watch?v=Ep5Mbz0mQQQ Youtube] [https://odysee.com/@PortingLinuxPhones:5/rc3-r3s-5-eng-Porting_Linux_to_your_favorite_obscure_Arm_SoC_webm-hd:2 Odysee]<br />
* Upstreaming a Qualcomm SoC, 2020 [https://www.youtube.com/watch?v=WLBzl1AyJog YouTube] [https://elinux.org/images/6/66/Qualcomm_Upstreaming_ELCNA20_v2.pdf Slides] ''Overview of porting 2020-era SoC''<br />
* Introduction into how mainlining is done, 2017 (52:37) [https://www.youtube.com/watch?v=77tuFtM4gjA Youtube] [https://odysee.com/@PortingLinuxPhones:5/Forward-Porting-Google-Nexus-5X---6P---Lessons-from-the-Trenches-and-What's-Next---Jeremy-McNicoll:d Odysee]<br />
<br />
'''Basics:'''<br />
* Introduction into ARM architecture, 2017 (46:33) [https://www.youtube.com/watch?v=NNol7fRGo2E Youtube] [https://odysee.com/@PortingLinuxPhones:5/A-tour-of-the-ARM-architecture-and-its-Linux-support,-2017:4 Odysee] [https://bootlin.com/pub/conferences/2017/lca/petazzoni-arm-introduction/petazzoni-arm-introduction.pdf Slides]<br />
* ARM64 SoC Linux Support Check-List, 2017 (42:38) [https://www.youtube.com/watch?v=LPG4EkXK9Us Youtube] [https://odysee.com/@PortingLinuxPhones:5/ARM64-SoC-Linux-Support-Check-List-(2017):7 Odysee] [https://bootlin.com/pub/conferences/2016/elce/clement-arm64-soc-checklist/clement-arm64-soc-checklist.pdf Slides] ''Very useful step-by-step guide what should be done to bring in SoC support''<br />
* Upstreaming ARM64 SoC's easier than before, 2019 (19:03) [https://www.youtube.com/watch?v=RBB6qKLUpd8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/SAN19-219-Upstreaming-ARM64-SoC's-easier-than-before:7 Odysee] [https://static.linaro.org/connect/san19/presentations/san19-219.pdf Slides]<br />
* [https://mainlining.dev/ Mainlining blog] by ichernev<br />
* [https://people.kernel.org/linusw/how-the-arm32-kernel-starts How the ARM32 kernel starts] by [[Special:Contributions/Linusw|Linus Walleij]]<br />
<br />
'''Writing device trees:'''<br />
* Device Tree 101, 2021 (1:54:58) [https://www.youtube.com/watch?v=a9CZ1Uk3OYQ Youtube]<br />
* Device Tree (DT) introduction, 2013 (1:12:14) [https://www.youtube.com/watch?v=m_NyYEBxfn8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Device-Tree-for-Dummies!---Thomas-Petazzoni,-Free-Electrons:b Odysee] [https://elinux.org/images/f/f9/Petazzoni-device-tree-dummies_0.pdf Slides]<br />
* Device Tree: present, past, future, 2018 (37:28) [https://www.youtube.com/watch?v=PgQezmlst0w Youtube] [https://odysee.com/@PortingLinuxPhones:5/Device-Tree--Past,-Present,-and-Future,-2018:c Odysee] [https://elinux.org/images/0/06/ELCE_2019_DeviceTree_Past_Present_Future.pdf Slides]<br />
* Device tree bindings (i.e. documentation how to specify devices in your device tree) are mandatory for all mainline drivers. You can check those in the <code>Documentation/devicetree/bindings</code> directory to see which options are supported by a particular driver.<br />
* [https://elinux.org/Device_Tree_Usage Device Tree Usage (beginner guide by elinux.org)]<br />
* [https://www.devicetree.org/specifications/ Device Tree Specification]<br />
* [https://elinux.org/Device_Tree_presentations_papers_articles DT Resources on elinux.org]<br />
<br />
'''Clocks:'''<br />
* Common Clock Framework: How To Use It, 2013 (44:50) [https://www.youtube.com/watch?v=Mwr7eZUm1Nw Youtube] [https://odysee.com/@PortingLinuxPhones:5/Embedded-Linux-Conference-2013---Pin-Control-and-GPIO-Update-z4EkzJDGxFo:0 Odysee]''Not so useful, old and only a basic overview''<br />
* What The Clock! - Linux Clock Subsystem Internals, 2020 (33:12) [https://odysee.com/@PortingLinuxPhones:5/Kernel-System-What-The-Clock!-Linux-Clock-Subsystem-Internals:9 Odysee] [https://www.youtube.com/watch?v=bcxrSBIwZVU Youtube] [https://static.sched.com/hosted_files/osseu2020/45/ELC-E%202020_%20What%20The%20Clock%20%21.pdf Slides]<br />
* [https://www.kernel.org/doc/html/latest/timers/timekeeping.html Clock sources, Clock events, sched_clock() and delay timers] at kernel.org<br />
<br />
'''Power Management'''<br />
* SAN19-421 Training: Device power management for idle [https://www.youtube.com/watch?v=wbG1rXibzMY Youtube]<br />
<br />
'''Various topics:'''<br />
* Pin Control and GPIO, 2013 (48:03) [https://www.youtube.com/watch?v=z4EkzJDGxFo Youtube] [https://odysee.com/@PortingLinuxPhones:5/Embedded-Linux-Conference-2013---Pin-Control-and-GPIO-Update:e Odysee] [https://elinux.org/images/b/b6/Pin_Control_Subsystem_Overview.pdf Slides] talk by [[Special:Contributions/Linusw|Linus Walleij]]<br />
* Timekeeping in the Linux Kernel - Stephen Boyd, Qualcomm Innovation Center, 2017 (34:41) [https://www.youtube.com/watch?v=Puv4mW55bF8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Timekeeping-in-the-Linux-Kernel---Stephen-Boyd,-Qualcomm-Innovation-Center-(2017):1 Odysee] ''About how clocksource works.''<br />
* How Dealing with Modern Interrupt Architectures can Affect Your Sanity [https://www.youtube.com/watch?v=YE8cRHVIM4E Youtube] [https://odysee.com/HowDealingwithModernInterruptArchitecturescanAffectYourSanity:6 Odysee] [https://www.linuxsecrets.com/elinux-wiki/images/8/8c/Zyngier.pdf Slides] ''About interrupt controllers and their relationships''<br />
* Linux Kernel Display Architecture, 2013 (56:53) [https://www.youtube.com/watch?v=l2ZSsOkfnz0 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Common-Clock-Framework--How-To-Use-It:9 Odysee] ''DRM/KMS, MIPI DSI, panels,... slightly old, need something newer.''<br />
* Demystifying Linux MIPI DSI Subsystem - Jagan Teki, 2019 (41:57) [https://www.youtube.com/watch?v=UG7tMZM24UU Youtube] [https://odysee.com/@PortingLinuxPhones:5/Demystifying-Linux-MIPI-DSI-Subsystem---Jagan-Teki,-Amarula-Solutions:b Odysee] ''MIPI DSI, controllers, bridges, panels, DRM/KMS...''<br />
* Power Management Integrated Circuits: Keep the Power in Your Hands, 2017 [https://www.youtube.com/watch?v=GsDWgm0YiaU Youtube] [https://odysee.com/@PortingLinuxPhones:5/Power-Management-Integrated-Circuits--Keep-the-Power-in-Your-Hands:d Odysee] [https://bootlin.com/pub/conferences/2017/elc/schulz-pmics-keep-power-in-your-hands/schulz-pmics-keep-power-in-your-hands.pdf Slides] ''About PMICs, regulators, power supply, fuelgauge, ...''<br />
<br />
'''Development tools'''<br />
* Using Visual Studio Code for Embedded Development - Michael Opdenacker, Bootlin, 2021 (31:37) [https://www.youtube.com/watch?v=YGOZIIOWujc Youtube]<br />
Note: for VSCodium, download extensions from https://marketplace.visualstudio.com/ manually.<br />
<br />
'''Submitting patches:'''<br />
* [https://www.kernel.org/doc/html/latest/process/submitting-patches.html Submitting patches: the essential guide to getting your code into the kernel]<br />
* [https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/ Submitting Your First Patch to the Linux Kernel and Responding to Feedback]<br />
* [https://git-send-email.io/ Guide for git-send-email]<br />
<br />
== Upstreaming ==<br />
<br />
Upstreaming your mainline efforts is key to reduce the maintenance burden of rebasing your patches on newer version of the Linux kernel.<br />
<br />
Upstreaming patches requires sending to the Linux Kernel Mailing List using <code>git send-email</code>.<br />
For a tutorial on <code>git send-email</code> have a look at https://git-send-email.io/.<br />
<br />
Each subsystem maintainer of the Linux kernel has its own workflow, based on experience we collected the following tips & tricks:<br />
<br />
=== Patches are not getting picked up ===<br />
<br />
Sometimes maintainers are busy and will get there to provide feedback to your patches or merge them in their tree.<br />
However, if you have doubts that they are not picked up, you can ping them on the mailing list or resend your patches.<br />
Certain maintainers e.g. Mark Brown require always resending, do not ping them on the mailing list.<br />
<br />
Rule of thumb: resend or ping after > 2 weeks of no response.<br />
<br />
=== Subsystem specific ===<br />
<br />
==== Qualcomm DTS patches ====<br />
Status of these patches is reflected in [https://patchwork.kernel.org/project/linux-arm-msm/list/ MSM Patchwork].<br />
A new version may be expected through Patchwork.<br />
<br />
Rule of thumb: check the [https://patchwork.kernel.org/project/linux-arm-msm/list/ MSM patchwork] page for the status.<br />
<br />
==== Other maintainers ====<br />
<br />
Ask the maintainer and describe here the general rule of thumb.<br />
<br />
== See also ==<br />
* [[Mainlining Guide]] (very generic, parts are slowly incorporated into this page)<br />
* [[MSM8916 Mainlining]] (specific to MSM8916, but might be helpful for similar Qualcomm SoCs)<br />
* [[MSM8996 Mainlining]]<br />
* [[SDM845 Mainlining]]<br />
* [[Mainlining FAQ]]<br />
* [[The Mainline Kernel]]<br />
* [[Qualcomm mainline porting]]<br />
* [[Exynos mainline porting]]<br />
* {{issue|175|pmaports}} Google Galaxy Nexus (samsung-maguro): Mainlining progress (initial tricks with RAM and some sleep calls before the reboots in the code to figure out where it was failing will also be useful for other devices)<br />
* {{issue|153|pmaports}} Google Pixel 3 XL (google-crosshatch): mainlining attempt: progress and questions (useful for newer SoCs, useful info about force-reboot code, stub dtbo partition)</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Mainlining&diff=37512
Mainlining
2023-03-24T15:29:39Z
<p>Alexeymin: /* Qualcomm DTS patches */ msm patchwork link</p>
<hr />
<div>[[Category:Socs]]<br />
Mainlining is the process of replacing the kernel provided by the device vendor (the "downstream" kernel), with a version close to the actively developed version released on [https://www.kernel.org kernel.org] (the "mainline" kernel). It involves porting (and most importantly: cleaning up) device-specific code from the downstream kernel to the mainline kernel. For some {{wikipedia|System_on_a_chip|SoCs}}, common support already exists in mainline, so you can focus on device-specific components.<br />
<br />
== Why? ==<br />
Mainlining is a fairly complicated process, especially if you're one of the first to start work on a given SoC. However through community effort there is a growing number of SoCs that have increasingly stable mainline ports (see below). In general it is relatively simple to take your existing Android kernel and boot it without any of the Android blobs, however from that point it can be a lot of working to create a working system and at the end of it you don't receive any security patches or general improvements.<br />
<br />
Apart from purely practical insufficiencies, the cold hard truth is that the downstream code is simply not meant to be maintained or get used outside Android. The code quality is often several magnitudes worse, which makes maintenance rather complicated. Often large parts of the drivers are moved into proprietary parts in Android userspace - which are generally impossible to use without emulating the expected Android environment. At the end, the effort to make such drivers work properly on long term is often as much as rewriting them properly for mainline.<br />
<br />
Successfully mainlining an SoC or device means that you benefit from every improvement the Linux kernel has to offer, you can run a fairly standard Linux distro (in theory even ''any'' Linux distro) and benefit from kernel updates and improvements without needing to compile your own kernel or deal with frustrating patches. A notable easy-to-notice benefit of running mainline is minimal-effort-needed GPU support for almost all GPUs (except PowerVR unfortunately), which is needed for using modern phone DEs like Plasma Mobile or Phosh with acceptable performance. Lastly, mainlining is a terrific learning opportunity that you will never regret.<br />
<br />
If your device's SoC is in the list below there's a very decent chance that you can get the same functionality working on your device and eventually upstream your patches to the kernel, helping to build a solid base for other devices too!<br />
<br />
== Overview ==<br />
<br />
=== Supported SoCs ===<br />
Some SoCs are already supported quite well and are used for some devices in postmarketOS. Getting started with one of these might be easier for you, because you can get help from others working with the same SoC. The feature matrix below shows which features are already supported for a particular SoC. The pages for each SoC will provide more information, plus hints how to get started and who you can contact.<br />
<br />
* '''CPU:''' SMP (bring up secondary CPU cores), CPU frequency scaling, CPUidle<br />
* '''Storage:''' eMMC, SD cards, UFS, ...<br />
* '''Video:''' Hardware-accelerated video de/encoding<br />
* '''Modem:''' Calls, SMS, Internet<br />
* '''Suspend:''' Can reach (all) low-power modes of the SoC during suspend (either system suspend or cpuidle).<br />
* Unavailable (-) means that such a feature is not built directly into SoC. For example, WiFi/BT are also often used through SDIO/UART which can be chosen independently from the SoC.<br />
'''Note:''' The statuses displayed below signify if a particular feature was tested on a device by someone in the postmarketOS community - not necessarily the components supported in the mainline kernel.<br />
<br />
{{#cargo_query:<br />
tables=Socs<br />
|fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=SoC,Arch,Year,StatusUart=UART,StatusUsb=USB,StatusStorage=Storage,StatusDisplay=Display,StatusCpu=CPU,StatusGpu=GPU,StatusPinctrl=Pinctrl,StatusI2c=I²C,StatusAudio=Audio,StatusVideo=Video,StatusThermal=Thermal,StatusWiFi=WiFi,StatusBluetooth=BT,StatusModem=Modem,StatusGps=GPS,StatusCamera=Camera,StatusSuspend=Suspend<br />
|order by=Socs.Manufacturer, Socs.Name<br />
|where=Mainline="1"<br />
|format=table<br />
|limit=9999<br />
|more results text=<br />
}}<br />
<br />
=== Getting help ===<br />
Mainlining related to postmarketOS is primarily discussed in the [[Matrix_and_IRC|#postmarketOS-mainline]] channel. For one of the SoCs above there should be someone around who is able to help you to some extent. Note that you will be on your own for some of the problems - there are often device specific problems or components that no one has experience with yet.<br />
<br />
Below are some more chat channels / mailing list that may be helpful for further help or if you want to work on a SoC that is not listed above (yet!):<br />
<br />
In Matrix, you can browse most of Linux kernel development related channels in [https://matrix.to/#/#linux-kernel-devspace:matrix.org #linux-kernel-devspace]<br />
<br />
{| class="wikitable"<br />
! SoC<br />
! Where to ask for help<br />
|-<br />
|<br />
| [[Matrix_and_IRC|#postmarketOS-mainline]] (SoC-specific questions might be limited to those listed above)<br />
|-<br />
| Allwinner<br />
| #linux-sunxi on [https://www.oftc.net/ OFTC], [https://groups.google.com/g/linux-sunxi/ linux-sunxi@googlegroups.com]<br />
|-<br />
| Amlogic<br />
| #linux-amlogic on [https://libera.chat/ Libera.chat], [https://lore.kernel.org/linux-amlogic/ linux-amlogic@lists.infradead.org]; general information is available at [https://linux-meson.com/ linux-meson.com].<br />
|-<br />
| [[Broadcom Kona]]<br />
| ask [[User:Knuxfanwin8|knuxify]], [https://github.com/bcm-kona-mainline bcm-kona-mainline on GitHub]<br />
|-<br />
| Exynos<br />
| #replicant (with focus on older variants) or #linux-exynos on [https://libera.chat/ Libera.chat] (ask forkbomb, Putti, krzk), [https://lore.kernel.org/linux-samsung-soc/ linux-samsung-soc@vger.kernel.org]<br />
|-<br />
| MediaTek<br />
| #linux-mediatek on [https://libera.chat/ Libera.chat], [https://lore.kernel.org/linux-mediatek/ linux-mediatek@lists.infradead.org]<br />
|-<br />
| [[MediaTek MT6735]]<br />
| MediaTek entry + join [https://matrix.to/#/#mt6735-foss:matrix.org #mt6735-foss:matrix.org]<br />
|-<br />
| OMAP3 / OMAP4<br />
| ask [https://gitlab.com/pavelm @pavelm], [https://lore.kernel.org/linux-omap/ linux-omap@vger.kernel.org]<br />
|-<br />
| Qualcomm (msm...)<br />
| #linux-msm on [https://www.oftc.net/ OFTC], [https://lore.kernel.org/linux-arm-msm/ linux-arm-msm@vger.kernel.org]<br />
|-<br />
| [[Qualcomm Snapdragon 210 (MSM8909)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 410/412 (MSM8916)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 600 (APQ8064)]] and [[Qualcomm Snapdragon S4 Plus (MSM8960)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#linux-apq8064:matrix.org #linux-apq8064:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 615/616 (MSM8939)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8916:postmarketos.org #msm8916:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 730/730G/732G (SM7150)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#sm7150-mainline:matrix.org #sm7150-mainline:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 820/821 (MSM8996)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#msm8996-mainline:matrix.org #msm8996-mainline:matrix.org]<br />
|-<br />
| [[Qualcomm Snapdragon 845 (SDM845)]]<br />
| Qualcomm entry + ask [[User:Kalube|Caleb]] and join [https://matrix.to/#/#sdm845:postmarketos.org #sdm845:postmarketos.org]<br />
|-<br />
| [[Qualcomm Snapdragon 865/865+/870 (SM8250)]]<br />
| Qualcomm entry + join [https://matrix.to/#/#sm8250-mainline:matrix.org #sm8250-mainline:matrix.org]<br />
|-<br />
| nVidia Tegra<br />
| #postmarketOS-on-transformers on [https://matrix.org matrix.org] (although focused on the Asus Eee Pad Transformer family, they also offer help with other Tegra devices), #tegra on [https://libera.chat/ Libera.chat], [https://www.spinics.net/lists/linux-tegra/ linux-tegra@vger.kernel.org]<br />
|-<br />
|}<br />
<br />
== Getting Started ==<br />
* Collect as much information about your device as you can: downstream kernel sources, specifications, schematics (can be sometimes found with your favorite search engine) are all going to prove invaluable when attempting to port a device to mainline.<br />
* [[Serial debugging]] will be helpful especially in the beginning (before USB or network is working). Some devices expose it through the USB port or the audio jack; others have test points available on the mainboard.<br />
* Choose a kernel tree:<br />
** '''Mainline:''' (the last kernel version released by Linus Torvalds) Usually a good compromise of being recent, yet quite stable. [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git torvalds/linux.git]<br />
** '''linux-next:''' A collection of recently merged changes from many subsystems; use this if you are working on a very recent SoC. [https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git next/linux-next.git]<br />
** There may be more WIP changes available in Linux kernel trees specific to your SoC.<br />
* [[Compiling kernels with envkernel.sh]] is very useful to integrate kernel development into postmarketOS.<br />
* If you are attempting to port to a SoC listed above, check the SoC wiki page for further help and instructions.<br />
* Do not attempt to copy any code as-is from downstream. In general this won't work, and most importantly: it won't be accepted for inclusion into the mainline kernel upstream.<br />
** Instead, try to understand what the downstream code does, and rewrite it from scratch for mainline by looking at similar code.<br />
<br />
== Materials to look into ==<br />
This section include many useful sources to help you with mainlining as possible.<br />
<br />
Note: Linux architecture regarding to embedded devices moving fast forward, so be aware that some specific information can get outdated in 2 – 3 years.<br />
<br />
'''Books:'''<br />
* Mastering Linux Device Driver Development: Write custom device drivers to support computer peripherals in Linux operating systems (2021, John Madieu) [https://www.packtpub.com/product/mastering-linux-device-driver-development/9781789342048 Packtpub (on SALE for $ 5)] [https://1lib.to/book/11637490/9a0f71 1lib.to]<br />
* Linux Driver Development for Embedded Processors - Second Edition: Learn to develop Linux embedded drivers with kernel 4.9 LTS (2018, Alberto Liberal De Los Ríos) [https://www.amazon.com/Linux-Driver-Development-Embedded-Processors/dp/1729321828 amazon.com] [https://1lib.to/book/5325784/29ef3d 1lib.to]<br />
<br />
'''Intro:'''<br />
* Porting mainline Linux to mobile phones, Luca Weiss, 2022 (40:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_mainline/ FOSDEM]<br />
* Running Mainline Linux on Snapdragon 410, Nikita Travkin, 2022 (40:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_snapdragon_410/ FOSDEM]<br />
* From Android to mainline on the Snapdragon 845, Caleb Connolly, 2022 (30:00) [https://fosdem.org/2022/schedule/event/mobile_kernel_snapdragon_845/ FOSDEM]<br />
* Qualcomm SoC upstreaming adventures in 2020 [https://www.youtube.com/watch?v=xu-3CmRefvc Youtube] [https://odysee.com/@PortingLinuxPhones:5/Qualcomm-SoC-upstreaming-adventures-in-2020-xu-3CmRefvc:9 Odysee]<br />
* Porting Linux to your favorite obscure Arm SoC, 2020 [https://media.ccc.de/v/rc3-80571-porting_linux_to_your_favorite_obscure_arm_soc media.ccc.de] [https://www.youtube.com/watch?v=Ep5Mbz0mQQQ Youtube] [https://odysee.com/@PortingLinuxPhones:5/rc3-r3s-5-eng-Porting_Linux_to_your_favorite_obscure_Arm_SoC_webm-hd:2 Odysee]<br />
* Upstreaming a Qualcomm SoC, 2020 [https://www.youtube.com/watch?v=WLBzl1AyJog YouTube] [https://elinux.org/images/6/66/Qualcomm_Upstreaming_ELCNA20_v2.pdf Slides] ''Overview of porting 2020-era SoC''<br />
* Introduction into how mainlining is done, 2017 (52:37) [https://www.youtube.com/watch?v=77tuFtM4gjA Youtube] [https://odysee.com/@PortingLinuxPhones:5/Forward-Porting-Google-Nexus-5X---6P---Lessons-from-the-Trenches-and-What's-Next---Jeremy-McNicoll:d Odysee]<br />
<br />
'''Basics:'''<br />
* Introduction into ARM architecture, 2017 (46:33) [https://www.youtube.com/watch?v=NNol7fRGo2E Youtube] [https://odysee.com/@PortingLinuxPhones:5/A-tour-of-the-ARM-architecture-and-its-Linux-support,-2017:4 Odysee] [https://bootlin.com/pub/conferences/2017/lca/petazzoni-arm-introduction/petazzoni-arm-introduction.pdf Slides]<br />
* ARM64 SoC Linux Support Check-List, 2017 (42:38) [https://www.youtube.com/watch?v=LPG4EkXK9Us Youtube] [https://odysee.com/@PortingLinuxPhones:5/ARM64-SoC-Linux-Support-Check-List-(2017):7 Odysee] [https://bootlin.com/pub/conferences/2016/elce/clement-arm64-soc-checklist/clement-arm64-soc-checklist.pdf Slides] ''Very useful step-by-step guide what should be done to bring in SoC support''<br />
* Upstreaming ARM64 SoC's easier than before, 2019 (19:03) [https://www.youtube.com/watch?v=RBB6qKLUpd8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/SAN19-219-Upstreaming-ARM64-SoC's-easier-than-before:7 Odysee] [https://static.linaro.org/connect/san19/presentations/san19-219.pdf Slides]<br />
* [https://mainlining.dev/ Mainlining blog] by ichernev<br />
* [https://people.kernel.org/linusw/how-the-arm32-kernel-starts How the ARM32 kernel starts] by [[Special:Contributions/Linusw|Linus Walleij]]<br />
<br />
'''Writing device trees:'''<br />
* Device Tree 101, 2021 (1:54:58) [https://www.youtube.com/watch?v=a9CZ1Uk3OYQ Youtube]<br />
* Device Tree (DT) introduction, 2013 (1:12:14) [https://www.youtube.com/watch?v=m_NyYEBxfn8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Device-Tree-for-Dummies!---Thomas-Petazzoni,-Free-Electrons:b Odysee] [https://elinux.org/images/f/f9/Petazzoni-device-tree-dummies_0.pdf Slides]<br />
* Device Tree: present, past, future, 2018 (37:28) [https://www.youtube.com/watch?v=PgQezmlst0w Youtube] [https://odysee.com/@PortingLinuxPhones:5/Device-Tree--Past,-Present,-and-Future,-2018:c Odysee] [https://elinux.org/images/0/06/ELCE_2019_DeviceTree_Past_Present_Future.pdf Slides]<br />
* Device tree bindings (i.e. documentation how to specify devices in your device tree) are mandatory for all mainline drivers. You can check those in the <code>Documentation/devicetree/bindings</code> directory to see which options are supported by a particular driver.<br />
* [https://elinux.org/Device_Tree_Usage Device Tree Usage (beginner guide by elinux.org)]<br />
* [https://www.devicetree.org/specifications/ Device Tree Specification]<br />
* [https://elinux.org/Device_Tree_presentations_papers_articles DT Resources on elinux.org]<br />
<br />
'''Clocks:'''<br />
* Common Clock Framework: How To Use It, 2013 (44:50) [https://www.youtube.com/watch?v=Mwr7eZUm1Nw Youtube] [https://odysee.com/@PortingLinuxPhones:5/Embedded-Linux-Conference-2013---Pin-Control-and-GPIO-Update-z4EkzJDGxFo:0 Odysee]''Not so useful, old and only a basic overview''<br />
* What The Clock! - Linux Clock Subsystem Internals, 2020 (33:12) [https://odysee.com/@PortingLinuxPhones:5/Kernel-System-What-The-Clock!-Linux-Clock-Subsystem-Internals:9 Odysee] [https://www.youtube.com/watch?v=bcxrSBIwZVU Youtube] [https://static.sched.com/hosted_files/osseu2020/45/ELC-E%202020_%20What%20The%20Clock%20%21.pdf Slides]<br />
* [https://www.kernel.org/doc/html/latest/timers/timekeeping.html Clock sources, Clock events, sched_clock() and delay timers] at kernel.org<br />
<br />
'''Power Management'''<br />
* SAN19-421 Training: Device power management for idle [https://www.youtube.com/watch?v=wbG1rXibzMY Youtube]<br />
<br />
'''Various topics:'''<br />
* Pin Control and GPIO, 2013 (48:03) [https://www.youtube.com/watch?v=z4EkzJDGxFo Youtube] [https://odysee.com/@PortingLinuxPhones:5/Embedded-Linux-Conference-2013---Pin-Control-and-GPIO-Update:e Odysee] [https://elinux.org/images/b/b6/Pin_Control_Subsystem_Overview.pdf Slides] talk by [[Special:Contributions/Linusw|Linus Walleij]]<br />
* Timekeeping in the Linux Kernel - Stephen Boyd, Qualcomm Innovation Center, 2017 (34:41) [https://www.youtube.com/watch?v=Puv4mW55bF8 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Timekeeping-in-the-Linux-Kernel---Stephen-Boyd,-Qualcomm-Innovation-Center-(2017):1 Odysee] ''About how clocksource works.''<br />
* How Dealing with Modern Interrupt Architectures can Affect Your Sanity [https://www.youtube.com/watch?v=YE8cRHVIM4E Youtube] [https://odysee.com/HowDealingwithModernInterruptArchitecturescanAffectYourSanity:6 Odysee] [https://www.linuxsecrets.com/elinux-wiki/images/8/8c/Zyngier.pdf Slides] ''About interrupt controllers and their relationships''<br />
* Linux Kernel Display Architecture, 2013 (56:53) [https://www.youtube.com/watch?v=l2ZSsOkfnz0 Youtube] [https://odysee.com/@PortingLinuxPhones:5/Common-Clock-Framework--How-To-Use-It:9 Odysee] ''DRM/KMS, MIPI DSI, panels,... slightly old, need something newer.''<br />
* Demystifying Linux MIPI DSI Subsystem - Jagan Teki, 2019 (41:57) [https://www.youtube.com/watch?v=UG7tMZM24UU Youtube] [https://odysee.com/@PortingLinuxPhones:5/Demystifying-Linux-MIPI-DSI-Subsystem---Jagan-Teki,-Amarula-Solutions:b Odysee] ''MIPI DSI, controllers, bridges, panels, DRM/KMS...''<br />
* Power Management Integrated Circuits: Keep the Power in Your Hands, 2017 [https://www.youtube.com/watch?v=GsDWgm0YiaU Youtube] [https://odysee.com/@PortingLinuxPhones:5/Power-Management-Integrated-Circuits--Keep-the-Power-in-Your-Hands:d Odysee] [https://bootlin.com/pub/conferences/2017/elc/schulz-pmics-keep-power-in-your-hands/schulz-pmics-keep-power-in-your-hands.pdf Slides] ''About PMICs, regulators, power supply, fuelgauge, ...''<br />
<br />
'''Development tools'''<br />
* Using Visual Studio Code for Embedded Development - Michael Opdenacker, Bootlin, 2021 (31:37) [https://www.youtube.com/watch?v=YGOZIIOWujc Youtube]<br />
Note: for VSCodium, download extensions from https://marketplace.visualstudio.com/ manually.<br />
<br />
'''Submitting patches:'''<br />
* [https://www.kernel.org/doc/html/latest/process/submitting-patches.html Submitting patches: the essential guide to getting your code into the kernel]<br />
* [https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/ Submitting Your First Patch to the Linux Kernel and Responding to Feedback]<br />
* [https://git-send-email.io/ Guide for git-send-email]<br />
<br />
== Upstreaming ==<br />
<br />
Upstreaming your mainline efforts is key to reduce the maintenance burden of rebasing your patches on newer version of the Linux kernel.<br />
<br />
Upstreaming patches requires sending to the Linux Kernel Mailing List using <code>git send-email</code>.<br />
For a tutorial on <code>git send-email</code> have a look at https://git-send-email.io/.<br />
<br />
Each subsystem maintainer of the Linux kernel has its own workflow, based on experience we collected the following tips & tricks:<br />
<br />
=== Patches are not getting picked up ===<br />
<br />
Sometimes maintainers are busy and will get there to provide feedback to your patches or merge them in their tree.<br />
However, if you have doubts that they are not picked up, you can ping them on the mailing list or resend your patches.<br />
Certain maintainers e.g. Mark Brown require always resending, do not ping them on the mailing list.<br />
<br />
Rule of thumb: resend or ping after > 2 weeks of no response.<br />
<br />
=== Subsystem specific ===<br />
<br />
==== Qualcomm DTS patches ====<br />
Status of these patches is reflected in [https://patchwork.kernel.org/project/linux-arm-msm/list/ MSM Patchwork].<br />
A new version may be expected through Patchwork.<br />
<br />
Rule of thumb: check the MSM patchwork page for the status.<br />
<br />
==== Other maintainers ====<br />
<br />
Ask the maintainer and describe here the general rule of thumb.<br />
<br />
== See also ==<br />
* [[Mainlining Guide]] (very generic, parts are slowly incorporated into this page)<br />
* [[MSM8916 Mainlining]] (specific to MSM8916, but might be helpful for similar Qualcomm SoCs)<br />
* [[MSM8996 Mainlining]]<br />
* [[SDM845 Mainlining]]<br />
* [[Mainlining FAQ]]<br />
* [[The Mainline Kernel]]<br />
* [[Qualcomm mainline porting]]<br />
* [[Exynos mainline porting]]<br />
* {{issue|175|pmaports}} Google Galaxy Nexus (samsung-maguro): Mainlining progress (initial tricks with RAM and some sleep calls before the reboots in the code to figure out where it was failing will also be useful for other devices)<br />
* {{issue|153|pmaports}} Google Pixel 3 XL (google-crosshatch): mainlining attempt: progress and questions (useful for newer SoCs, useful info about force-reboot code, stub dtbo partition)</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Initramfs_development&diff=34055
Initramfs development
2022-12-08T07:46:35Z
<p>Alexeymin: /* Regenerating the two initramfs from the phone */</p>
<hr />
<div>This article explains how to modify the postmarketOS initramfs scripts, for which the source can be found in the [https://gitlab.com/postmarketOS/pmaports/tree/master/main/postmarketos-mkinitfs postmarketos-mkinitfs] pmaport. There's another page about adding a [[Device_specific_package#Initramfs_hook|device specific initramfs hook]].<br />
<br />
=== We have two initramfs files ===<br />
<br />
After the installation, you will have '''two''' initramfs files in your device's <code>/boot</code> folder.<br />
<br />
<pre>% ls ~/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100/boot<br />
initramfs initramfs-extra vmlinuz</pre><br />
Regular Linux distributions only have '''one''' initramfs file. '''We have split it''' into two to work around the size limitations that some devices have (see {{issue|126}}). The regular initramfs is relatively small (''~1.5 mb, and we could make it smaller if necessary!'') and loads the contents of the initramfs-extra from the pmOS boot partition during the boot process.<br />
<br />
The pmOS boot partition is a '''sub'''partition of the system partition (''SD cards: simply a real partition on the SD card''), so we can make it almost as big as we want.<br />
<br />
=== Recommended development workflow ===<br />
<br />
* Only do one small change at a time<br />
* Rebuild and test on device (<code>pmbootstrap initfs</code>, <code>pmbootstrap flasher flash_kernel</code>)<br />
* When it works, version your change with git<br />
* Repeat<br />
<br />
When you change too much, it will simply not work and you most likely will have no idea why it does not work. Go back to the last working version and do smaller changes at a time.<br />
<br />
=== Regenerating the two initramfs from the phone ===<br />
<br />
You can regenerate both initramfs, even if the first is in a <code>boot.img</code> by running as root<br />
<br />
sudo mkinitfs<br />
<br />
=== Tips and tricks ===<br />
<br />
* Familiarize with [[inspecting the initramfs]]<br />
* <code>pmbootstrap initfs</code> can do more than rebuilding the initramfs:<br />
<br />
<pre>% pmbootstrap initfs --help<br />
usage: pmbootstrap initfs [-h]<br />
{hook_ls,hook_add,hook_del,ls,build,extract} ...<br />
<br />
positional arguments:<br />
{hook_ls,hook_add,hook_del,ls,build,extract}<br />
hook_ls list available and installed hook packages<br />
hook_add add a hook package<br />
hook_del uninstall a hook package<br />
ls list initramfs contents<br />
build (re)build the initramfs<br />
extract extract the initramfs to a temporary folder<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit</pre><br />
<br />
=== Manual unpacking and repacking the initramfs file ===<br />
<br />
<syntaxhighlight lang="shell"><br />
$ zcat initfs.gz | sudo cpio -iv --make-directories # unpacks<br />
$ find . | cpio -ov --format=newc | gzip -c -1 > initfs-new.gz # packs; I've tested - this works. --format=newc is important!<br />
</syntaxhighlight><br />
<br />
Another way of unpacking<br />
<br />
<syntaxhighlight lang="shell"><br />
$ gzip -d initramfs.gz<br />
$ sudo cpio -iv --file=initramfs<br />
</syntaxhighlight><br />
<br />
=== Troubleshooting ===<br />
<br />
==== My device reboots with my customized init script ====<br />
<br />
This is probably caused by a syntax error. Use <code>shellcheck</code> to check your scripts for syntax errors. You could also loop forever or spawn a shell (if you have a hardware keyboard or serial cable connected) at some point for debugging (<code>while true; do sleep 1; done</code>) and use the telnet shell to test the commands, that are failing, interactively.<br />
<br />
==== No log output on serial! ====<br />
<br />
By default, all output from the initramfs get redirected to <code>/pmOS_init.log</code>. If you want the output through the debug cable you need to add <code>PMOS_NO_OUTPUT_REDIRECT</code> to your [[Troubleshooting:kernel#How_can_I_boot_the_kernel_with_some_specific_arguments.3F | kernel command line]].<br />
<br />
==== How do i show logs on the screen at boot? ====<br />
<br />
In order to disable the postmarketOS splash add PMOS_NOSPLASH to your kernel command line, in addition if you want the kernel logs to print to the screen make sure that console=tty0 is set in the [[Troubleshooting:kernel#How_can_I_boot_the_kernel_with_some_specific_arguments.3F | kernel command line]].<br />
<br />
<br />
[[Category:Technical Reference]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Initramfs_development&diff=34054
Initramfs development
2022-12-08T07:46:16Z
<p>Alexeymin: /* We have two initramfs files */</p>
<hr />
<div>This article explains how to modify the postmarketOS initramfs scripts, for which the source can be found in the [https://gitlab.com/postmarketOS/pmaports/tree/master/main/postmarketos-mkinitfs postmarketos-mkinitfs] pmaport. There's another page about adding a [[Device_specific_package#Initramfs_hook|device specific initramfs hook]].<br />
<br />
=== We have two initramfs files ===<br />
<br />
After the installation, you will have '''two''' initramfs files in your device's <code>/boot</code> folder.<br />
<br />
<pre>% ls ~/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100/boot<br />
initramfs initramfs-extra vmlinuz</pre><br />
Regular Linux distributions only have '''one''' initramfs file. '''We have split it''' into two to work around the size limitations that some devices have (see {{issue|126}}). The regular initramfs is relatively small (''~1.5 mb, and we could make it smaller if necessary!'') and loads the contents of the initramfs-extra from the pmOS boot partition during the boot process.<br />
<br />
The pmOS boot partition is a '''sub'''partition of the system partition (''SD cards: simply a real partition on the SD card''), so we can make it almost as big as we want.<br />
<br />
=== Recommended development workflow ===<br />
<br />
* Only do one small change at a time<br />
* Rebuild and test on device (<code>pmbootstrap initfs</code>, <code>pmbootstrap flasher flash_kernel</code>)<br />
* When it works, version your change with git<br />
* Repeat<br />
<br />
When you change too much, it will simply not work and you most likely will have no idea why it does not work. Go back to the last working version and do smaller changes at a time.<br />
<br />
=== Regenerating the two initramfs from the phone ===<br />
<br />
You can regenerate both initramfs, even if the first is in a <code>boot.img</code> by running as root<br />
<br />
mkinitfs -o /boot/initramfs-''your-device''<br />
<br />
=== Tips and tricks ===<br />
<br />
* Familiarize with [[inspecting the initramfs]]<br />
* <code>pmbootstrap initfs</code> can do more than rebuilding the initramfs:<br />
<br />
<pre>% pmbootstrap initfs --help<br />
usage: pmbootstrap initfs [-h]<br />
{hook_ls,hook_add,hook_del,ls,build,extract} ...<br />
<br />
positional arguments:<br />
{hook_ls,hook_add,hook_del,ls,build,extract}<br />
hook_ls list available and installed hook packages<br />
hook_add add a hook package<br />
hook_del uninstall a hook package<br />
ls list initramfs contents<br />
build (re)build the initramfs<br />
extract extract the initramfs to a temporary folder<br />
<br />
optional arguments:<br />
-h, --help show this help message and exit</pre><br />
<br />
=== Manual unpacking and repacking the initramfs file ===<br />
<br />
<syntaxhighlight lang="shell"><br />
$ zcat initfs.gz | sudo cpio -iv --make-directories # unpacks<br />
$ find . | cpio -ov --format=newc | gzip -c -1 > initfs-new.gz # packs; I've tested - this works. --format=newc is important!<br />
</syntaxhighlight><br />
<br />
Another way of unpacking<br />
<br />
<syntaxhighlight lang="shell"><br />
$ gzip -d initramfs.gz<br />
$ sudo cpio -iv --file=initramfs<br />
</syntaxhighlight><br />
<br />
=== Troubleshooting ===<br />
<br />
==== My device reboots with my customized init script ====<br />
<br />
This is probably caused by a syntax error. Use <code>shellcheck</code> to check your scripts for syntax errors. You could also loop forever or spawn a shell (if you have a hardware keyboard or serial cable connected) at some point for debugging (<code>while true; do sleep 1; done</code>) and use the telnet shell to test the commands, that are failing, interactively.<br />
<br />
==== No log output on serial! ====<br />
<br />
By default, all output from the initramfs get redirected to <code>/pmOS_init.log</code>. If you want the output through the debug cable you need to add <code>PMOS_NO_OUTPUT_REDIRECT</code> to your [[Troubleshooting:kernel#How_can_I_boot_the_kernel_with_some_specific_arguments.3F | kernel command line]].<br />
<br />
==== How do i show logs on the screen at boot? ====<br />
<br />
In order to disable the postmarketOS splash add PMOS_NOSPLASH to your kernel command line, in addition if you want the kernel logs to print to the screen make sure that console=tty0 is set in the [[Troubleshooting:kernel#How_can_I_boot_the_kernel_with_some_specific_arguments.3F | kernel command line]].<br />
<br />
<br />
[[Category:Technical Reference]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_POCO_F2_Pro_(xiaomi-lmi)&diff=32551
Xiaomi POCO F2 Pro (xiaomi-lmi)
2022-11-14T22:08:57Z
<p>Alexeymin: /* Links */</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = POCO F2 Pro (Redmi K30 Pro)<br />
| codename = xiaomi-lmi<br />
| image = File:Xiaomi-poco-f2-pro.jpg<br />
| imagecaption = POCO F2 Pro<br />
| releaseyear = 2020<br />
| category = testing<br />
| originalsoftware = Android 10, MIUI 12<br />
| chipset = Qualcomm SM8250 Snapdragon 865<br />
| cpu = 8-core (1x 2.84 GHz Kryo 585 & 3x 2.42 GHz Kryo 585 & 4x 1.80 GHz Kryo 585)<br />
| gpu = Adreno 650<br />
| storage = 128/256 GB<br />
| display = 1080 x 2400<br />
| memory = 6/8 GB<br />
| architecture = aarch64<br />
| status_usbnet = <br />
| status_flashing = <br />
| status_touch = <br />
| status_screen = <br />
| status_wifi = <br />
| status_xwayland = <br />
| status_fde = <br />
| status_mainline = <br />
| status_battery = <br />
| status_3d = <br />
| status_accel = <br />
| status_audio = <br />
| status_bluetooth = <br />
| status_camera = <br />
| status_gps = <br />
| status_mobiledata = <br />
| status_sms = <br />
| status_calls = <br />
| status = none<br />
| booting = no<br />
| pmoskernel = <br />
| whet_dhry = <br />
| status_otg = <br />
}}<br />
<br />
== Contributors ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Maintainer(s) ==<br />
<!-- * ''[[user:handle|Nick name]]'' --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
=== Recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Same as recovery, but this time hold the {{button|Volume Down}} and {{button|Power}} keys.<br />
<br />
<br />
== Links ==<br />
<!-- * {{MR|1095|pmaports}} Initial merge request --><br />
* [https://www.gsmarena.com/xiaomi_poco_f2_pro-10220.php GSMARENA]<br />
* [http://www.deviceinfohw.ru/devices/item.php?item=74897 Deviceinfo HW link]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Note_3_(xiaomi-jason)&diff=31751
Xiaomi Mi Note 3 (xiaomi-jason)
2022-10-18T10:18:01Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Note 3<br />
| codename = xiaomi-jason<br />
| image = File:Xiaomi-mi-note3-.jpg<br />
| imagecaption = Xiaomi Mi Note 3<br />
| releaseyear = 2017<br />
| originalsoftware = Android 7.1, upgradable to Android 9.0<br />
| chipset = Qualcomm SDM660 Snapdragon 660<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 64 GB<br />
| display = 1080 x 1920<br />
| memory = 6 GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment --><br />
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. --><br />
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. --><br />
| status_screen = <!-- The display is working? --><br />
| status_wifi = <!-- Wireless network works? --><br />
| status_xwayland = <!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? --><br />
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? --><br />
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. --><br />
| status_battery = <!-- Charging the battery with charging-sdl is possible --><br />
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) --><br />
| status_accel = <!-- The sensor that measures proper acceleration works --><br />
| status_audio = <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol --><br />
| status_camera = <!-- Taking photos and videos works. --><br />
| status_gps = <!-- The Global Positioning System sensor works. --><br />
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = <!-- Talking to other people over the cellular network. --><br />
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" --><br />
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* --><br />
<br />
<!-- you can also use these lines if you need to:<br />
Version of the kernel that pmos is running<br />
| pmoskernel = 3.x.x<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* [[User:Alexeymin]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
You may have to use older version of official Mi Unlock tool, search internet for <code>miflash_unlock-en-5.5.224.55</code>.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold the {{button|Volume Down}} while powering on the device or while rebooting it.<br />
<br />
=== How to enter recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
Recovery mode is not used to flash the device. Flash device from fastboot mode.<br />
<br />
== Installation ==<br />
<!-- add more sections below as necessary, e.g. WiFi, photos, ... --><br />
<br />
== Additional info ==<br />
=== Debug UART ===<br />
On the same GPIO pins 4, 5 (blsp2_uart) as in [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)|xiaomi-lavender]] but different location on the board: TP708 is RX, TP707 is TX:<br />
<br />
[[File:Xiaomi-jason-uart-pins-schematic-01.png|200px|Xiaomi Mi Note 3 (jason) UART test pins on schema]] [[File:Xiaomi-jason-uart-pins-schematic-02.png|200px|Xiaomi Mi Note 3 (jason) UART test pins location on board]]<br />
<br />
=== partition layout ===<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition layout:<br />
<div class="mw-collapsible-content"><br />
<pre class="shell"><br />
jason:/ $ ls -l /dev/block/by-name<br />
total 0<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 abl -> /dev/block/mmcblk0p38<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ablbak -> /dev/block/mmcblk0p39<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 apdp -> /dev/block/mmcblk0p13<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk1 -> /dev/block/mmcblk0p4<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk10 -> /dev/block/mmcblk0p54<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk11 -> /dev/block/mmcblk0p65<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk2 -> /dev/block/mmcblk0p8<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk3 -> /dev/block/mmcblk0p9<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk4 -> /dev/block/mmcblk0p10<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk5 -> /dev/block/mmcblk0p11<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk6 -> /dev/block/mmcblk0p12<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk7 -> /dev/block/mmcblk0p17<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk8 -> /dev/block/mmcblk0p35<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk9 -> /dev/block/mmcblk0p43<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bluetooth -> /dev/block/mmcblk0p34<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 boot -> /dev/block/mmcblk0p62<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cache -> /dev/block/mmcblk0p67<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib -> /dev/block/mmcblk0p25<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64 -> /dev/block/mmcblk0p27<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64bak -> /dev/block/mmcblk0p28<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlibbak -> /dev/block/mmcblk0p26<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cust -> /dev/block/mmcblk0p68<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ddr -> /dev/block/mmcblk0p18<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfg -> /dev/block/mmcblk0p36<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfgbak -> /dev/block/mmcblk0p37<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devinfo -> /dev/block/mmcblk0p55<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dip -> /dev/block/mmcblk0p33<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 dpo -> /dev/block/mmcblk0p3<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dsp -> /dev/block/mmcblk0p58<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 frp -> /dev/block/mmcblk0p20<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 fsc -> /dev/block/mmcblk0p2<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 fsg -> /dev/block/mmcblk0p44<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hyp -> /dev/block/mmcblk0p23<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hypbak -> /dev/block/mmcblk0p24<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymaster -> /dev/block/mmcblk0p29<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymasterbak -> /dev/block/mmcblk0p30<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keystore -> /dev/block/mmcblk0p19<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 limits -> /dev/block/mmcblk0p7<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logdump -> /dev/block/mmcblk0p64<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logfs -> /dev/block/mmcblk0p53<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logo -> /dev/block/mmcblk0p59<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtp -> /dev/block/mmcblk0p57<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecapp -> /dev/block/mmcblk0p47<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecappbak -> /dev/block/mmcblk0p48<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 misc -> /dev/block/mmcblk0p42<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modem -> /dev/block/mmcblk0p66<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst1 -> /dev/block/mmcblk0p45<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst2 -> /dev/block/mmcblk0p46<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 msadp -> /dev/block/mmcblk0p14<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 oops -> /dev/block/mmcblk0p56<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 persist -> /dev/block/mmcblk0p61<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmic -> /dev/block/mmcblk0p31<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmicbak -> /dev/block/mmcblk0p32<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 recovery -> /dev/block/mmcblk0p63<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpm -> /dev/block/mmcblk0p21<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpmbak -> /dev/block/mmcblk0p22<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 sec -> /dev/block/mmcblk0p5<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 splash -> /dev/block/mmcblk0p60<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 ssd -> /dev/block/mmcblk0p6<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 sti -> /dev/block/mmcblk0p41<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsec -> /dev/block/mmcblk0p15<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsecbak -> /dev/block/mmcblk0p16<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 switch -> /dev/block/mmcblk0p1<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 system -> /dev/block/mmcblk0p69<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 toolsfv -> /dev/block/mmcblk0p40<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tz -> /dev/block/mmcblk0p51<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tzbak -> /dev/block/mmcblk0p52<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 userdata -> /dev/block/mmcblk0p70<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xbl -> /dev/block/mmcblk0p49<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xblbak -> /dev/block/mmcblk0p50</pre><br />
</div><br />
</div><br />
<br />
== See also ==<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
You can also add normal web links:<br />
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below.<br />
* {{Device package|xiaomi-jason}}<br />
* {{Kernel package|xiaomi-jason}}<br />
--><br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Note_3_(xiaomi-jason)&diff=31750
Xiaomi Mi Note 3 (xiaomi-jason)
2022-10-18T10:16:34Z
<p>Alexeymin: /* How to enter flash mode */</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Note 3<br />
| codename = xiaomi-jason<br />
| image = File:Xiaomi-mi-note3-.jpg<br />
| imagecaption = Xiaomi Mi Note 3<br />
| releaseyear = 2017<br />
| originalsoftware = Android 7.1, upgradable to Android 9.0<br />
| chipset = Qualcomm SDM660 Snapdragon 660<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 64 GB<br />
| display = 1080 x 1920<br />
| memory = 6 GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment --><br />
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. --><br />
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. --><br />
| status_screen = <!-- The display is working? --><br />
| status_wifi = <!-- Wireless network works? --><br />
| status_xwayland = <!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? --><br />
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? --><br />
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. --><br />
| status_battery = <!-- Charging the battery with charging-sdl is possible --><br />
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) --><br />
| status_accel = <!-- The sensor that measures proper acceleration works --><br />
| status_audio = <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol --><br />
| status_camera = <!-- Taking photos and videos works. --><br />
| status_gps = <!-- The Global Positioning System sensor works. --><br />
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = <!-- Talking to other people over the cellular network. --><br />
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" --><br />
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* --><br />
<br />
<!-- you can also use these lines if you need to:<br />
Version of the kernel that pmos is running<br />
| pmoskernel = 3.x.x<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* (put your username here!)<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
=== Bootloader Unlocking ===<br />
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock<br />
<br />
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)<br />
<br />
You may have to use older version of official Mi Unlock tool, search internet for <code>miflash_unlock-en-5.5.224.55</code>.<br />
<br />
=== Flashing (Download, Fastboot) mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold the {{button|Volume Down}} while powering on the device or while rebooting it.<br />
<br />
=== How to enter recovery mode ===<br />
* Turn the device off (or restart also works)<br />
* Hold {{button|Volume Up}} and {{button|Power}} button<br />
* Once you feel vibration and phone turns on, release {{button|Power}} button<br />
* Keep holding {{button|Volume Up}} until you get to recovery.<br />
<br />
Recovery mode is not used to flash the device. Flash device from fastboot mode.<br />
<br />
== Installation ==<br />
<!-- add more sections below as necessary, e.g. WiFi, photos, ... --><br />
<br />
== Additional info ==<br />
=== Debug UART ===<br />
On the same GPIO pins 4, 5 (blsp2_uart) as in [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)|xiaomi-lavender]] but different location on the board: TP708 is RX, TP707 is TX:<br />
<br />
[[File:Xiaomi-jason-uart-pins-schematic-01.png|200px|Xiaomi Mi Note 3 (jason) UART test pins on schema]] [[File:Xiaomi-jason-uart-pins-schematic-02.png|200px|Xiaomi Mi Note 3 (jason) UART test pins location on board]]<br />
<br />
=== partition layout ===<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition layout:<br />
<div class="mw-collapsible-content"><br />
<pre class="shell"><br />
jason:/ $ ls -l /dev/block/by-name<br />
total 0<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 abl -> /dev/block/mmcblk0p38<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ablbak -> /dev/block/mmcblk0p39<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 apdp -> /dev/block/mmcblk0p13<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk1 -> /dev/block/mmcblk0p4<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk10 -> /dev/block/mmcblk0p54<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk11 -> /dev/block/mmcblk0p65<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk2 -> /dev/block/mmcblk0p8<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk3 -> /dev/block/mmcblk0p9<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk4 -> /dev/block/mmcblk0p10<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk5 -> /dev/block/mmcblk0p11<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk6 -> /dev/block/mmcblk0p12<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk7 -> /dev/block/mmcblk0p17<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk8 -> /dev/block/mmcblk0p35<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk9 -> /dev/block/mmcblk0p43<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bluetooth -> /dev/block/mmcblk0p34<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 boot -> /dev/block/mmcblk0p62<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cache -> /dev/block/mmcblk0p67<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib -> /dev/block/mmcblk0p25<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64 -> /dev/block/mmcblk0p27<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64bak -> /dev/block/mmcblk0p28<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlibbak -> /dev/block/mmcblk0p26<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cust -> /dev/block/mmcblk0p68<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ddr -> /dev/block/mmcblk0p18<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfg -> /dev/block/mmcblk0p36<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfgbak -> /dev/block/mmcblk0p37<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devinfo -> /dev/block/mmcblk0p55<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dip -> /dev/block/mmcblk0p33<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 dpo -> /dev/block/mmcblk0p3<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dsp -> /dev/block/mmcblk0p58<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 frp -> /dev/block/mmcblk0p20<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 fsc -> /dev/block/mmcblk0p2<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 fsg -> /dev/block/mmcblk0p44<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hyp -> /dev/block/mmcblk0p23<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hypbak -> /dev/block/mmcblk0p24<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymaster -> /dev/block/mmcblk0p29<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymasterbak -> /dev/block/mmcblk0p30<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keystore -> /dev/block/mmcblk0p19<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 limits -> /dev/block/mmcblk0p7<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logdump -> /dev/block/mmcblk0p64<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logfs -> /dev/block/mmcblk0p53<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logo -> /dev/block/mmcblk0p59<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtp -> /dev/block/mmcblk0p57<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecapp -> /dev/block/mmcblk0p47<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecappbak -> /dev/block/mmcblk0p48<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 misc -> /dev/block/mmcblk0p42<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modem -> /dev/block/mmcblk0p66<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst1 -> /dev/block/mmcblk0p45<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst2 -> /dev/block/mmcblk0p46<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 msadp -> /dev/block/mmcblk0p14<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 oops -> /dev/block/mmcblk0p56<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 persist -> /dev/block/mmcblk0p61<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmic -> /dev/block/mmcblk0p31<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmicbak -> /dev/block/mmcblk0p32<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 recovery -> /dev/block/mmcblk0p63<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpm -> /dev/block/mmcblk0p21<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpmbak -> /dev/block/mmcblk0p22<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 sec -> /dev/block/mmcblk0p5<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 splash -> /dev/block/mmcblk0p60<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 ssd -> /dev/block/mmcblk0p6<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 sti -> /dev/block/mmcblk0p41<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsec -> /dev/block/mmcblk0p15<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsecbak -> /dev/block/mmcblk0p16<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 switch -> /dev/block/mmcblk0p1<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 system -> /dev/block/mmcblk0p69<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 toolsfv -> /dev/block/mmcblk0p40<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tz -> /dev/block/mmcblk0p51<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tzbak -> /dev/block/mmcblk0p52<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 userdata -> /dev/block/mmcblk0p70<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xbl -> /dev/block/mmcblk0p49<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xblbak -> /dev/block/mmcblk0p50</pre><br />
</div><br />
</div><br />
<br />
== See also ==<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
You can also add normal web links:<br />
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below.<br />
* {{Device package|xiaomi-jason}}<br />
* {{Kernel package|xiaomi-jason}}<br />
--><br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Asus_Zenfone_Max_Pro_M1_(asus-x00td)&diff=31588
Asus Zenfone Max Pro M1 (asus-x00td)
2022-10-12T06:01:55Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Asus<br />
| name = Zenfone Max Pro M1<br />
| codename = asus-x00td<br />
| image = File:Asus-x00td.jpg<br />
| imagecaption = Zenfone Max Pro M1<br />
| releaseyear = 2018<br />
| originalsoftware = Android 8.1<br />
| chipset = Qualcomm_Snapdragon_660_(SDM660)<br />
| cpu = 4x Cortex-A53 PERF cluster + 4x Cortex-A53 PWR cluster<br />
| gpu = Adreno 509<br />
| storage = 64 GB<br />
| display = 1080x2160 IPS LCD<br />
| memory = 3/4/6 GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? --><br />
| status_mainline = P<br />
| status_battery = <!-- Charging the battery with charging-sdl is possible --><br />
| status_3d = P<br />
| status_accel = <!-- The sensor that measures proper acceleration works --><br />
| status_audio = <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = Y<br />
| status_camera = <!-- Taking photos and videos works. --><br />
| status_gps = <!-- The Global Positioning System sensor works. --><br />
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = <!-- Talking to other people over the cellular network. --><br />
| status = Boots, not upstreamed, see {{MR|1484|pmaports}} for details<br />
| booting = yes<br />
| pmoskernel = 5.19.0<br />
<!-- Need to add after benchmarking<br />
| whet_dhry = 0.0<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* alice-koul<br />
<br />
== Maintainer(s) ==<br />
* Aboothahir<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<br />
== How to enter flash mode ==<br />
<br />
Unlock your phone's bootloader.<br />
<br />
Hold {{Button|Power}} and {{Button|Volume Up}} to enter fastboot mode.<br />
<br />
== Installation ==<br />
<br />
<syntaxhighlight lang=shell><br />
pmbootstrap flasher flash_rootfs<br />
<br />
pmbootstrap flasher flash_kernel<br />
</syntaxhighlight><br />
Please note, pmbootstrap flasher boot doesn't work<br />
<br />
== See also ==<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|1484|pmaports}} Initial merge request<br />
* [https://www.gsmarena.com/asus_zenfone_max_pro_(m1)_zb601kl_zb602k-9173.php GSM Arena for asus-x00td]<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|DEVICE_CODENAME}}<br />
* {{Kernel package|DEVICE_CODENAME}}<br />
--><br />
* [[Qualcomm_Snapdragon_660_(SDM660)]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=OnePlus_5_(oneplus-cheeseburger)&diff=31525
OnePlus 5 (oneplus-cheeseburger)
2022-10-11T00:11:17Z
<p>Alexeymin: /* Incorrect touchscreen orientation */</p>
<hr />
<div>{{Infobox device<br />
| booting = yes<br />
| status = Maintained, supported and upstream!<br />
| image = File:OnePlus-5-Phosh-Mainline.jpg<br />
| imagecaption = OnePlus 5T with Phosh on 5.15.0 mainline kernel!<br />
| manufacturer = OnePlus<br />
| name = 5<br />
| codename = oneplus-cheeseburger<br />
| releaseyear = 2017<br />
| category = testing<br />
| originalsoftware = Android 7.1.1 (up to 10) on Linux 4.4<br />
| pmoskernel = 5.16.0_rc6<br />
<!-- Hardware --><br />
| chipset = Qualcomm MSM8998 Snapdragon 835<br />
| cpu = Octa-core (4x 2.45 GHz Kryo 280 Gold + 4x 1.9 GHz Kryo 280 Silver)<br />
| gpu = Adreno 540<br />
| display = 1080x1920 Optic AMOLED<br />
| storage = 64/128 GB UFS 2.1<br />
| memory = 6/8 GB LPDDR4X RAM<br />
| architecture = aarch64<br />
| whet_dhry = 3919.7<br />
<!-- Features: the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = Y<br />
| status_audio = N <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = Y<br />
| status_camera = N <!-- Taking photos and videos works. --><br />
| status_gps = Y<br />
| status_mobiledata = N <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = N <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = N <!-- Talking to other people over the cellular network. --><br />
| status_otg = P <!-- Works fine on downstream, on mainline the DTS usb3_dwc3's dr_mode needs to be "host" on top of using a powered USB hub --><br />
| status_nfc = Y<br />
<!-- Sensors --><br />
| status_accel = N <!-- The sensor that measures proper acceleration works --><br />
| status_magnet = N<br />
| status_light = N<br />
| status_proximity = N<br />
| status_hall = Y<br />
<!-- Misc --><br />
| status_irtx = -<br />
| status_trustzone = N<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_835_(MSM8998)|Snapdragon 835}}<br />
<br />
The OnePlus 5T is very similar to the OnePlus 5; for information specific to the 5T, also read [[OnePlus 5T (oneplus-dumpling)]].<br />
<br />
== Entering fastboot mode ==<br />
The OnePlus 5/5T uses <code>fastboot</code> as its flashing protocol.<br />
<br />
Unplug from USB, hold {{Button|Power}} and {{Button|Volume Up}} until you see <code>FastBoot Mode</code> text.<br />
<br />
== Installation ==<br />
<br />
=== Prerequisites ===<br />
<br />
==== Fastboot ====<br />
Install <code>fastboot</code> on your host, refer to Google for instructions.<br />
<br />
==== Unlocking the bootloader ====<br />
<b>WARNING: Doing this will delete ALL your data on the device, so backup all your data before continuing!</b><br />
<br />
Before flashing postmarketOS you have to unlock your bootloader. The following is all that's needed to do this:<br />
<br />
1. Go to <code>Settings</code>, <code>About</code> and tap on the <code>Build number</code> 7 times until you get a message saying you are now a developer.<br />
<br />
2. Go back to <code>Settings</code>, <code>System</code> and <code>Developer options</code> to enable <code>OEM unlocking</code><br />
<br />
3. Refer to [[OnePlus 5 (oneplus-cheeseburger)#Entering_fastboot_mode|entering fastboot mode]] above and re-attach the USB cable afterwards. Run the following command on your host:<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
fastboot oem unlock<br />
</div><br />
4. Read the message displayed on your device screen, once happy confirm the unlock and continue to installing postmarketOS.<br />
<br />
=== Installing postmarketOS ===<br />
Follow the usual [[Installation guide|flashing guide via pmbootstrap]].<br />
{{note|<b>NOTE:</b> ONLY choose <code>alpine</code> kernel if you accept it will have MUCH less overall working features, otherwise always pick <code>mainline</code>!<br><br />
Downstream kernel port is also still available as <code>cheeseburger-downstream</code> codename, but usage of it is strongly discouraged and it's completely unmaintained!}}<br />
<br />
== Incorrect touchscreen orientation ==<br />
On some user interfaces such as Plasma Mobile you may have the touchscreen incorrectly oriented by 180 degrees (upside down); to fix that run the following in a <code>root</code> shell:<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
echo 'ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="Synaptics s3508", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"' | sudo tee /etc/udev/rules.d/21-oneplus5-ts.rules<br />
</div><br />
<br />
After that simply <code>reboot</code> to apply the new calibration matrix. Now the touchscreen should at least match the incorrectly upside-down display output so you can go in <code>Settings</code> > <code>Display Configuration</code> and select the inverted screen rotation option which will rotate the display to match the expected normal display rotation.<br />
<br />
I've still not added this as a part of the {{Device package|oneplus-cheeseburger}} because it causes the rotation to be broken in other environments, especially so in Xorg-based ones, but if that really remains the only problematic one perhaps it can be added as a subpackage with some <code>install_if</code> directive.<br />
<br />
See issue: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/160<br />
<br />
== Modem stability ==<br />
If Wi-Fi disconnects for any reason (including sleep, signal strength loss etc.) the modem remoteproc will crash and may not recover until a reboot.<br />
<br />
== LEDs ==<br />
The LEDs present on the device can be controlled via <code>sysfs</code> by writing values to their brightness control files as <code>root</code>. Here are some examples:<br />
<br />
Screen backlight brightness (0-255, 0-1023 on 5T)<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
echo 255 > /sys/class/backlight/c994000.dsi0/brightness<br />
</div><br />
<br />
Notification light brightness (0-255)<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
echo 255 > /sys/class/leds/notification-led/brightness<br />
</div><br />
<br />
Notification light color (0-255, R G B), e.g. green<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
echo 0 255 0 > /sys/class/leds/notification-led/multi_intensity<br />
</div><br />
<br />
The backlight for capacitive buttons can be enabled (1) or disabled (0)<br />
<div style="width: calc(100%-320px); overflow: auto;"><br />
echo 1 > /sys/class/leds/white\:kbd_backlight/brightness<br />
</div><br />
<br />
Control of the rear camera flashlight isn't yet possible; it's missing a driver on mainline.<br />
<br />
== Partition layout ==<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sda</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sda: 113.55 GiB, 121911640064 bytes, 29763584 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sda1 6 7 2 8K ssd<br />
/dev/sda2 8 8199 8192 32M persist<br />
/dev/sda3 8200 73735 65536 256M cache<br />
/dev/sda4 73736 73991 256 1M misc<br />
/dev/sda5 73992 74119 128 512K keystore<br />
/dev/sda6 74120 74247 128 512K frp<br />
/dev/sda7 74248 76807 2560 10M oem_dycnvbk<br />
/dev/sda8 76808 79367 2560 10M oem_stanvbk<br />
/dev/sda9 79368 79623 256 1M param<br />
/dev/sda10 79624 81647 2024 7.9M reserve1<br />
/dev/sda11 81648 85695 4048 15.8M reserve2<br />
/dev/sda12 85696 85823 128 512K config<br />
/dev/sda13 85824 29763578 29677755 113.2G userdata<br />
</div><br />
</div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdb</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sdb: 4 MiB, 4194304 bytes, 1024 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sdb1 6 1018 1013 4M xbl<br />
</div><br />
</div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdc</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sdc: 4 MiB, 4194304 bytes, 1024 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sdc1 6 1018 1013 4M xblbak<br />
</div><br />
</div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdd</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sdd: 128 MiB, 134217728 bytes, 32768 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sdd1 6 13 8 32K reserve<br />
/dev/sdd2 14 14 1 4K cdt<br />
/dev/sdd3 15 270 256 1M ddr<br />
/dev/sdd4 271 32762 32492 126.9M last_parti<br />
</div><br />
</div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sde</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sde: 4 GiB, 4294967296 bytes, 1048576 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sde1 6 133 128 512K rpm<br />
/dev/sde2 134 261 128 512K rpmbak<br />
/dev/sde3 262 773 512 2M tz<br />
/dev/sde4 774 1285 512 2M tzbak<br />
/dev/sde5 1286 1413 128 512K hyp<br />
/dev/sde6 1414 1541 128 512K hypbak<br />
/dev/sde7 1542 1545 4 16K sec<br />
/dev/sde8 1546 1673 128 512K pmic<br />
/dev/sde9 1674 1801 128 512K pmicbak<br />
/dev/sde10 1802 29961 28160 110M modem<br />
/dev/sde11 29962 34057 4096 16M dsp<br />
/dev/sde12 34058 35081 1024 4M mdtpsecapp<br />
/dev/sde13 35082 36105 1024 4M mdtpsecappbak<br />
/dev/sde14 36106 36361 256 1M dip<br />
/dev/sde15 36362 44553 8192 32M mdtp<br />
/dev/sde16 44554 46601 2048 8M abl<br />
/dev/sde17 46602 48649 2048 8M ablbak<br />
/dev/sde18 48650 52745 4096 16M LOGO<br />
/dev/sde19 52746 69129 16384 64M boot<br />
/dev/sde20 69130 85513 16384 64M boot_aging<br />
/dev/sde21 85514 871945 786432 3G system<br />
/dev/sde22 871946 888329 16384 64M recovery<br />
/dev/sde23 888330 888330 1 4K devinfo<br />
/dev/sde24 888331 888586 256 1M bluetooth<br />
/dev/sde25 888587 888714 128 512K keymaster<br />
/dev/sde26 888715 888842 128 512K keymasterbak<br />
/dev/sde27 888843 888970 128 512K cmnlib<br />
/dev/sde28 888971 889098 128 512K cmnlibbak<br />
/dev/sde29 889099 889226 128 512K cmnlib64<br />
/dev/sde30 889227 889354 128 512K cmnlib64bak<br />
/dev/sde31 889355 889418 64 256K apdp<br />
/dev/sde32 889419 889482 64 256K msadp<br />
/dev/sde33 889483 889483 1 4K dpo<br />
/dev/sde34 889484 897839 8356 32.7M splash<br />
/dev/sde35 897840 897840 1 4K limits<br />
/dev/sde36 897841 898096 256 1M toolsfv<br />
/dev/sde37 898097 900144 2048 8M logfs<br />
/dev/sde38 900145 900656 512 2M sti<br />
/dev/sde39 900657 900688 32 128K devcfg<br />
/dev/sde40 900689 917072 16384 64M logdump<br />
/dev/sde41 917073 917104 32 128K storsec<br />
/dev/sde42 917105 917136 32 128K storsecbak<br />
/dev/sde43 917137 917648 512 2M fw_4j1ed<br />
/dev/sde44 917649 918160 512 2M fw_8v1ee<br />
/dev/sde45 918161 918672 512 2M fw_4g9n4<br />
/dev/sde46 918673 919184 512 2M fw_4t0n8<br />
/dev/sde47 919185 1048570 129386 505.4M minidump<br />
/dev/sde48 927377 927377 0 0B last_parti<br />
</div><br />
</div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
<code>oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdf</code><br />
<div class="mw-collapsible-content"><br />
Disk /dev/sdf: 1.51 GiB, 1610612736 bytes, 393216 sectors<br />
Disk model: KLUDG8V1EE-B0C1 <br />
Units: sectors of 1 * 4096 = 4096 bytes<br />
Sector size (logical/physical): 4096 bytes / 4096 bytes<br />
I/O size (minimum/optimal): 8192 bytes / 8192 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20<br />
<br />
Device Start End Sectors Size Name<br />
/dev/sdf1 6 517 512 2M modemst1<br />
/dev/sdf2 518 1029 512 2M modemst2<br />
/dev/sdf3 1030 1541 512 2M fsg<br />
/dev/sdf4 1542 1542 1 4K fsc<br />
/dev/sdf5 1543 1670 128 512K md5<br />
/dev/sdf6 1671 263814 262144 1G vendor<br />
/dev/sdf7 263815 393182 129368 505.4M reserve3<br />
/dev/sdf8 267863 267863 0 0B last_parti<br />
</div><br />
</div><br />
<br />
== Community Info ==<br />
<br />
=== postmarketOS users that own the device ===<br />
{{Device owners}}<br />
<!--<br />
<br />
If you own this device, you can add the text below or something similar under your user profile:<br />
== Owns Devices ==<br />
{{Owns device|OnePlus_5_(oneplus-cheeseburger)|Additional notes by you e.g. Broken touchscreen digitizer}}<br />
{{My devices}}<br />
<br />
--><br />
=== Maintainers ===<br />
* [[User:Deathmist|Deathmist]]<br />
<br />
=== Contributors ===<br />
* [[User:Deathmist|Deathmist]]<br />
* R0551 (mainlining)<br />
<br />
== See also ==<br />
* {{MR|908|pmaports}} Initial merge request<br />
* {{MR|2591|pmaports}} Mainline enablement merge request<br />
* {{MR|3336|pmaports}} Alpine linux-edge enablement merge request<br />
* {{Device package|oneplus-cheeseburger}}<br />
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-oneplus-msm8998 Shared kernel package]<br />
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-postmarketos-qcom-msm8998 Shared mainline MSM8998 kernel package]<br />
* {{Firmware package|oneplus-msm8998}}<br />
* {{wikipedia|OnePlus_5|Wiki page for device}}<br />
* [https://github.com/LineageOS/android_kernel_oneplus_msm8998 LineageOS downstream kernel fork]<br />
* [https://gitlab.com/msm8998-mainline/linux Close to mainline kernel source]<br />
* [https://github.com/torvalds/linux Linux mainline kernel source (torvalds)]<br />
* [[OnePlus 5T (oneplus-dumpling)]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=OnePlus_6T_(oneplus-fajita)&diff=31012
OnePlus 6T (oneplus-fajita)
2022-09-19T16:28:16Z
<p>Alexeymin: /* External Links */</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = OnePlus<br />
| name = 6T<br />
| codename = oneplus-fajita<br />
| image = File:Oneplus6t.jpg<br />
| imagecaption = OnePlus 6T running Phosh<br />
| releaseyear = 2018<br />
| category = community<br />
| originalsoftware = Android 8.0 (Up to Android 10) on Linux 4.9<br />
| chipset = Qualcomm SDM845 Snapdragon 845<br />
| cpu = Octa-core (4x 2.8 GHz Kryo 385 Gold & 4x 1.7 GHz Kryo 385 Silver)<br />
| gpu = Adreno 630<br />
| storage = 128 GB / 256 GB<br />
| display = 1080 x 2340 AMOLED<br />
| memory = 6 GB / 8 GB / 10 GB (McLaren Edition)<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = Y<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = P<br />
| status_3d = Y<br />
| status_accel = N<br />
| status_haptics = Y<br />
| status_audio = N<br />
| status_bluetooth = Y<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = Y<br />
| status_sms = Y<br />
| status_calls = N<br />
| status = Maintained, supported and upstream!<br />
| booting = yes<br />
| pmoskernel = 5.14_rc6<br />
| whet_dhry = 6029.9<br />
| status_otg = P<br />
| status_nfc = N<br />
| status_irtx = -<br />
}}<br />
{{Based on SoC|Qualcomm_Snapdragon_845_(SDM845)|Snapdragon 845}}<br />
<br />
{{note|NOTE TO WIKI EDITORS! This page should only be used to document OnePlus 6T specific features, for anything which is the same between it and the OnePlus 6 please add information there instead}}<br />
<br />
This page documents the status of mainline Linux on the OnePlus 6T. <br />
<br />
{{notice|THIS PAGE IS SUPPLEMENTARY TO THE ONEPLUS 6 PAGE, REFER TO IT [[OnePlus 6 (oneplus-enchilada)|HERE]] BEFORE ATTEMPTING TO INSTALL POSTMARKETOS}}<br />
<br />
= Differences to OnePlus 6 =<br />
<br />
It shares almost all hardware with the [[OnePlus 6 (oneplus-enchilada)|OnePlus 6]] (non-T), with the following differences:<br />
<br />
* no 3.5 mm audio jack<br />
* a slightly different screen resolution.<br />
<br />
= Special Boot Modes =<br />
<br />
== Fastboot Mode ==<br />
<br />
When you access Fastboot Mode, you can view information about the SoC and whether the bootloader (DEVICE STATE) is locked or unlocked.<br />
<br />
While in Fastboot Mode you can use a computer to issue Fastboot commands to flash firmware to the device and manage the current slot that the bootloader is using to boot the operating system.<br />
<br />
You can also use {{Button|Volume Up}} + {{Button|Volume Down}} to select an action from the menu at the top of the screen, and {{Button|Power}} to select the action; which include powering off the device, continuing booting to the operating system, and restarting the bootloader which is useful if Fastboot commands are failing.<br />
<br />
=== Enter Fastboot Mode ===<br />
<br />
With the device unplugged and powered off, hold {{Button|Volume Up}} + {{Button|Volume Down}} + {{Button|Power}}. Once you feel the device power on, continue holding {{Button|Volume Up}} + {{Button|Volume Down}} until you reach Fastboot Mode.<br />
<br />
==== Unlock the bootloader ====<br />
<br />
Before installing postmarketOS you have to unlock your bootloader. For the T-mobile version of the device in the US, refer to Google for guides on obtaining an unlock code. Alternatively if you can't get the unlock code, or don't want to wait, you can use MSMDownloadTool to fully reflash device internal storage to old stock international ROM, where fastboot doesn't require unlock codes: [https://forum.xda-developers.com/t/t-mobile-6t-to-international-conversion-without-unlocked-bootloader-sim-unlock.3888307/ this guide from XDA should help]. You will need a windows PC, qualcomm usb drivers and use EDL mode.<br />
<br />
<br />
If your device is not carrier locked, the following is all that's needed to unlock the bootloader:<br />
<br />
* Open setting, go to "About" and tap on the "build number" box ~10 times until you get a message saying you are now a developer.<br />
* Go back to the main settings page, go to system and then developer options (it might be hiding behind a drop down). Toggle the switch to "enable OEM unlocking"<br />
* Refer to "how to enter flash mode" above to get into fastboot mode, then re-attach your USB cable. Run the following command on your host:<br />
<br />
<pre><br />
fastboot oem unlock<br />
</pre><br />
<br />
* Read the message displayed on your device screen, once you're happy confirm the unlock. <b>THIS WILL ERASE YOUR DEVICE</b>.<br />
<br />
== EDL Mode ==<br />
<br />
Qualcomm Emergency DownLoad (EDL) Mode is a special low-power boot option that is intended to be used by OEMs to install firmware on presumably new and bricked devices alike.<br />
<br />
You can use EDL Mode to enjoy fast offline charging speeds until the kernel gains driver support for fast online charging.<br />
<br />
=== Enter EDL Mode ===<br />
<br />
With the device unplugged and powered off, hold {{Button|Volume Up}} + {{Button|Volume Down}} while you plug the device in to charge.<br />
<br />
Rather than automatically booting as normal, the device will appear to do nothing, after a couple of seconds you can release the buttons.<br />
<br />
=== Exit EDL Mode ===<br />
<br />
Restart the device by holding {{Button|Power}} for 10 - 15 seconds (the time seems to vary).<br />
<br />
= Community Info =<br />
<br />
== postmarketOS users that own the device ==<br />
<br />
{{Device owners}}<br />
<br />
== Maintainers ==<br />
<br />
* [[User:Kalube|Caleb]]<br />
<br />
= See also =<br />
<br />
== Internal pages ==<br />
<br />
* [[OnePlus 6 (oneplus-enchilada)]]<br />
<br />
== External Links ==<br />
<br />
* [https://gitlab.com/sdm845-mainline/linux Kernel sources]<br />
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/community/linux-postmarketos-qcom-sdm845 Kernel package]<br />
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/community/device-oneplus-fajita Fajita device package]<br />
<br />
<br />
__FORCETOC__</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Xiaomi_Mi_Note_3_(xiaomi-jason)&diff=29776
Xiaomi Mi Note 3 (xiaomi-jason)
2022-07-29T20:39:01Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Xiaomi<br />
| name = Mi Note 3<br />
| codename = xiaomi-jason<br />
| image = File:Xiaomi-mi-note3-.jpg<br />
| imagecaption = Xiaomi Mi Note 3<br />
| releaseyear = 2017<br />
| originalsoftware = Android 7.1, upgradable to Android 9.0<br />
| chipset = Qualcomm SDM660 Snapdragon 660<br />
| cpu = 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)<br />
| gpu = Adreno 512<br />
| storage = 64 GB<br />
| display = 1080 x 1920<br />
| memory = 6 GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment --><br />
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. --><br />
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. --><br />
| status_screen = <!-- The display is working? --><br />
| status_wifi = <!-- Wireless network works? --><br />
| status_xwayland = <!-- Showing X11 applications in a Wayland compositor (Weston, KWin, ...) works? --><br />
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard? --><br />
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. --><br />
| status_battery = <!-- Charging the battery with charging-sdl is possible --><br />
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) --><br />
| status_accel = <!-- The sensor that measures proper acceleration works --><br />
| status_audio = <!-- Using the device's speakers/headphone jack works --><br />
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol --><br />
| status_camera = <!-- Taking photos and videos works. --><br />
| status_gps = <!-- The Global Positioning System sensor works. --><br />
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --><br />
| status_sms = <!-- Sending and receiving short messages works as intended. --><br />
| status_calls = <!-- Talking to other people over the cellular network. --><br />
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" --><br />
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* --><br />
<br />
<!-- you can also use these lines if you need to:<br />
Version of the kernel that pmos is running<br />
| pmoskernel = 3.x.x<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
{{Based on SoC|Qualcomm_Snapdragon_660_(SDM660)|Snapdragon 660}}<br />
<br />
== Contributors ==<br />
* (put your username here!)<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<!-- This person needs to be willing to answer questions from users of this device --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
<br />
== Installation ==<br />
<!-- add more sections below as necessary, e.g. WiFi, photos, ... --><br />
<br />
== Additional info ==<br />
=== Debug UART ===<br />
On the same GPIO pins 4, 5 (blsp2_uart) as in [[Xiaomi_Redmi_Note_7_(xiaomi-lavender)|xiaomi-lavender]] but different location on the board: TP708 is RX, TP707 is TX:<br />
<br />
[[File:Xiaomi-jason-uart-pins-schematic-01.png|200px|Xiaomi Mi Note 3 (jason) UART test pins on schema]] [[File:Xiaomi-jason-uart-pins-schematic-02.png|200px|Xiaomi Mi Note 3 (jason) UART test pins location on board]]<br />
<br />
=== partition layout ===<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width: 620px; overflow: auto;"><br />
Partition layout:<br />
<div class="mw-collapsible-content"><br />
<pre class="shell"><br />
jason:/ $ ls -l /dev/block/by-name<br />
total 0<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 abl -> /dev/block/mmcblk0p38<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ablbak -> /dev/block/mmcblk0p39<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 apdp -> /dev/block/mmcblk0p13<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk1 -> /dev/block/mmcblk0p4<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk10 -> /dev/block/mmcblk0p54<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk11 -> /dev/block/mmcblk0p65<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk2 -> /dev/block/mmcblk0p8<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 bk3 -> /dev/block/mmcblk0p9<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk4 -> /dev/block/mmcblk0p10<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk5 -> /dev/block/mmcblk0p11<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk6 -> /dev/block/mmcblk0p12<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk7 -> /dev/block/mmcblk0p17<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk8 -> /dev/block/mmcblk0p35<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bk9 -> /dev/block/mmcblk0p43<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 bluetooth -> /dev/block/mmcblk0p34<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 boot -> /dev/block/mmcblk0p62<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cache -> /dev/block/mmcblk0p67<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib -> /dev/block/mmcblk0p25<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64 -> /dev/block/mmcblk0p27<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlib64bak -> /dev/block/mmcblk0p28<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cmnlibbak -> /dev/block/mmcblk0p26<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 cust -> /dev/block/mmcblk0p68<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 ddr -> /dev/block/mmcblk0p18<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfg -> /dev/block/mmcblk0p36<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devcfgbak -> /dev/block/mmcblk0p37<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 devinfo -> /dev/block/mmcblk0p55<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dip -> /dev/block/mmcblk0p33<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 dpo -> /dev/block/mmcblk0p3<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 dsp -> /dev/block/mmcblk0p58<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 frp -> /dev/block/mmcblk0p20<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 fsc -> /dev/block/mmcblk0p2<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 fsg -> /dev/block/mmcblk0p44<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hyp -> /dev/block/mmcblk0p23<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 hypbak -> /dev/block/mmcblk0p24<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymaster -> /dev/block/mmcblk0p29<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keymasterbak -> /dev/block/mmcblk0p30<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 keystore -> /dev/block/mmcblk0p19<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 limits -> /dev/block/mmcblk0p7<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logdump -> /dev/block/mmcblk0p64<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logfs -> /dev/block/mmcblk0p53<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 logo -> /dev/block/mmcblk0p59<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtp -> /dev/block/mmcblk0p57<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecapp -> /dev/block/mmcblk0p47<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 mdtpsecappbak -> /dev/block/mmcblk0p48<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 misc -> /dev/block/mmcblk0p42<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modem -> /dev/block/mmcblk0p66<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst1 -> /dev/block/mmcblk0p45<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 modemst2 -> /dev/block/mmcblk0p46<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 msadp -> /dev/block/mmcblk0p14<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 oops -> /dev/block/mmcblk0p56<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 persist -> /dev/block/mmcblk0p61<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmic -> /dev/block/mmcblk0p31<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 pmicbak -> /dev/block/mmcblk0p32<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 recovery -> /dev/block/mmcblk0p63<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpm -> /dev/block/mmcblk0p21<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 rpmbak -> /dev/block/mmcblk0p22<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 sec -> /dev/block/mmcblk0p5<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 splash -> /dev/block/mmcblk0p60<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 ssd -> /dev/block/mmcblk0p6<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 sti -> /dev/block/mmcblk0p41<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsec -> /dev/block/mmcblk0p15<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 storsecbak -> /dev/block/mmcblk0p16<br />
lrwxrwxrwx 1 root root 20 1974-12-01 20:16 switch -> /dev/block/mmcblk0p1<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 system -> /dev/block/mmcblk0p69<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 toolsfv -> /dev/block/mmcblk0p40<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tz -> /dev/block/mmcblk0p51<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 tzbak -> /dev/block/mmcblk0p52<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 userdata -> /dev/block/mmcblk0p70<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xbl -> /dev/block/mmcblk0p49<br />
lrwxrwxrwx 1 root root 21 1974-12-01 20:16 xblbak -> /dev/block/mmcblk0p50</pre><br />
</div><br />
</div><br />
<br />
== See also ==<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
You can also add normal web links:<br />
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below.<br />
* {{Device package|xiaomi-jason}}<br />
* {{Kernel package|xiaomi-jason}}<br />
--><br />
<br />
[[Category:Devices with known UART pinout]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=29712
User:Alexeymin
2022-07-27T17:58:46Z
<p>Alexeymin: </p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User SourceHut|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|Test subject #1.2. For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|For occasional pmOS testing}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, almost like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Test subject #1.1. Old phone in good shape with new battery}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|I'll have to give up on this port temporarily, to keep sanity}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|In my hands again! 6/64 variant}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|Daily driver, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|Test subject #2}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: [[Template:Infobox_device]], [[PostmarketOS:Templates]], [https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10 Search in Templates namespace]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=29711
User:Alexeymin
2022-07-27T17:55:46Z
<p>Alexeymin: </p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User SourceHut|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|Test subject #1.2. For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|For occasional pmOS testing}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, almost like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Test subject #1.1. Old phone in good shape with new battery}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|I'll have to give up on this port temporarily, to keep sanity}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|In my hands again!}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|Daily driver, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|Test subject #2}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: [[Template:Infobox_device]], [[PostmarketOS:Templates]], [https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10 Search in Templates namespace]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=29412
User:Alexeymin
2022-07-17T23:51:37Z
<p>Alexeymin: </p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|for some future developments, maybe}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Old phone, but in good shape, with new battery. Current mainlining playground}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|possible future test subject}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|still owned by family member}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|New daily, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|possible future test subject}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: [[Template:Infobox_device]], [[PostmarketOS:Templates]], [https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10 Search in Templates namespace]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=User:Alexeymin&diff=29198
User:Alexeymin
2022-07-09T16:46:31Z
<p>Alexeymin: </p>
<hr />
<div><div style="float: right;"><br />
{{User ports|3}} <!-- klte, lavender and cepheus --><br />
{{User mainline attempts}}<br />
{{User GitLab|minlexx}}<br />
{{User main device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)}}<br />
</div><br />
== Alexey Minnekhanov ==<br />
=== Contacts: ===<br />
Matrix: <code>@alexey.min:kde.org</code><br />
<br />
Mastdon: <code>@alexeymin@fosstodon.org</code> [https://fosstodon.org/@alexeymin Mastodon]<br />
<br />
Telegram: [https://t.me/minlexx @minlexx]<br />
<br />
E-mail: alexey.min at gmail<br />
<br />
== Owns devices ==<br />
{{My devices}}<br />
{{Owns device|Google_Nexus_5_(lg-hammerhead)|For pmOS development}}<br />
{{Owns device|OnePlus_6T_(oneplus-fajita)|for some future developments, maybe}}<br />
{{Owns device|PINE64_Pinebook_Pro_(pine64-pinebookpro)|Running postmarketOS}}<br />
{{Owns device|PINE64_PineTab_(pine64-pinetab)|Engineering sample, only 1Gb RAM, bad connection to keyboard pogo pins}}<br />
{{Owns device|Samsung_Galaxy_A5_2015_(samsung-a5)|SM-A500F (not FU) replaced battery, like new now}}<br />
{{Owns device|Samsung_Galaxy_S5_(samsung-klte)|Old phone, but in good shape, with new battery. Current mainlining playground}}<br />
{{Owns device|Xiaomi_Mi_9_(xiaomi-cepheus)|possible future test subject}}<br />
{{Owns device|Xiaomi_Mi_Note_3_(xiaomi-jason)|still owned by family member}}<br />
{{Owns device|Xiaomi_POCO_F2_Pro_(xiaomi-lmi)|New daily, 8/256 variant}}<br />
{{Owns device|Xiaomi_Redmi_Note_7_(xiaomi-lavender)|possible future test subject}}<br />
<br />
== Bookmarks ==<br />
* My edits on wiki: [[Special:Contributions/Alexeymin]]<br />
* [[User:Alexeymin/Kernel_development_in_chroot_using_abuild]]<br />
* SoCs: [[Qualcomm_Snapdragon_660_(SDM660)]], [[Qualcomm_Snapdragon_800/801_(MSM8974)]], [[Qualcomm_Snapdragon_855_(SM8150)]]<br />
* [[SoC_Communities]]<br />
* [[User:TravMurav/Dual-Sim_QMI_draft]]<br />
* [[U-Boot_porting]]<br />
* [[Kernel_upgrade_testing]]<br />
* Templates: https://wiki.postmarketos.org/wiki/Special:AllPages?from=&to=&namespace=10, [[Template:Infobox_device]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=PINE64_Pinebook_Pro_(pine64-pinebookpro)&diff=29179
PINE64 Pinebook Pro (pine64-pinebookpro)
2022-07-09T07:16:36Z
<p>Alexeymin: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = PINE64<br />
| name = Pinebook Pro<br />
| codename = pine64-pinebookpro<br />
| image = File:Pine-pinebookpro.jpg<br />
| imagecaption = The Pinebook Pro running Sway<br />
| releaseyear = 2019<br />
| category = community<br />
| originalsoftware = Linux 4.4.x<br />
| pmoskernel = 5.14<br />
| chipset = Rockchip RK3399<br />
| cpu = 4x 1.5 GHz Cortex-A53 & 2x 2Ghz Cortex-A72<br />
| gpu = Mali-T860 MP4<br />
| storage = 64GB eMMC (Upgradable)<br />
| memory = 4 GB<br />
| architecture = aarch64<br />
| n-android = ✔<br />
| whet_dhry = 2742.3<br />
| status_usbnet = -<br />
| status_flashing = -<br />
| status_touch = -<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = Y<br />
| status_fde = Y<br />
| status_mainline = Y<br />
| status_battery = Y<br />
| status_3d = Y<br />
| status_accel = -<br />
| status_audio = Y<br />
| status_bluetooth = Y<br />
| status_camera = Y<br />
| status_gps = -<br />
| status_mobiledata = -<br />
| status_sms = -<br />
| status_calls = -<br />
| status_otg = Y<br />
| status_nfc = -<br />
| status_usba = Y<br />
| status_hdmidp = -<br />
| status_keyboard = Y<br />
| status_touchpad = Y<br />
| status_irtx = -<br />
| status = Boots<br />
| booting = yes<br />
}}<br />
<br />
=== Contributors ===<br />
* ''[[user:MartijnBraam|MartijnBraam]]''<br />
<br />
=== Users owning this device ===<br />
{{Device owners}}<br />
<br />
== Serial console ==<br />
The Pinebook Pro has a serial port on the headphone connector, it's enabled by removing the bottom cover of the laptop and setting the UART switch towards the touchpad.<br />
<br />
The uart is 1500000n8<br />
<br />
The pinout for the serial connector on the laptop side is:<br />
<br />
* Tip: RX<br />
* Ring: TX<br />
* Sleeve: GND<br />
<br />
The serial connection is 3.3V<br />
<br />
You can also buy the debug cable from [https://store.pine64.org PINE64 Store].<br />
<br />
== Storage ==<br />
<br />
The SD card is /dev/mmcblk2 and the eMMC is /dev/mmcblk0<br />
<br />
== Booting ==<br />
<br />
The Pinebook Pro boots using u-boot. The bootrom in the rk3399 soc will [https://wiki.pine64.org/wiki/RK3399_boot_sequence look for u-boot on the SPI flash chip, then the eMMC and then the SD card slot]. It will boot the first functioning u-boot image it can find.<br />
<br />
There is also a work-in-progress graphical version of u-boot that can show the boot messages on the built-in display and present a menu for choosing which medium to boot. This u-boot build should also be able to boot<br />
generic ARM64 UEFI linux installations.<br />
<br />
The 3 ways to boot postmarketOS on the Pinebook Pro<br />
<br />
=== Booting from SD ===<br />
<br />
To boot from the SD the SPI bootloader and eMMC bootloader need to be disabled. Then the SoC will fallback to a bootloader on the SD card so postmarketOS can be fully booted from SD.<br />
<br />
The Pinebook Pro comes with an empty SPI chip from the factory so that doesn't need anything by default. To temporarily disable the eMMC booting you can open up the back cover and disable the eMMC switch on the main board or remove the eMMC chip from the socket.<br />
<br />
=== Booting from eMMC ===<br />
<br />
To boot it from eMMC you have to overwrite the OS that's on the eMMC already. This is possible to do from an OS booted from SD with the steps above, or by removing the eMMC from the socket and using an pine64 eMMC USB reader to write postmarketOS to it the same way as an SD card.<br />
<br />
=== Booting from SPI ===<br />
<br />
This requires flashing u-boot to the SPI. After u-boot has been flashed the other boot options won't be tried anymore so try at your own risk.<br />
<br />
== Updating the keyboard and touchpad firmware ==<br />
<br />
The default firmware in the keyboard controller and touchpad controller on the Pinebook Pro is not ideal, not all key combinations are possible (like the super key + arrow keys) and the mouse response is a bit sluggish and imprecise. Some PINE64 community members have made better firmware for the keyboard<br />
controller and the touchpad controller which fix these issues. <br />
<br />
The upgrade process requires a reboot between the steps and for ANSI models you need an external keyboard to continue the upgrade process (or being able to ssh into the laptop and run the second step).<br />
<br />
1. Identify the model of your Pinebook Pro.<br />
: There's an ANSI and an ISO layout variant of the laptop, if your keyboard has the {{button|\}} button on the left beside the shift key its an ISO, the ANSI model has the key above the {{button|Enter}} key.<br />
: You can also check the [https://commons.wikimedia.org/wiki/File:Physical_keyboard_layouts_comparison_ANSI_ISO.png keyboard layout illustration on wikimedia]<br />
2. Download and build the firmware updater<br />
: <source lang="shell-session"><br />
$ sudo apk add git curl vim alpine-sdk libusb-dev<br />
$ git clone https://github.com/jackhumbert/pinebook-pro-keyboard-updater.git<br />
$ cd pinebook-pro-keyboard-updater<br />
$ curl https://mirror.postmarketos.org/images/pinebookpro/tpfw.bin > firmware/tpfw.bin<br />
$ make<br />
</source><br />
3. Run the first stage of the updater. Warning: The built-in keyboard might not function correctly after this step, make sure you have an external keyboard<br />
: <source lang="shell-session"><br />
For ISO layout:<br />
$ sudo ./updater step-1 iso<br />
$ sudo poweroff<br />
<br />
For ANSI layout:<br />
$ sudo ./updater step-1 ansi<br />
$ sudo poweroff<br />
</source><br />
4. Turn the laptop back on and go back to the pinebook-pro-keyboard-updater directory. Then run the second stage of the updater<br />
: <source lang="shell-session"><br />
For ISO layout:<br />
$ sudo ./updater step-2 iso<br />
$ sudo poweroff<br />
<br />
For ANSI layout:<br />
$ sudo ./updater step-2 ansi<br />
$ sudo poweroff<br />
</source><br />
5. The touchpad is now fully updated after turning the laptop back on. The firmware on the keyboard controller is still the latest vendor firmware and can now be upgraded to the community version that fixes the key combinations by running stage 3<br />
: <source lang="shell-session"><br />
For ISO layout:<br />
$ sudo ./updater flash-kb firmware/default_iso.hex<br />
<br />
For ANSI layout:<br />
$ sudo ./updater flash-kb firmware/default_ansi.hex<br />
</source><br />
<br />
Congratulations, your firmware is now up-to-date.<br />
<br />
== Flashing u-boot to the SPI ==<br />
<br />
This will write a copy of the u-boot from the OS image to the SPI flash chip in the laptop. Once this has been done it will always boot from the SPI u-boot instead of the u-boot on the eMMC or SD card. This u-boot has the option to select the boot medium you want and also supports booting from USB storage.<br />
<br />
{{warning|If this messes up you need a soldering iron to fix booting}}<br />
{{warning|Booting from this u-boot might be a problem for older kernels}}<br />
{{warning|Another warning just in case}}<br />
<source lang="shell-session"><br />
$ apk add flashrom<br />
$ sudo flashrom --programmer linux_mtd --write /usr/share/u-boot/pine64-rockpro64/u-boot.spiflash.bin<br />
</source><br />
If you want to use u-boot from eMMC/SD again, erase SPI flash:<br />
<source lang="shell-session"><br />
$ sudo flashrom --programmer linux_mtd --erase<br />
</source><br />
<br />
== Video acceleration ==<br />
<br />
The rockchip rk3399 soc in the Pinebook Pro has a hardware video encoder and decoder called hantro, the open implementation supports mpeg2, h264 and h265 but not all profiles are supported on these codecs.<br />
<br />
The hardware decoder can be used in any media player that supports libva like vlc or mpv, the extra module that's needed is libva-v4l2-request https://github.com/bootlin/libva-v4l2-request from bootlin.<br />
After building and installing v4l2_request_drv_video.so the decoder can be enabled by adding these environment variables:<br />
<br />
<source lang="shell-session"><br />
$ export LIBVA_DRIVER_NAME=v4l2_request<br />
$ export LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video1<br />
$ mpv --hwdec video-file.mp4<br />
</source><br />
<br />
== Trobleshooting ==<br />
=== No audio on speakers ===<br />
If you can see the audio devices in pavucontrol/pulsemixer, and see volume meters "jumping" when playing audio, but no sound comes from speakers: launch alsamixer and try to unmute switches called "Left Headphone Mixer Left DAC" and "Right Headphone Mixer Right DAC". Turning these on made both speakers work (despite switches names saying headphones).<br />
<br />
== Kconfig ==<br />
<br />
This is just for documentation, the kernel ships configured correctly.<br />
<br />
<source lang="kconfig"><br />
CONFIG_ROCKCHIP_CDN_DP=n # important, if this is set the display won't come up<br />
CONFIG_BRCMFMAC_SDIO=y # wifi<br />
<br />
# Audio<br />
CONFIG_SND_SOC_SIMPLE_AMPLIFIER=y<br />
CONFIG_SND_SOC_ROCKCHIP=y<br />
CONFIG_SND_SOC_ES8316=y<br />
<br />
# Power<br />
CONFIG_CHARGER_GPIO=y<br />
CONFIG_BATTERY_CW2015=y<br />
CONFIG_TYPEC_FUSB302=y<br />
CONFIG_REGULATOR_FAN53555=y<br />
</source><br />
<br />
== See also ==<br />
* {{MR|882|pmaports}} Initial merge request<br />
* [https://wiki.pine64.org/index.php/Pinebook_Pro PINE64 Wiki page about PineBook Pro]<br />
* [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/PKGBUILD Manjaro Kernel PKGBUILD]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_SM8250_Snapdragon_865&diff=29030
Qualcomm SM8250 Snapdragon 865
2022-07-07T14:30:27Z
<p>Alexeymin: Redirected page to Qualcomm Snapdragon 865 (SM8250)</p>
<hr />
<div>#REDIRECT [[Qualcomm_Snapdragon_865_(SM8250)]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_SDM660_Snapdragon_660&diff=29029
Qualcomm SDM660 Snapdragon 660
2022-07-07T14:29:01Z
<p>Alexeymin: Redirected page to Qualcomm Snapdragon 660 (SDM660)</p>
<hr />
<div>#REDIRECT [[Qualcomm_Snapdragon_660_(SDM660)]]</div>
Alexeymin
https://wiki.postmarketos.org/index.php?title=Qualcomm_SM8150_Snapdragon_855&diff=29028
Qualcomm SM8150 Snapdragon 855
2022-07-07T14:28:20Z
<p>Alexeymin: Redirected page to Qualcomm Snapdragon 855 (SM8150)</p>
<hr />
<div>#REDIRECT [[Qualcomm_Snapdragon_855_(SM8150)]]</div>
Alexeymin