- ARM (32 bit) GCC tool chain
- Arch Linux:
arm-none-eabi-gcc
- Alpine Linux and postmarketOS:
gcc-arm-none-eabi
- Debian and Ubuntu:
gcc-arm-none-eabi
- Fedora:
arm-none-eabi-gcc-cs
- Arch Linux:
- Device Tree Compiler
- Arch Linux:
dtc
- Alpine Linux and postmarketOS:
dtc
- Debian and Ubuntu:
device-tree-compiler
- Fedora:
dtc
- Arch Linux:
- libfdt
- Alpine Linux and postmarketOS:
dtc-dev
- Debian and Ubuntu:
libfdt-dev
- Fedora:
libfdt-devel
- Alpine Linux and postmarketOS:
- GNU tar
- Alpine Linux and postmarketOS:
tar
- Alpine Linux and postmarketOS:
- Optional requirements when using image signing
- Arch Linux:
python-pyasn1-modules python-pycryptodome
- Alpine Linux and postmarketOS:
py3-asn1-modules py3-pycryptodome
- Debian and Ubuntu:
python3-pyasn1-modules python3-pycryptodome
- Fedora:
python3-pyasn1-modules python3-pycryptodomex
- Arch Linux:
Check targets.md for the make target you should use below. (It depends on the SoC of your device.)
$ make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msmXXXX
Replace TOOLCHAIN_PREFIX
with the path to your tool chain.
lk2nd.img
is built and placed into build-lk2nd-msmXXXX/lk2nd.img
.
Note: Unlike lk2nd, lk1st is still experimental and therefore not described here yet.
lk2nd build system provides few additional compile time settings that you can add
to the make
cmdline to enable some additional features.
Set to 0 to suppress most of the logging, set to 2 to enable excessive log messages (may slow down boot). Default is 1.
Set to 1 to make lk2nd print the logs on the screen.
By default lk2nd build system will try to get the version from git. If you need to override the version (i.e. if you want to package lk2nd build), set this varable.
By setting this option to 1 lk2nd will always enter the menu upon boot instead of continuing with the usual workflow. This is useful for debugging and development.
This can help with debugging on devices with carkit uart. You need to switch the cable before starting linux to see all the logs.
Set the board compatible value.
Use this dtb for lk1st build.
Set specific panel driver. By default it uses cont-splash
.
Set to 1 to have the resulting lk2nd.img
be signed for AVB1. By default
images are not signed.
Set the signing certificate and private key to use for signing boot images.
If signing is enabled and no keys are specified a pair of default test keys
from the AOSP 13 source tree located in lk2nd/certs/
are used to sign the
image.
BOOTIMG_CERT
is expected to be in X.509 PEM format and BOOTIMG_KEY
is
expected to be in PKCS#8 format.