nyuuzyou/wikis huggingface dataset:
Pure Maps

__NOTOC__
Pure Maps displays vector and raster maps, places, routes, and provides navigation instructions.
== Installation ==
Pure Maps is available from postmarketOS' repository, and can as such be installed via:
 # apk add pure-maps
== Data providers ==
The displayed map data is fetched from a provider, which is usually converting data from OSM into a format suitable for map clients such as Pure Maps. As of writing, there is no default data provider configured when installing Pure Maps in postmarketOS. You must configure a provider to make the app useful.
=== Offline ===
The most privacy friendly way of using this application will be with the offline provider OSM Scout Server. See for an effort to package it in postmarketOS. In an early test it was noted, that running Pure Maps with OSM Scout Server requires a rather high amount of RAM with 2 GB, but maybe this can be optimized.
=== Online ===
When using an online provider, Pure Maps must send queries for tiles, search, and routing to the map provider. Make sure that this is what you want, and that you are fine with the privacy implications.
Find a suitable provider and register a free (developer) API key if necessary. Then configure Pure Maps in postmarketOS to use it.
To configure providers in the UI, first select the "Mixed" profile. Then in either of the "Search" or "Navigation" interfaces click the triple-dot button in the upper right to change providers.
To configure both profiles and providers with the config file, first close the app and then edit ~/.config/pure-maps/pure-maps.json . Note that the UI does not support adding or removing new profiles in this way. Changing the chosen profile and the providers used in each however works.
(If somebody went through the process for other API keys, please describe how to configure Pure Maps here.)
== Mapbox API ==
Register an account on Mapbox. Log in, and copy the "Default public token" to the Mapbox API Key.
Note that though they have a free tier, they may charge for over usage: https://www.mapbox.com/pricing/
== HERE API ==
# Register an account on https://platform.here.com/ and log in
# Go to the application listing at https://platform.here.com/admin/apps/ and press "Register new app"
# Give it a name and press the "Register" button
# On the new app's page, in the Credentials tab, go to the "API Keys" section and press the "Create credentials" button
After adding the API key to Pure Maps, close and re-open it. You will be required to accept a license that mentions that it is against the HERE ToS to mix HERE data sources with others: https://knowledge.here.com/csm_kb?id=public_kb_csm_details&number=KB0017825
Pure Maps implements this restriction with a dedicated HERE profile, which like all profiles can be easily edited in ~/.config/pure-maps/pure-maps.json
== See also ==
* initial merge request (with an interesting discussion with the lead developer about vendor lock-in)
* Unofficial usermanual.
Category:Apps
Purism Librem5 Devkit (purism-librem5dev)

== Contributors ==
* craftyguy
* bshah
== How to enter flash mode ==
The devkit has a switch on the same side as the reboot button, wifi switch, camera switch, and modem switch. Move it to the "USB Mode" position and hit the reboot button next to it in order to put the device into 'flash' mode.
== Installation ==
=== Flashing ===
pmbootstrap now has support for flashing the devkit with the flasher command. After running pmbootstrap install to generate a rootfs, the devkit can be flashed by putting it into 'USB mode' and executing pmbootstrap flasher flash_rootfs
Once the image has been flashed, place the device into emmc mode and hit the reboot button to start booting postmarketOS. The first boot can take a few minutes as it resizes the rootfs to fill all available space on the emmc disk.
=== Graphics ===
The Vivante GPU in the devkit is fully supported upstream in Mesa and support for it should be installed by the device-purism-librem5dev package.
== Todo ==
* Bring up cellular modem
* Resolve issues with Bluetooth
** Bluetooth can be started by loading the rsi_91x module with dev_oper_mode=14 but this disables Wifi station/client mode and enables Wifi AP mode. It doesn't seem to work with dev_oper_mode=13, which enables Wifi client mode. 
* Test/enable camera
* Test/enable ambient light sensor
== Ofono ==
As of 11/2019, ofono seems to "just work" when it is installed using "apk add ofono". Reasonable-looking signal information is reported, and calls seem to do something. I could not figure out how to route in-call audio, and it is possible that separate daemon is needed for that. https://source.puri.sm/Librem5/wys/blob/master/src/wys-audio.c
== See also ==
* Purism Librem5 devkit documentation
* MR that should enable modem support (untested, and now the ofono version is outdated; but maybe this is useful for future reference)
Push notifications

