2019-11-06 23:15:43 +03:00
|
|
|
= Device Porting Guide
|
|
|
|
include::_support/common.inc[]
|
|
|
|
|
2019-11-09 05:44:48 +03:00
|
|
|
NOTE: This subject needs to be expanded upon.
|
|
|
|
|
|
|
|
In a nutshell, the basic steps are:
|
|
|
|
|
|
|
|
* Preparing the device for development use (unlocking the bootloader).
|
|
|
|
* Finding appropriate the sources (mainly the kernel).
|
|
|
|
* Writing the expressions to build said sources.
|
|
|
|
|
2020-03-27 23:36:15 +03:00
|
|
|
== Kernel configuration
|
|
|
|
|
|
|
|
The kernel can be configured using the following command, where `$DEVICE` is
|
|
|
|
the device name.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ bin/menuconfig $DEVICE
|
|
|
|
```
|
|
|
|
|
|
|
|
When importing a configuration from another source, manually editing the kernel
|
|
|
|
configuration, or updating the kernel version, it is recommended to run the
|
|
|
|
kernel configuration normalization too.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ bin/kernel-normalize-config $DEVICE
|
|
|
|
```
|
|
|
|
|
|
|
|
Be mindful of your `$NIX_PATH` when running these tools. Ensure it points to
|
|
|
|
the Nixpkgs checkout you use to work on Mobile NixOS or else it may build the
|
|
|
|
toolchain fresh.
|