Building (Advanced)
Build-System Options
The following options can be used in LE 10.x+ to customise the build experience:
Name | Values | Default | Description |
---|---|---|---|
|
|
| Maximum number of packages to build concurrently. On an 8-core system, |
|
|
| If |
|
|
| Determine under what circumstances package logs are written to |
|
|
| Adds |
|
|
| Control whether build system output is colored or not. |
|
|
| If |
|
|
| Output additional job state information to |
|
|
| Output real-time load, memory and in-progress job information to |
|
|
| Output detailed debug information to |
|
|
| If |
|
|
| When |
|
|
| System load information is captured at regular intervals in |
|
|
| Remove source code directories during the build once the source code directory is not required. |
Persistent Options
Options can be specified on the command line, or added to persistent "options" files located under the root folder of the buildsystem, e.g. ~/LibreELEC.tv/.libreelec/options
or the users home folder, e.g. ~/.libreelec/options
- if both files exist, home folder options trump root folder options. The following gives a fairly clean and comprehensive output while still allowing command-line overrides:
Builder Name and Version
If you are building and sharing images via the LibreELEC forums it is good to include a custom "builder" name with your images. This allows the team to count the number of active installs using your images (we can share this info on request). Builder name also populates into /etc/os-release
and logfiles, which helps forum staff supporting users differentiate between official releases and community created images. It is also possible to set custom versioning. e.g.
It is also possible to set persistent BUILDER_NAME
and BUILDER_VERSION
in "options" files.
Debug Images
The build-system automatically strips debug symbols from most packages. To disable this and include debug symbols and common debugging packages in the image, enable DEBUG
, e.g.
To also include valgrind:
Note: The resulting image will be considerably larger than normal. The default boot partition is 512MB, but debug images may exceed this and require a 1GB partition.
Private Sources
To build using package source tarballs from a private GitHub repository the package.mk
must be modified to use token authentication else wget requests made by the buildsystem are anonymous and package downloads will fail.
First obtain a personal access token from https://github.com/settings/tokens and add the token to the file .libreelec/options
in the root folder of the buildsystem as shown below:
Now modify the package.mk
for the package to include additional authentication data. In the example below we are downloading an archive using a githash for PKG_VERSION
and with the PKG_SHA256
check disabled. The WGET_OPT
line has been added, and the format of the URL used in PKG_URL
has been tweaked to include ${TOKEN}:@
between URI and domain:
Should you need to use more than one token, create TOKEN2
and TOKEN3
etc. in the options
file and reference them as variables in the package.mk
files that require them.
Last updated