It's important to receive notifications from network during sleep mode*, but (unlike GMS calls or SMS messages) events from network is hard in that state. When phone suspend-to-ram the kernel freezes all processes and then set all unnecessary peripherials to their own power saving modes or suspend/shut down (if we don't need them to wake up), very hardware and peripherials's firmware spesific. Even the kernel goes RAM and gives control of the CPU to the firmware and then the CPU is basically shut down. Some peripherials can wake up the system and in mobile devices the modem belongs to these. The modem only go power-saving mode and still keep connection to the cellular network and if it receives a call or message, it wakes the system up. This (sleep-to-ram) is what Linux phones nowdays do, but in the future we will use stanby sleep-mode and receive notifications from the network as well. Then the kernel doesn't suspend the CPU or freeze all processes and the system need keep active connetion(s) to the services on network. The problem is we can't keep active connection to every service because the battery drains out. Android and iOS is solved this problem with Google Firebase Cloud Messaging and Apple Push Notification service, which means that every notification goes through these services. However, we also want notifications with only one or few active connections because battery-life.
* Remember, there is many various sleep modes like Suspend-to-Idle, Standby, Susbend-to-RAM, hibernation (actually not sleep mode) and compinations of these. This is important keep mind then talking about suspend. Typically phones use Standby or Suspend-to-RAM sleep modes..
== The solution ==
On Linux, the solution for problem of push notifications is follows: 
A few services are allowed to keep active connection when necessary and other notifications received with UnifiedPush protocol. UnifiedPush spesification standardize connection between application service -> push notification service (online) and notification push service (local via e.g. Dbus) -> application client.
Read more: UnifiedPush
== Notification softwares ==
* ntfy, WIP PR for Linux support
== Links ==
* https://conf.linuxappsummit.org/event/5/contributions/149/
Python

== Why Python? ==
Python is an easy to use programming/scripting language that can be used to quickly prototype mobile applications. It is possible to run and develop python programs on a postmarketOS installation. It is recommended that users install python 3. Due to the fact that postmarketOS uses busybox, it may be necessary to install extra files through apk if you are adding modules using pip. As per Pythons documentation, it is recommended that you install all add-on modules through pip and not through the distros package installer (apk)
== Installing with pmbootstrap ==
When using pmbootstrap init to setup your flash image, you have the option to add packages. add python3 in this section and it will be automatically installed in your image. pip comes bundled in this installation
== Installing modules ==
Below is a list of modules that are likely to be wanted by python users
* Kivy is a fantastic user interface for developing touch screen apps for a mobile device
* Pocketsphinx is a speech to text library developed at Carnegie Mellon University
Category:Technical Reference
QEMU ARM (qemu-vexpress)

