Porting to a new device/Preparation
- Search Devices page for your device to avoid duplicate work. Also search the wiki for your device. If the device is not packaged, check links in device page for existing fork of pmaports.
- Some devices use generic ports - packages meant to support multiple devices with hardware similarities.
- If the device has an x86-64 CPU, try generic x64 UEFI device port.
- Generic Chromebook ports can be found at [1]
- Full list of generic ports can be found at [2]
- Identify what SoC (System on a Chip) the device has and check if it's in Supported SoCs in mainline list. If SoC is supported by a (close to) mainline Linux kernel, it is preferable to port it using that kernel. In most cases, mainline kernels provide greater hardware support (GPU, modem, and so on) while also having more up-to-date software. Additionally, mainlining can be easier for some SoCs than downstream porting.
If your device isn't well-supported by any (close to) mainline kernel, keep reading this guide.
For help, connect to #main and #porting Matrix/IRC channels and ask your question. People are happy to answer your questions!
Requirements
Development environment
See pmbootstrap's system requirements and install dependencies if needed. |
To set up a development environment, you will need a Linux system capable of making builds and running pmbootstrap, our development and installation tool. If you don't have a Linux-based OS installed, you may want to set up a virtual machine with VirtualBox first.
It is recommended to install pmbootstrap from Git, as distributions often include outdated versions of pmbootstrap.
This guide assumes you are going to port postmarketOS to a device named wiki-example
.
Knowledge
It is recommended that you at least somewhat know how to use Linux distributions, how to build software, how APKBUILDs work, and also know how to use the shell, as the porting process is slightly harder than just running a few commands.
My device runs the Linux kernel (e.g. Android), but the vendor does not provide the source
- Ask kindly via e-mail.
- If they don't provide the source, team up with gpl-violations.org. You have the legal right to get the source, because the Linux kernel is under the GPLv2!
- Consider building generic kernel for your device.
- Another option is using prebuilt kernels
Proprietary blobs
Many devices require proprietary blobs for enabling certain peripherals (wifi/bluetooth/cellular/GPS). These repositories appear to contain blobs for a large percentage of devices out there.
Tips
To get more information about a specific command available in pmbootstrap
, run:
$ pmbootstrap {command} --help