=== Contributors ===
* MartijnBraam
* mmaret
* ollieparanoid
=== Usage ===
$ pmbootstrap init # Choose device "qemu-vexpress"
$ pmbootstrap install
$ pmbootstrap qemu --image-size=2G --display=gtk --arch=arm
Using the --display=gtk parameter is recommended. The default display, SDL, will show two windows (of which one is unused) and you won't be able to look at the serial output. In the GTK interface, click on View / Show Tabs to display all available outputs as tabs next to each other. Check the serial0 output for what it is actually doing as the boot will probably take a few minutes, unless you have a very fast PC.
=== What works ===
* Serial output
* Storage
* Network
=== What does not work ===
* Keyboard and mouse
* QEMU 2.0.0 is too old (but it's known to be working with 2.6.50)
=== Notes ===
* It boots only if you specify a separate -dtb flag, it doesn't use the dtb attached to the kernel (but pmbootstrap calls it right).
=== Links ===
* https://wiki.linaro.org/PeterMaydell/QemuVersatileExpress
=== Screenshot ===
* QEMU unlock screen
* QEMU running weston
=== See also ===
* QEMU
QEMU Nokia N900 (qemu-rx51)

With 4.6 kernel, Pali's patch to mmc and right config with command line inside, qemu works for N900 emulation, including running Weston.
I'm using this config option to configure kernel:
 CONFIG_CMDLINE="console=ttyO2,115200 console=tty root=/dev/mmcblk1p2 rootdelay=5 no-omap-wd no-ext-wd console=tty0 nokia-modem.pm=1 1 single"
And this script to prepare image / run it:
#!/usr/bin/python
import os
import time
def cmd(f):
 os.system(f)
class Run:
 def __init__(m):
 m.qemudir = "/data/l/maemo/qemu/"
 m.pmb_tmp = "/data/tmp/pmbootstrap"
 m.boot = m.pmb_tmp+"/chroot_rootfs_nokia-rx51/boot/"
 
 def run(m):
 # kernel = m.boot+"vmlinuz-postmarketos-dtb"
 kernel = "/data/l/linux-n900/arch/arm/boot/zImage-dtb"
 cmd("%s/qflasher -m rx51 -x %s/xloader-qemu.bin -s %s/secondary-qemu.bin -k %s -o n900.img -p k=16072" %
 (m.qemudir, m.qemudir, m.qemudir, kernel))
 #time.sleep(10)
 os.system("%s/qemu-system-arm -s -M n900 -mtdblock n900.img -sd /data/tmp/pmos.img -serial stdio -clock unix -redir tcp:5555:10.0.2.15:22" %
 m.qemudir)
r = Run()
r.run()
Special qemu version with n900 support is likely needed.
QEMU amd64 (qemu-amd64)

This device is used for testing purposes. It is possible to run postmarketOS in a x86_64 Virtual Machine.
== Contributors ==
* ollieparanoid
* MartijnBraam
* Minecrell
* drebrez
== What works ==
* Storage
* Network
* Keyboard and mouse
* Graphical interfaces (Weston, Plasma Mobile, ...)
* osk-sdl
* Audio
== Screenshots ==
* QEMU running weston
* QEMU running Plasma Mobile
* QEMU running postmarketos v24.12 with Plasma Mobile
QEMU s390x (qemu-s390x)

S/390 and the later System z (s390x) architecture are IBM's big iron hardware. You can hardly get such a machine under half a ton, and most people can't afford one either. This makes it rather impractical to actually, physically run postmarketOS on them. s390x is however interesting as an experimentation platform, to take pmOS to some of its limits. These machines boot without EFI or Devicetree and have a custom I/O architecture (instead of USB or PCI). s390x is one of the last remaining big-endian-only platforms for server use and the only big-endian architecture in Alpine.
This port is currently not at all upstreamed, and exists as a set of merge requests: pmbootstrap!2536 pmaports!6092 aports!78835
== Contributors ==
* jn
== What works ==
* Serial output
* SSH
* Graphical output via dri/virtio-gpu
* Keyboard and mouse
* i3wm
== What doesn't work ==
* Colors look a bit wrong, perhaps due to endianness bugs
* Many UIs can't be built (yet)
* 3D acceleration with virgl
== Gallery ==
Qt

== Incompatible Qt versions ==
When Qt upgrades, sometimes not every package is properly built against the right versions, causing the Cannot mix incompatible Qt library (version 0x50c04) with this library (version 0x50c03) error.
This message doesn't however say which library is using the wrong version and it can be hard to figure out.
To remedy this, Alexandr Akulich (Kaffeine) has created a script which finds the incompatible library so it can be rebuild.
>
#!/bin/sh
# This script is useful for investigation of errors like this:
# Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50800)
# Copyright (C) 2019 Alexandr Akulich
# Feel free to use however you want.
printUsage()
{
 echo "Usage: $0 <Qt version> <path>"
 echo ""
 echo "Examples:"
 echo " $0 5.11.2 /usr/lib/x86_64-linux-gnu"
 echo " $0 5.9.6 /opt/Qt/custom/lib/libQt5Core.so"
}
extractVersion()
{
 FULL_VERSION=$1
 
 VERSION_MAJOR=`echo $FULL_VERSION|cut -d '.' -f 1`
 VERSION_MINOR=`echo $FULL_VERSION|cut -d '.' -f 2`
 VERSION_PATCH=`echo $FULL_VERSION|cut -d '.' -f 3`
 VERSION_HEX=`printf "00%02x%02x%02x" $VERSION_MAJOR $VERSION_MINOR $VERSION_PATCH`
 
 echo "$VERSION_HEX"
}
checkFile()
{
 FILE=$1
 SUBJECT=$2
 hexdump -v -e '"%02x"' $FILE |grep $SUBJECT -q
}
QT_VERSION=$1
FILE_OR_DIRECTORY=$2
#echo "Checking path \"$FILE_OR_DIRECTORY\" for Qt version \"$QT_VERSION\""
if [ $# -ne 2 ]; then
 printUsage
 exit 0
fi
QT_VERSION_INT=$(extractVersion $QT_VERSION)
for FILE_ARG in $(find -L "$FILE_OR_DIRECTORY" -type f ); do
 if checkFile $FILE_ARG $QT_VERSION_INT; then
 echo "$FILE_ARG contains a reference to $QT_VERSION"
 fi
done
Qualcomm Camera Subsystem

Qualcomm SoCs contain a block called CAMSS (camera subsystem). For more information about some of the components that are part of it see Qualcomm Camera Subsystem driver - The Linux Kernel documentation.
This page only contains some more detailed information about the Qualcomm Camera Subsystem, for the general overview please view Camera#Qualcomm.
== Test pattern ==
The CSID part of CAMSS can produce a pattern useful for testing CAMSS without any data from the sensor (which would normally provide the data).
$ v4l2-ctl -d /dev/v4l-subdev3 -L
Image Processing Controls
 test_pattern 0x009f0903 (menu) : min=0 max=6 default=0 value=0 (Disabled)
 0: Disabled
 1: Incrementing
 2: Alternating 0x55/0xAA
 3: All Zeros 0x00
 4: All Ones 0xFF
 5: Pseudo-random Data
 6: User Specified
Newer SoCs additionally have the patterns "Complex pattern", "Color box" and "Color bars".
You can enable the test pattern using e.g. v4l2-ctl -d /dev/v4l-subdev3 -c test_pattern=2 to enable "Alternating 0x55/0xAA". Set to to 0/"Disabled" again to take the data from the sensor.
Also note, that most sensors also provide test patterns that can be used to test the pipeline from sensor to final picture, so CSID test pattern isn't the only test pattern available in V4L2.
File:Camss_test_pattern_1.jpg|Pattern 1
File:Camss_test_pattern_2.jpg|Pattern 2
File:Camss_test_pattern_3.jpg|Pattern 3
File:Camss_test_pattern_4.jpg|Pattern 4
File:Camss_test_pattern_5.jpg|Pattern 5
Qualcomm CrashDump Mode

Since at least Snapdragon 845 (though likely earlier), Qualcomm SOCs feature a special "CrashDump mode" that allows for full memory dumps to be taken from the device, this means all system memory and memory regions for coprocessors.
It is implemented in Qualcomm's boot firmware code (FIXME: is it in PBL or TZ?) and can be triggered by kernel panics (FIXME: this would probably only be in downstream kernels, right?), or crashes in the proprietary firmware.
== Obtaining a memory dump ==
Whilst a device is in CrashDump mode, it is possible to use bkerler's edl utility to perform a full memory dump. Simply plug the device into your computer and run edl (with no arguments). Note that this is a full memory dump, which will occupy several GB on your host machine.
== More information ==
The initial author of this page has very little understanding or further information about this mode. It would be great to see this page expanded with further information, such as how to convert the dumped memory into something that can be loaded into GDB for further debugging on the kernel side.
== See also == 
* Qualcomm blog post Minidump: New Tool for Selecting the Regions of RAM for Post-Crash Analysis
* docs: qcom: Add qualcomm minidump guide
Qualcomm Snapdragon 200 (MSM8212)

== General info ==
MSM8212 is a low-end SoC released in 2013, with only out-of-tree mainline support (for now).
There is also another variant, MSM8610, which has only 2 cores and is mostly the same.
It is pretty similar to Qualcomm Snapdragon 800/801 (MSM8974) and Qualcomm Snapdragon 400 (MSM8226) so some drivers can be reused from them as a reference.
== Devices ==
=== Snapdragon 200 (MSM8210) ===
=== Snapdragon 200 (MSM8212) ===
=== Snapdragon 200 (MSM8610) ===
=== Snapdragon 200 (MSM8612) ===
== CPU ==
All cores initialize properly now and CPUIdle seems to work fine.
== USB ==
Works. Detectable from PC.
== Regulators ==
As of Nov 7th 2021, SMD and SPMI regs are brought up
== DRM ==
This is essential for bringing up GPU and panel. MSM8212 (and all 2xx snapdragon SoCs) seem to be using MDP3, which is currently not supported in mainline.
== Tree ==
https://github.com/Mainline4Lumia/linux-next/tree/for-upstream/msm8212
Qualcomm Snapdragon 210 (MSM8909)

MSM8909/APQ8009 (or Snapdragon 210) is a low-end Qualcomm SoC released in 2015. There is a slightly higher clocked variant (CPU cores up to 1.3 GHz) available as Snapdragon 212 and a variant with only two CPUs available as MSM8905 or Qualcomm 205.
== Devices ==
=== Snapdragon 210 (MSM8909) ===
=== Snapdragon Wear 2100 (MSM8909W) ===
=== Snapdragon Wear 2100 WiFi-only (APQ8009W) ===
=== Snapdragon 212 (MSM8909v2) ===
=== Snapdragon 212 WiFi-only (APQ8009) ===
=== Qualcomm 205 Mobile Platform (MSM8905) ===
== USB ==
Works. You can use USB Networking.
== Display ==
Display seems to work fine on all Snapdragon 210 devices using the downstream kernel.
== Mainline ==
There is an experimental mainline Linux port available at https://github.com/msm8916-mainline/linux . WiFi, Bluetooth, Modem work. The main open problem is the display, which is quite different from other Qualcomm SoCs (MDP3 instead of MDP4/MDP5) and needs a new driver in Linux. However, this only applies to devices where the display is connected via DSI, as SPI displays on devices like the Nokia 8110 4G (nokia-argon) are already supported in the mainline kernel and work without MDP3.
== See also ==
* Qualcomm Snapdragon 410/412 (MSM8916)
Qualcomm Snapdragon 400 (MSM8226)

Snapdragon 400 is a Qualcomm SoC released in 2013. There seem to be many variants available, as seen on Wikipedia and the product brief from Qualcomm.
The identically named Qualcomm Snapdragon 400 (MSM8930) is a different SoC and covered on that page.
To contribute or discuss the state of this, please join #msm8226-mainline:postmarketos.org.
== Devices ==
=== APQ8026 (Wi-Fi only) ===
=== MSM8226 (3G Modem) ===
=== MSM8926 (LTE Modem) ===
== Active Upstreaming efforts ==
* CPU frequency scaling support
== lk2nd ==
lk2nd is supported on some msm8226 devices.
== See also ==
* Mainline4Lumia msm8x26 close to mainline kernel A lot of work is being done on msm8226 in this repo on the msm8x26 branch (pm8226_resin, pm8226 vibrator, all cores bringup to name a few)
* Another close to mainline kernel
Qualcomm Snapdragon 415/615/616 (MSM8929/MSM8939)

MSM8939 (or Snapdragon 615) is a Qualcomm SoC released in 2014, with great mainline support. There is a slightly higher clocked variant (CPU cores up to 1.7/1.2 GHz) available as Snapdragon 616. There is also a slightly lower clocked variant available as Snapdragon 415 (MSM8929). Efforts to coordinate mainlining of this SoC and porting of new devices can be discussed at #msm8916:postmarketos.org.
== Mainlining ==
MSM8939 is a great platform to get started with mainlining! It can use the MSM8916 Mainlining guide that explains how to get started (as both SoC's are very similar). Most of the time you need to change 8916 to 8939. https://github.com/msm8916-mainline/linux has support for msm8939.
msm8916-mainline/linux is closer to upstream, better maintained and thoroughly reviewed. New and existing devices should be added there.
Some device can be found on the stale https://gitlab.com/msm8939-mainline/linux where you need to build linux-postmarketos-qcom-msm8939 with make msm8916_defconfig pmos.config msm8939.config.
 
For initial device tree compare with other msm8939 devices, as compatible, include and regulators differ a bit.
Most other stuff should just work™ and you can always compare to the other msm8939 devices
== Devices ==
=== MSM8939 (Snapdragon 615) ===
=== MSM8939v2 (Snapdragon 616) ===
=== MSM8929 (Snapdragon 415) ===
== Tree ==
A shared kernel fork with some out-of-tree patches which were not upstreamed yet can be found at https://gitlab.com/msm8939-mainline/linux and https://github.com/msm8916-mainline/linux.
== See also ==
* lk2nd
* Qualcomm Snapdragon 410/412 (MSM8916)
*
Qualcomm Snapdragon 425/427/430/435 (MSM8917/MSM8920/MSM8937/MSM8940)

MSM8917, MSM8937, MSM8940 are Qualcomm SoCs released in 2016.
MSM8920 is a improved version of MSM8917 (higher clocked GPU and faster modem) released in 2017.
QM215 is a stripped-down version of MSM8917 released in 2019 for low-end devices.
According to Wikipedia, MSM8917/8920/8937/8940 are pin and software compatible, and are software compatible with SDM429/439/450/632, MSM8953/8953Pro.
== Devices ==
=== QM215 (Qualcomm 215) ===
=== MSM8917 (Snapdragon 425) ===
=== MSM8920 (Snapdragon 427) ===
=== MSM8937 (Snapdragon 430) ===
=== MSM8940 (Snapdragon 435) ===
=== SDM429 (Snapdragon 429) ===
=== SDM439 (Snapdragon 439) ===
== CPU ==
There is currently no working clock driver and rely on the bootloader for providing clock frequency. So 8 cores will be slower than 4 cores on MSM8937/8940 platform.
== Modem ==
Modem can be enabled on msm8917 and msm8937, but manual steps are needed to make it visible for ModemManager:
$ doas qmicli -d qrtr://0 --dpm-open-port="hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=0,hw-data-rx-id=42,hw-data-tx-id=42"
$ doas qmicli -d qrtr://0 --dms-set-operating-mode=online
$ doas rc-service modemmanager restart
MM not doing this automatically is tracked in ModemManager#610
The 2nd line might not actually be required (TODO: confirm).
The modem boots when the rmtfs service starts. To boot successfully, Motorola (at least) devices need firmware served by tqftpserv (see moto-modem-rfs-setup.openrc), Sony devices need a ta service.
== See Also ==
* Dreemurrs Embedded Labs' Mainline Kernel 5.8.0-rc1 for MSM89X7 devices
* Affe Null's Mainline Kernel (6.6-rc1) for QM215 and MSM8917 devices
* MSM89X7 Working Group