mirror of
https://github.com/tuxbox-neutrino/buildenv.git
synced 2025-08-26 15:02:58 +02:00
rework script for more required layers and configurations
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -14,3 +14,6 @@ build*
|
||||
local build increment
|
||||
*.list
|
||||
|
||||
*/poky
|
||||
poky-*
|
||||
|
||||
|
212
README-de.md
Normal file
212
README-de.md
Normal file
@@ -0,0 +1,212 @@
|
||||
# Schnellstart Image-Erstellung #
|
||||
|
||||
- [Vorbereitung](#Vorbereitung)
|
||||
- [Image bauen](#Image-bauen)
|
||||
- [Aktualisierung](#Aktualisierung)
|
||||
- [Arbeiten an Zielquellen](#Arbeiten-an-Zielquellen)
|
||||
- [Übersicht über globale Konfigurationsdateien](#Übersicht-über-globale-Konfigurationsdateien)
|
||||
|
||||
## Vorbereitung
|
||||
|
||||
### Erforderliche Host-Pakete installieren (Debian 11)
|
||||
|
||||
> :memo: **HINWEIS:** Bei Verwendung der Tuxbox-Builder-VM (welche nicht zwingend erforderlich ist), springe bitte zu [Schritt 1](#1-Init-Skript-klonen). Die Tuxbox-Builder-VM enthält bereits erforderliche Pakete. Details und Download von Tuxbox-Builder VM siehe: [Tuxbox-Builder](https://sourceforge.net/projects/n4k/files/Tuxbox-Builder)
|
||||
|
||||
```bash
|
||||
apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential \
|
||||
chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils \
|
||||
iputils-ping python3-git python3-jinja2 libegl1-mesa pylint3 xterm subversion locales-all \
|
||||
libxml2-utils ninja-build default-jre clisp libcapstone4 libsdl2-dev doxygen
|
||||
```
|
||||
Zur Verwendung mit anderen Distributionen siehe: [Yocto Project Quick Build](https://docs.yoctoproject.org/3.2.4/ref-manual/ref-system-requirements.html#supported-linux-distributions)
|
||||
|
||||
#### Empfohlene Zusatzpakete zur grafischen Unterstützung und Analyse (z.B. mit Kdevelop, Meld):
|
||||
```bash
|
||||
apt-get install -y gitk git-gui meld cppcheck clazy kdevelop
|
||||
```
|
||||
|
||||
### Optional: Falls kein konfiguriertes Git vorhanden ist, gib bitte Deine globalen Git-Benutzerdaten ein:
|
||||
```bash
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.user "Dein Name"
|
||||
```
|
||||
|
||||
## Image bauen:
|
||||
|
||||
> :memo: **Hinweis:** Einige Pfade basieren auf Vorgaben, die vom Init-Script erzeugt werden. Einige Einträge werden als ```<Platzhalter>``` dargestellt, die entsprechend angepasst werden müssen.
|
||||
|
||||
> ### 1. Init-Skript klonen.
|
||||
```bash
|
||||
git clone https://github.com/tuxbox-neutrino/build.git
|
||||
cd build
|
||||
```
|
||||
|
||||
> ### 2. Init-Skript ausführen
|
||||
```bash
|
||||
./init.sh
|
||||
cd poky-3.2
|
||||
```
|
||||
|
||||
> ### 3. Liste möglicher Maschinentypen anzeigen
|
||||
```bash
|
||||
ls build
|
||||
```
|
||||
|
||||
> ### 4. Umgebungsskript ausführen
|
||||
```bash
|
||||
. ./oe-init-build-env build/<Machine-Type aus der Liste von Schritt 3 hier eintragen>
|
||||
```
|
||||
|
||||
> ### 5. Bauen
|
||||
```bash
|
||||
bitbake neutrino-image
|
||||
```
|
||||
|
||||
Das kann eine Weile dauern. Einige Warnmeldungen können ignoriert werden. Fehlermeldungen, welche die Setscene-Tasks betreffen, sind kein Problem, aber Fehler während der Build- und Package-Tasks brechen den Prozess in den meißten Fällen ab. [Bitte melde in diesem Fall den Fehler oder sende Deine Lösung an uns](https://forum.tuxbox-neutrino.org/forum/viewforum.php?f=77). Hilfe ist sehr willkommen.
|
||||
|
||||
Wenn alles erledigt ist, sollte eine ähnliche Meldung wie diese erscheinen:
|
||||
```bash
|
||||
...
|
||||
NOTE: Tasks Summary: Attempted 4568 tasks of which 4198 didn't need to be rerun and all succeeded.
|
||||
...
|
||||
```
|
||||
**Das war's ...**
|
||||
|
||||
Erstellte Images und Pakete sind zu finden unter:
|
||||
```
|
||||
~/build/poky-3.2/build/<machine>/tmp/deploy
|
||||
```
|
||||
oder im dist-Verzeichnis:
|
||||
```
|
||||
~/build/dist/<Image-Version>/<machine>/
|
||||
```
|
||||
|
||||
## Aktualisierung
|
||||
> :memo: Manuelle Aktualisierungen für beliebeige Ziel-Quellen sind nicht erforderlich. Dies wird automatisch bei jedem aufgerufenen Ziel mit Bitbake durchgeführt. Dadurch werden auch immer erforderliche Abhängigkeiten aktualisiert. Wenn man die volle Kontrolle über bestimmte Ziel-Quellen haben möchte, siehe [Arbeiten an Zielquellen](#Arbeiten-an-Zielquellen)!
|
||||
|
||||
Falls [Schritte 1 bis 4](#3-Liste-möglicher-Maschinentypen-anzeigen) bereits ausgeführt wurden, ist nur Schritt 5 erforderlich:
|
||||
|
||||
### Update Image
|
||||
```bash
|
||||
bitbake neutrino-image
|
||||
```
|
||||
|
||||
### Update Ziel
|
||||
```bash
|
||||
bitbake <target>
|
||||
```
|
||||
|
||||
### Meta-Layer-Repositories aktualisieren
|
||||
Die erneute Ausführung des Init-Skripts aktualisiert die enthaltenen Meta-Layer auf den Stand der Remote-Repositories.
|
||||
```bash
|
||||
cd $HOME/build
|
||||
./init.sh
|
||||
```
|
||||
Die angestoßenen Update-Routinen des Init-scripts sollten nicht festgeschriebene Änderungen vorübergehend stashen bzw. rebasen lokale Commits auf die Remote-Änderungen. Konflikte muss man jedoch manuell auflösen. Natürlich kann man seine lokalen Meta-Layer für Meta-Neutrino- und Maschinen-Layer-Repositories manuell aktualisieren und modifizieren.
|
||||
|
||||
> :memo: **Hinweis:** Konfigurationsdateien bleiben unberührt. Neue oder geänderte Konfigurationsoptionen werden nicht berücksichtigt. Bitte überprüfe ggf. die Konfiguration.
|
||||
|
||||
## Arbeiten an Zielquellen
|
||||
Wenn man die volle Kontrolle über die Ziel-Quellen haben möchte, sollten die Quellcodes in den Workspace verschoben werden. Siehe
|
||||
[devtool](https://docs.yoctoproject.org/current/ref-manual/devtool-reference.html) und insbesondere [devtool modify](https://docs.yoctoproject.org/current/ref-manual/devtool-reference.html#modifying-an-existing-recipe).
|
||||
|
||||
## Konfiguration zurücksetzen
|
||||
Wenn Du deine Maschinen-Konfigurationen zurücksetzen möchtest, benenne bitte das conf-Verzeichnis um (Löschen wird nicht empfohlen) und führe das Init-Skript erneut aus.
|
||||
```bash
|
||||
mv $HOME/build/poky-3.2/build/<machine>/conf $HOME/build/poky-3.2/build/<machine>/conf.01
|
||||
cd $HOME/build
|
||||
./init.sh
|
||||
```
|
||||
|
||||
## Neubau eines einzelnen Ziels erzwingen
|
||||
In einigen Fällen kann es vorkommen, dass ein Target, warum auch immer, abbricht. Man sollte deswegen nicht in Panik verfallen und deswegen den tmp-Ordner und den sstate-cache löschen. Das kann man auch für jedes Target einzeln machen.
|
||||
|
||||
> :memo: Insbesondere defekte Archiv-URL's können zum Abbruch führen. Diese Fehler werden aber immer angezeigt und man kann die URL überprüfen. Oft liegt es nur an den Servern und funktioneren nach wenigen Minuten sogar wieder.
|
||||
|
||||
Um sicherzustellen, ob das betreffende Recipe auch tatsächlich ein Problem hat, macht es Sinn das betreffende Target komplett zu bereinigen und neu zu bauen. Um dies zu erzwingen, müssen alle erzeugten Paket-, Build- und Cachedaten bereinigt werden.
|
||||
```bash
|
||||
bitbake -c cleansstate <target>
|
||||
```
|
||||
anschließend neu bauen:
|
||||
```bash
|
||||
bitbake <target>
|
||||
```
|
||||
|
||||
## Vollständigen Imagebau erzwingen
|
||||
Wenn Du einen kompletten Imagebau erzwingen möchtest, kann man das tmp-Verzeichnis löschen (oder umbenennen):
|
||||
```bash
|
||||
mv tmp tmp.01
|
||||
bitbake neutrino-image
|
||||
```
|
||||
Wenn man den sstate-cache **nicht** gelöscht hat, sollte das Image in relativ kurzer Zeit fertig gebaut sein. Daher wird empfohlen, den sstate-cache beizubehalten. Das Verzeichnis wo sich der sstate-cache befindet, wird über die Variable ```${SSTATE_DIR}``` festgelegt und kann in der Konfiguration angepasst werden.
|
||||
|
||||
Dieses Verzeichnis ist ziemlich wertvoll und nur in seltenen Fällen ist es notwendig, dieses Verzeichnis zu löschen. Bitte beachte, dass der Build in diesem Fall sehr viel mehr Zeit in Anspruch nimmt.
|
||||
> :bulb: Man kann Bitbake anweisen, keinen sstate-cache zu verwenden.
|
||||
```bash
|
||||
bitbake --no-setscene neutrino-image
|
||||
```
|
||||
oder
|
||||
```bash
|
||||
bitbake --skip-setscene neutrino-image
|
||||
```
|
||||
|
||||
## Bei Bedarf anpassen
|
||||
Es wird empfohlen, zum ersten Mal ohne Änderungen an den Konfigurationsdateien zu bauen, um einen Eindruck davon zu bekommen, wie der Build-Prozess funktioniert, und um die Ergebnisse zu sehen.
|
||||
Die Einstellmöglichkeiten sind sehr umfangreich und für Einsteiger nicht wirklich überschaubar. Das Yoctoproject ist jedoch sehr
|
||||
umfassend dokumentiert und bietet die beste Informationsquelle.
|
||||
|
||||
**Wichtig für Entwickler**: "[Arbeiten an Zielquellen](#Arbeiten-an-Zielquellen)"!
|
||||
|
||||
> :memo: **Bitte ändere nicht die Yocto-Recipes! Dies wird vom Yocto-Team nicht empfohlen, aber man kann zum Vervollständigen, Erweitern oder Überschreiben von Meta-Core-Recipes [.bbappend](https://docs.yoctoproject.org/3.2.4/dev-manual/dev-manual-common-tasks.html#using-bbappend-files-in-your-layer)-Dateien verwenden.**
|
||||
|
||||
### Übersicht über globale Konfigurationsdateien
|
||||
Für die lokale Konfiguration werden diese Konfigurationsdateien innerhalb der Build-Verzeichnissen benötigt:
|
||||
|
||||
> $HOME/build/poky-3.2/build/```<machine>```/conf/local.conf
|
||||
|
||||
Diese generierte local.conf enthält nur wenige Zeilen, besitzt aber eine Zeile, die auf eine gemeinsame Konfigurationsdatei zeigt, die für alle Images und unterstützten Maschinentypen gültig ist und kann man mit eigenen Optionen füttern.
|
||||
|
||||
> $HOME/build/local.conf.common.inc
|
||||
|
||||
Diese **.inc** Datei wurde aus der geklonten Beispieldatei beim erstmaligen ausführen des init-Scripts erzeugt.
|
||||
|
||||
> local.conf.common.inc.sample
|
||||
|
||||
Diese Beispieldatei sollte unberührt bleiben, um mögliche Konflikte beim Aktualisieren des build-Repositories zu vermeiden und um zu sehen, was sich geändert haben könnte.
|
||||
|
||||
Nach einer Aktualisierung des build-Repositries könnten einige neue oder geänderte Optionen hinzugefügt oder entfernt worden sein, die nicht in die inkludierte Konfigurationsdatei übernommen werden. Diesen Fall sollte man in der eigenen Konfiguration berücksichtigen und falls erforderlich anpassen.
|
||||
Natürlich kann man ```$HOME/Build/poky-3.2/build/<machine>/conf/local.conf``` mit eigenen Anforderungen ändern und als separate Konfigurationsdatei für einen Maschinentyp verwenden.
|
||||
|
||||
#### Musterkonfiguration für bblayers.conf:
|
||||
> $HOME/build/poky-3.2/build/```<machine>```/conf/bblayers.conf
|
||||
|
||||
```bitbake
|
||||
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
|
||||
# changes incompatibly
|
||||
POKY_BBLAYERS_CONF_VERSION = "2"
|
||||
|
||||
BBPATH = "${TOPDIR}"
|
||||
BBFILES ?= ""
|
||||
|
||||
BBLAYERS ?= " \
|
||||
/home/<username>build/poky-3.2/meta \
|
||||
/home/<username>/build/poky-3.2/meta-poky \
|
||||
/home/<username>/build/poky-3.2/meta-yocto-bsp \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-neutrino \
|
||||
/home/<username>/build/poky-3.2/meta-<machine-brand-or-bsp-name> \
|
||||
/home/<username>/build/poky-3.2/meta-openembedded/meta-oe \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-python2 \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-qt5 \
|
||||
"
|
||||
```
|
||||
|
||||
## Mehr Informationen
|
||||
Weitere Informationen zum Yocto Buildsystem:
|
||||
|
||||
* https://docs.yoctoproject.org/3.2.4/index.html
|
209
README-en.md
Normal file
209
README-en.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Quick start image build #
|
||||
|
||||
- [Preparation](#Preparation)
|
||||
- [Build Image](#Build-Image)
|
||||
- [Updating](#Updating)
|
||||
- [Working on target sources](#Working-on-target-sources)
|
||||
- [Overview of global configuration files](#Overview-of-global-configuration-files)
|
||||
|
||||
## Preparation
|
||||
|
||||
### Install required host packages (Debian 11)
|
||||
> :memo: **NOTE:** If you are using the Tuxbox-Builder VM (this is not mandatory) please jump to [step 1](#1-Clone-init-script). The Tuxbox-Builder VM already contains required packages. For details and download of Tuxbox-Builder VM see: [Tuxbox-Builder](https://sourceforge.net/projects/n4k/files/Tuxbox-Builder)
|
||||
|
||||
```bash
|
||||
apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential \
|
||||
chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils \
|
||||
iputils-ping python3-git python3-jinja2 libegl1-mesa pylint3 xterm subversion locales-all \
|
||||
libxml2-utils ninja-build default-jre clisp libcapstone4 libsdl2-dev doxygen
|
||||
```
|
||||
For usage with other distributions see: [Yocto Project Quick Build](https://docs.yoctoproject.org/3.2.4/ref-manual/ref-system-requirements.html#supported-linux-distributions)
|
||||
|
||||
#### Recommended additional packages for graphical support and analyzing (e.g. with Kdevelop, Meld):
|
||||
```bash
|
||||
apt-get install -y gitk git-gui meld cppcheck clazy kdevelop
|
||||
```
|
||||
|
||||
### Optional: In case of no configured git, please set your global git user data:
|
||||
```bash
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.user "Your Name"
|
||||
```
|
||||
|
||||
## Build Image:
|
||||
|
||||
> :memo: **Note:** Some paths are based on the defaults generated by the init script. Some entries are given as ```<placeholders>```, which must be adjusted accordingly.
|
||||
|
||||
> ### 1. Clone init script.
|
||||
```bash
|
||||
git clone https://github.com/tuxbox-neutrino/build.git
|
||||
cd build
|
||||
```
|
||||
|
||||
> ### 2. Execute init script
|
||||
```bash
|
||||
./init.sh
|
||||
cd poky-3.2
|
||||
```
|
||||
|
||||
> ### 3. Show possible machine types
|
||||
```bash
|
||||
ls build
|
||||
```
|
||||
|
||||
> ### 4. Execute environment script
|
||||
```bash
|
||||
. ./oe-init-build-env build/<enter required machine type from list taken from step 3>
|
||||
```
|
||||
|
||||
> ### 5. Build
|
||||
```bash
|
||||
bitbake neutrino-image
|
||||
```
|
||||
This may take a while. Some warn messages can be ignored. Error messages during setscene tasks are no problem but errors during build and package tasks will abort the process. [In this case please report the error or send us your solution](https://forum.tuxbox-neutrino.org/forum/viewforum.php?f=77). Help is very welcome.
|
||||
|
||||
If all done, such a similar message should appear:
|
||||
```bash
|
||||
...
|
||||
NOTE: Tasks Summary: Attempted 4568 tasks of which 4198 didn't need to be rerun and all succeeded.
|
||||
...
|
||||
```
|
||||
**That's it ...**
|
||||
|
||||
Built images and packages to find under:
|
||||
```
|
||||
~/build/poky-3.2/build/<machine>/tmp/deploy
|
||||
```
|
||||
or in the dist directory:
|
||||
```
|
||||
~/build/dist/<image-version/<machine>/
|
||||
```
|
||||
|
||||
## Updating
|
||||
> :memo: Manually updates for any target sources are not required. This is done automatically for each called target with Bitbake. This also updates any required dependencies. If you want to have full control for a target source, see "[Working on target sources](#working-on-target-sources)"!
|
||||
|
||||
If [steps 1 to 4](#3-Show-possible-machine-types) have already been performed, only step 5 is required:
|
||||
### Update image
|
||||
```bash
|
||||
bitbake neutrino-image
|
||||
```
|
||||
|
||||
### Update a target
|
||||
```bash
|
||||
bitbake <target>
|
||||
```
|
||||
|
||||
### Update meta layer repositories
|
||||
Execution of init script (see: [step 2](#2-Execute-init-script)) will update the required meta-layer repositories.
|
||||
```bash
|
||||
cd $HOME/build
|
||||
./init.sh
|
||||
```
|
||||
The update routines will stash uncommitted changes or will rebase your local commits to new remote changes, but conflicts are possible. In this case you must solve manually. Of corse you can update and modiify local meta-layer for meta-neutrino and machine layers repositories manually.
|
||||
|
||||
> :memo: **Note: Your config files will be untouched. New or modified config options are not considered. Please check your configuration if required.**
|
||||
|
||||
## Working on target sources
|
||||
If you want to have the full control about any target source, you should transfer the desiered target source into the workspace. For more details about this workflow see [devtool](https://docs.yoctoproject.org/current/ref-manual/devtool-reference.html) and especially [devtool modify](https://docs.yoctoproject.org/current/ref-manual/devtool-reference.html#modifying-an-existing-recipe).
|
||||
|
||||
## Reset configuration if required
|
||||
If you want to reset your configs, please rename (delete is not recommended) the conf directory and execute the init script again. See [step 2](#2-Execute-init-script).
|
||||
```bash
|
||||
mv $HOME/build/poky-3.2/build/<machine>/conf $HOME/build/poky-3.2/build/<machine>/conf.01
|
||||
cd $HOME/build
|
||||
./init.sh
|
||||
```
|
||||
|
||||
## Rebuild of a single target
|
||||
In some cases, a target may abort for whatever reason. You should not panic and delete the whole tmp folder and the sstate-cache. You can also do this for each target individually.
|
||||
|
||||
> :memo: In particular, broken archive URLs could terminate the build. However, these errors are always displayed and the URL can be checked accordingly. Often only the servers are down and will work again after a few minutes.
|
||||
|
||||
To ensure that the recipe has really a problem, it makes sense to clean up completely and rebuild the target. To enforce this, all generated package, build and cache data must be cleaned.
|
||||
```bash
|
||||
bitbake -c cleansstate <target>
|
||||
```
|
||||
rebuild again
|
||||
```bash
|
||||
bitbake <target>
|
||||
```
|
||||
|
||||
## Force complete image rebuild
|
||||
If you want to force a rebuild, you can delete (or rename) the tmp directory:
|
||||
```bash
|
||||
mv tmp tmp.01
|
||||
bitbake neutrino-image
|
||||
```
|
||||
If you didn't delete the sstate-cache, the image should be built in relatively short time. Therefore it is recommended to keep the sstate-cache. The directory where the sstate-cache is located is defined by the variable ```${SSTATE_DIR}``` and can be adjusted in the configuration.
|
||||
|
||||
This directory is quite valuable especially when using slow computers and only in rare cases it is necessary to delete this directory as well. Please note in case of deleted sstate-cache, the build will take much more time.
|
||||
> :bulb: You can tell bitbake not to use sstate-cache.
|
||||
```bash
|
||||
bitbake --no-setscene neutrino-image
|
||||
```
|
||||
or
|
||||
```bash
|
||||
bitbake --skip-setscene neutrino-image
|
||||
```
|
||||
|
||||
## Customize if required
|
||||
It's recommended to build for first time without any changes on config files to get an impression how the build process is working and see the results.
|
||||
The possibilities for adjustments are very extensive and not really manageable for beginners. However, the Yoctoproject is very
|
||||
extensively documented and provides the best source of information.
|
||||
|
||||
**Important for developers**: "[Working on target sources](#working-on-target-sources)"!
|
||||
|
||||
> :warning: **Please do not modify the Yocto-recipes! This is not recommended by the Yocto-Team, but you can use [.bbappend](https://docs.yoctoproject.org/3.2.4/dev-manual/dev-manual-common-tasks.html#using-bbappend-files-in-your-layer) files to complete, expand or override meta core Yocto recipes.**
|
||||
|
||||
## Overview of global configuration files
|
||||
These configuration files are required within the build directories for local configuration:
|
||||
|
||||
> $HOME/build/poky-3.2/build/```<machine>```/conf/local.conf
|
||||
|
||||
This generated local.conf contains only a few lines, but has a line that points to a common configuration file that is valid for all images and supported machine types and can be fed with your own options.
|
||||
|
||||
> $HOME/build/local.conf.common.inc
|
||||
|
||||
This **.inc** file was derived from the cloned example configuration file when the init script was run for the first time.
|
||||
|
||||
> local.conf.common.inc.sample
|
||||
|
||||
This sample file should be untouched to avoid possible conflicts when updating the build repository and to see what might have changed.
|
||||
|
||||
After updating the build repository, some new or changed options may have been added or removed that are not reflected in the included configuration file. This case should be taken into account in your own configuration and adjusted if necessary.
|
||||
Of course you can modify ```$HOME/Build/poky-3.2/build/<machine>/conf/local.conf``` with your own requirements and use it as a separate configuration file for a machine type.
|
||||
|
||||
#### Pattern configuration for bblayers.conf:
|
||||
|
||||
> $HOME/build/poky-3.2/build/```<machine>```/conf/bblayers.conf
|
||||
|
||||
```bitbake
|
||||
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
|
||||
# changes incompatibly
|
||||
POKY_BBLAYERS_CONF_VERSION = "2"
|
||||
|
||||
BBPATH = "${TOPDIR}"
|
||||
BBFILES ?= ""
|
||||
|
||||
BBLAYERS ?= " \
|
||||
/home/<username>/build/poky-3.2/meta \
|
||||
/home/<username>/build/poky-3.2/meta-poky \
|
||||
/home/<username>/build/poky-3.2/meta-yocto-bsp \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-neutrino \
|
||||
/home/<username>/build/poky-3.2/meta-<machine-brand-or-bsp-name> \
|
||||
/home/<username>/build/poky-3.2/meta-openembedded/meta-oe \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-python2 \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/<username>/build/poky-3.2/meta-qt5 \
|
||||
"
|
||||
```
|
||||
|
||||
## More informations
|
||||
Further informations about yocto buildsystem:
|
||||
|
||||
* https://docs.yoctoproject.org/3.2.4/index.html
|
184
README.md
184
README.md
@@ -1,181 +1,7 @@
|
||||
# Quick start image build #
|
||||
|
||||
## Preparation
|
||||
NOTE: If you are using the Tuxbox-Builder VM (this is not mandatory) please jump to [step 1](#1-clone-init-script-into-a-directory-of-your-choice). The Tuxbox-Builder VM already contains required packages.
|
||||
For details and download of Tuxbox-Builder VM see: [Tuxbox-Builder](https://sourceforge.net/projects/n4k/files/Tuxbox-Builder)
|
||||
## Localized `README.md`'s
|
||||
|
||||
### Install required packages (Debian 9/10)
|
||||
```bash
|
||||
apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential \
|
||||
chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils \
|
||||
iputils-ping python3-git python3-jinja2 libegl1-mesa pylint3 xterm subversion locales-all \
|
||||
libxml2-utils ninja-build default-jre clisp libcapstone3 libsdl2-dev doxygen
|
||||
```
|
||||
NOTE: Older buildsystem versions < 3.2 need libsdl1.2-dev
|
||||
|
||||
### Recommended additional packages for graphical support (e.g. KDE ...) and analyzing (e.g. with Kdevelop):
|
||||
```bash
|
||||
apt-get install -y gitk git-gui meld cppcheck clazy kdevelop
|
||||
```
|
||||
|
||||
### Optional: In case of no configured git, please set your global git user data:
|
||||
```bash
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.user "Your Name"
|
||||
```
|
||||
|
||||
For usage with other distributions see: [Yocto Project Quick Build](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
|
||||
|
||||
### let's start:
|
||||
|
||||
## 1. Clone init script into a directory of your choice
|
||||
```bash
|
||||
$:~ git clone https://github.com/tuxbox-neutrino/build.git
|
||||
$:~ cd build
|
||||
```
|
||||
|
||||
## 2. Execute init script
|
||||
This will clone all required layers and create some config files into your build directories.
|
||||
* Parameter <machine>: could be bre2ze4k, h7, hd51, hd60, hd61, osmio4k, osmio4kplus or set 'all' or keep empty ' ' for all machines.
|
||||
```bash
|
||||
$:~ ./init.sh <machine>
|
||||
$:~ cd poky-3.2
|
||||
```
|
||||
example:
|
||||
```bash
|
||||
$:~ ./init.sh hd51
|
||||
$:~ cd poky-3.2
|
||||
```
|
||||
|
||||
## 3. Execute environment script
|
||||
Please use the possible machine type which you selected on [step 2](#2-execute-init-script)! Here as example we use hd51.
|
||||
This creates (if not exists!) the build directory named as hd51, sets the build environment and will print some lines:
|
||||
```bash
|
||||
$:~ . ./oe-init-build-env hd51
|
||||
|
||||
### Shell environment set up for builds. ###
|
||||
|
||||
You can now run 'bitbake <target>'
|
||||
|
||||
Common targets are:
|
||||
core-image-minimal
|
||||
core-image-sato
|
||||
meta-toolchain
|
||||
meta-ide-support
|
||||
|
||||
You can also run generated qemu images with a command like 'runqemu qemux86'
|
||||
|
||||
Other commonly useful commands are:
|
||||
- 'devtool' and 'recipetool' handle common recipe tasks
|
||||
- 'bitbake-layers' handles common layer tasks
|
||||
- 'oe-pkgdata-util' handles common target package tasks
|
||||
tuxbox@tuxbox-builder:~/Build/poky-3.2/hd51
|
||||
$
|
||||
```
|
||||
**NOTE:** If you left the current shell you must retry [step 3](#3-execute-environment-script) for your machine type to recreate the required environment.
|
||||
|
||||
## 4. Build image
|
||||
Now you are ready to build an image.
|
||||
```bash
|
||||
$:~ /build/poky-3.2/<machine>$ bitbake neutrino-image
|
||||
```
|
||||
This may take a while. Some warn messages can be ignored. Error messages during setscene tasks are no problem but errors during build and package tasks will abort the process. In this case please report or send us your solution to [Tuxbox-Forum](https://forum.tuxbox-neutrino.org/forum/viewforum.php?f=77). Help is very welcome.
|
||||
|
||||
If all done, such a message should appear:
|
||||
```bash
|
||||
...
|
||||
NOTE: Tasks Summary: Attempted 4568 tasks of which 4198 didn't need to be rerun and all succeeded.
|
||||
...
|
||||
```
|
||||
## That's it ...
|
||||
|
||||
Built images and packages to find under:
|
||||
```
|
||||
~/build/poky-3.2/<machine>/tmp/deploy
|
||||
```
|
||||
or in the dist directory:
|
||||
```
|
||||
~/build/dist/<image-version/<machine>/
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
### Update target sources
|
||||
An explicit update for any sources (e.g. neutrino) is not required. This will be done automatically on every called target with bitbake. This will also update required dependencies. If you moved some target sources into the workspace ($HOME/builder/poky-3.2/<machine>/workspace), you must do it yourself. See also "[Working on target sources](#working-on-target-sources)"!
|
||||
|
||||
### Update meta layer repositories
|
||||
Execution of init script will update the yocto poky-x.x repository to the required yocto release and will updating the included local meta layers to current
|
||||
state of remote repositories. Of corse you can update and modiify your local meta-layer for meta-neutrino and machine layers repositories manually. The update routines will stash uncommitted changes or will rebase your local commits to new remote changes, but conflicts are possible. In this case you must solve manually.
|
||||
|
||||
**Note: Your config files will be untouched. New or modified config options are not considered. Please check your configuration if required.**
|
||||
|
||||
## Working on target sources
|
||||
In this case you should transfer the desiered target source into the workspace repository ($HOME/builder/poky-3.2/<machine>/workspace).
|
||||
If You have moved any target source into the workspace tree you have full control to source code you want to modify. See also [devtool](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#using-devtool-in-your-sdk-workflow) and especially [devtool modify](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component).
|
||||
|
||||
## Reset configuration if required
|
||||
If you want to reset your configs, please rename (delete is not recommended) the conf directory ($HOME/build/poky-3.2/<machine>/conf) and execute the init script again.
|
||||
|
||||
## Force complete rebuild
|
||||
If you want to force rebuild you can delete (or rename) the tmp directory ($HOME/build/poky-3.2/<machine>/tmp):
|
||||
```
|
||||
~/build/poky-3.2/<machine>/tmp
|
||||
```
|
||||
That causes the complete reassembling of the image. If you didn't delete the sstate-cache directory ($HOME/build/poky-3.2/<machine>/sstate-cache), your image should be ready in a very fast time. Therefore, it is recommended to keep the sstate-cache directory.
|
||||
In rare cases it should be necessary to delete this directory as well. Please note, however, in this case the build will take much more time.
|
||||
|
||||
## Customize if required
|
||||
It's recommended to build for first time without any changes on config files to get an impression how the build process is working and see the results.
|
||||
The possibilities for adjustments are very extensive and not really manageable for beginners. However, the Yoctoproject is very
|
||||
extensively documented and provides the best source of information.
|
||||
|
||||
**Please do not modify the Yocto-sources! This is not recommended by the Yocto-Team, but you can use [.bbappend](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#using-bbappend-files) files to complete, expand or override meta core Yocto recipes.**
|
||||
|
||||
The generated local.conf contains only a few lines but contains a line which is pointing to a common config file and is valid for all images and supported machine types to keep an unified image structure. The origin cloned sample config file ("local.conf.common.inc.sample") should be untouched. This avoids possible conflicts during updating the init script from git repo. After executed init script (step 2), the config sample file was renamed from "local.conf.common.inc.sample" to "local.conf.common.inc" and this file you can feed with your own options which have effect for all images you want to build.
|
||||
Alternatively you can modify the default "$HOME/Build/poky-3.2/<machine>/conf/local.conf" with your own requirements or include your own config file. After updated init script, some new or changed options could be added or removed. This case you should consider for your own configuration.
|
||||
|
||||
### Overview of global configuration files
|
||||
For local configuration these config files within your build directory are required:
|
||||
```
|
||||
$HOME/build/poky-3.2/<machine>/conf/bblayers.conf
|
||||
```
|
||||
Default generated configuration for bblayers.conf:
|
||||
|
||||
**NOTE:** ```<metaname>``` must be replaced with your machine type (e.g. hd51)
|
||||
|
||||
```bitbake
|
||||
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
|
||||
# changes incompatibly
|
||||
POKY_BBLAYERS_CONF_VERSION = "2"
|
||||
|
||||
BBPATH = "${TOPDIR}"
|
||||
BBFILES ?= ""
|
||||
|
||||
BBLAYERS ?= " \
|
||||
${HOME}/build/poky-3.2/meta \
|
||||
${HOME}/build/poky-3.2/meta-poky \
|
||||
${HOME}/build/poky-3.2/meta-yocto-bsp \
|
||||
${HOME}/build/poky-3.2/meta-neutrino \
|
||||
${HOME}/build/poky-3.2/poky/meta-<metaname> \
|
||||
"
|
||||
# the following entries are experimental and are required to build kodi and some qt related stuff e.g. qtwebengine ...
|
||||
|
||||
BBLAYERS += " \
|
||||
/home/tg/builder/poky-3.2/meta-python2 \
|
||||
"
|
||||
BBLAYERS += " \
|
||||
/home/tg/builder/poky-3.2/meta-qt5 \
|
||||
"
|
||||
```
|
||||
|
||||
The general configuration you will find here, mostly entries are described inside these files:
|
||||
```
|
||||
$HOME/build/poky-3.2/<machine>/conf/local.conf
|
||||
$HOME/build/local.conf.common.inc
|
||||
```
|
||||
|
||||
## More informations
|
||||
Further informations about yocto buildsystem you will find here:
|
||||
|
||||
* https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html
|
||||
* https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html
|
||||
| Language |
|
||||
| -------------------------- |
|
||||
| [English](README-en.md) |
|
||||
| [German](README-de.md) |
|
||||
|
24
files/0001-openembedded-disable-meta-python.patch
Normal file
24
files/0001-openembedded-disable-meta-python.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 090a04acb63ed1d7fc829fa41de9c5ee86d249c1 Mon Sep 17 00:00:00 2001
|
||||
From: Thilo Graf <dbt@novatux.de>
|
||||
Date: Sun, 24 Jul 2022 14:53:27 +0200
|
||||
Subject: [PATCH 1/2] openembedded: disable meta-python
|
||||
|
||||
---
|
||||
meta-multimedia/conf/layer.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meta-multimedia/conf/layer.conf b/meta-multimedia/conf/layer.conf
|
||||
index be0e2b362..eb10c6eaa 100644
|
||||
--- a/meta-multimedia/conf/layer.conf
|
||||
+++ b/meta-multimedia/conf/layer.conf
|
||||
@@ -29,6 +29,6 @@ BBFILE_PRIORITY_multimedia-layer = "6"
|
||||
# cause compatibility issues with other layers
|
||||
LAYERVERSION_multimedia-layer = "1"
|
||||
|
||||
-LAYERDEPENDS_multimedia-layer = "core meta-python"
|
||||
+#LAYERDEPENDS_multimedia-layer = "core meta-python"
|
||||
|
||||
LAYERSERIES_COMPAT_multimedia-layer = "gatesgarth"
|
||||
--
|
||||
2.35.1
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From eb53094f171a3833f19b20667bda236d78a44ca9 Mon Sep 17 00:00:00 2001
|
||||
From: Thilo Graf <dbt@novatux.de>
|
||||
Date: Sun, 24 Jul 2022 14:56:09 +0200
|
||||
Subject: [PATCH 2/2] openembedded: disable openembedded-layer, meta-phyton
|
||||
|
||||
---
|
||||
meta-networking/conf/layer.conf | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meta-networking/conf/layer.conf b/meta-networking/conf/layer.conf
|
||||
index bd0a44cae..dce550fe2 100644
|
||||
--- a/meta-networking/conf/layer.conf
|
||||
+++ b/meta-networking/conf/layer.conf
|
||||
@@ -14,8 +14,8 @@ BBFILE_PRIORITY_networking-layer = "5"
|
||||
LAYERVERSION_networking-layer = "1"
|
||||
|
||||
LAYERDEPENDS_networking-layer = "core"
|
||||
-LAYERDEPENDS_networking-layer += "openembedded-layer"
|
||||
-LAYERDEPENDS_networking-layer += "meta-python"
|
||||
+#LAYERDEPENDS_networking-layer += "openembedded-layer"
|
||||
+#LAYERDEPENDS_networking-layer += "meta-python"
|
||||
|
||||
LAYERSERIES_COMPAT_networking-layer = "gatesgarth"
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
585
init.sh
585
init.sh
@@ -3,11 +3,29 @@
|
||||
#set -x
|
||||
|
||||
BASEPATH=`pwd`
|
||||
FILES_DIR=$BASEPATH/files
|
||||
MACHINES="bre2ze4k h7 hd51 hd60 hd61 osmio4k osmio4kplus"
|
||||
HINT_SYNTAX='Usage '$0' <machine> <image-version>'
|
||||
HINT_MACHINES="<$MACHINES all>"
|
||||
HINT_IMAGE_VERSIONS='<3.2>'
|
||||
|
||||
# only current version
|
||||
IMAGE_VERSION=`git -C $BASEPATH rev-parse --abbrev-ref HEAD`
|
||||
|
||||
FILES_DIR="$BASEPATH/files"
|
||||
|
||||
# identical listings
|
||||
MACHINES_IDENTICAL_HD51="hd51 ax51 mutant51"
|
||||
MACHINES_IDENTICAL_H7="h7 zgemmah7"
|
||||
|
||||
# gfutures listing
|
||||
MACHINES_GFUTURES="$MACHINES_IDENTICAL_HD51 bre2ze4k"
|
||||
# airdigital listing
|
||||
MACHINES_AIRDIGITAL="$MACHINES_IDENTICAL_H7"
|
||||
# edision listing
|
||||
MACHINES_EDISION="osmio4k osmio4kplus"
|
||||
|
||||
# valid machine list
|
||||
MACHINES="$MACHINES_GFUTURES $MACHINES_AIRDIGITAL hd60 hd61 $MACHINES_EDISION"
|
||||
|
||||
HINT_SYNTAX='\033[37;1mUsage '$0' <machine>\033[0m'
|
||||
HINT_MACHINES="<$MACHINES>, <all> or keep empty < >"
|
||||
HINT_IMAGE_VERSIONS="$IMAGE_VERSION"
|
||||
|
||||
LOG_PATH=$BASEPATH/log
|
||||
mkdir -p $LOG_PATH
|
||||
@@ -24,34 +42,37 @@ ln -sf $LOGFILE $LOGFILE_LINK
|
||||
|
||||
|
||||
# set passed parameters
|
||||
if [ "$1" = "" ]; then
|
||||
if [ "$1" == "" ]; then
|
||||
MACHINE="all"
|
||||
else
|
||||
MACHINE=$1
|
||||
fi
|
||||
|
||||
# only current version
|
||||
IMAGE_VERSION="3.2"
|
||||
# function for checking of valid machine(s)
|
||||
function is_valid_machine ()
|
||||
{
|
||||
ISM=$1
|
||||
for M in $MACHINES ; do
|
||||
if [ "$ISM" == "$M" ] || [ "$MACHINE" == "all" ]; then
|
||||
echo true
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
echo false
|
||||
return 0
|
||||
}
|
||||
|
||||
# check for empty machine
|
||||
if [ -z "$MACHINE" ]; then
|
||||
echo -e "\033[31;1mERROR:\tNo machine defined. Possible machines are $HINT_MACHINES. $HINT_SYNTAX ...\033[0m"
|
||||
if [ `is_valid_machine "$MACHINE"` == false ]; then
|
||||
echo -e "\033[31;1mERROR:\tNo valid machine defined.\033[0m\n\t$HINT_SYNTAX.
|
||||
\tKeep parameter <machine> empty to initialize all possible machine types or set your favorite machine.
|
||||
\tPossible types are:
|
||||
\t\033[37;1m$HINT_MACHINES\033[0m\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check for valid machine
|
||||
if [ "$MACHINE" != "bre2ze4k" ] &&[ "$MACHINE" != "hd51" ] && [ "$MACHINE" != "h7" ] && [ "$MACHINE" != "hd60" ] && [ "$MACHINE" != "hd61" ] && [ "$MACHINE" != "osmio4k" ] && [ "$MACHINE" != "osmio4kplus" ] && [ "$MACHINE" != "all" ]; then
|
||||
echo -e "\033[31;1mERROR:\tInvalid machine defined. $HINT_SYNTAX. Possible machines are $HINT_MACHINES\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check for image versions
|
||||
if [ "$IMAGE_VERSION" != "3.2" ]; then
|
||||
echo -e "\033[31;1mERROR:\tInvalid image version defined. $HINT_SYNTAX. Possible image versions are $HINT_IMAGE_VERSIONS, keep empty for current version\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\033[37;1mNOTE:\tInitialze build environment for image version $IMAGE_VERSION and machine: $MACHINE \033[0m\n"
|
||||
echo -e "##########################################################################################"
|
||||
echo -e "\033[37;1mInitialze build environment:\nversion: $IMAGE_VERSION\nmachine: $MACHINE\033[0m"
|
||||
echo -e "##########################################################################################\n"
|
||||
|
||||
function do_exec() {
|
||||
DEX_ARG1=$1
|
||||
@@ -65,7 +86,9 @@ function do_exec() {
|
||||
fi
|
||||
# echo -e "DEX_ARG1 [$DEX_ARG1] DEX_ARG2 [$DEX_ARG2] DEX_ARG3 [$DEX_ARG3]"
|
||||
if [ $? != 0 ]; then
|
||||
if test -f $TMP_LOGFILE; then
|
||||
LOGTEXT=`cat $TMP_LOGFILE`
|
||||
fi
|
||||
echo "$LOGTEXT" >> $LOGFILE
|
||||
if [ "$DEX_ARG2" != "no_exit" ]; then
|
||||
if [ "$LOGTEXT" != "" ]; then
|
||||
@@ -83,293 +106,179 @@ function do_exec() {
|
||||
# fi
|
||||
}
|
||||
|
||||
POKY_NAME=poky-$IMAGE_VERSION
|
||||
BUILD_ROOT_DIR=$BASEPATH/$POKY_NAME
|
||||
GUI_LAYER_NAME=meta-neutrino
|
||||
BACKUP_SUFFIX=bak
|
||||
|
||||
YOCTO_GIT_URL=https://git.yoctoproject.org/git/poky
|
||||
# update of yocto layer is disabled on executing init script, for yocto oe it's better to use a tested tag, defined with $YOCTO_BRANCH_HASH
|
||||
YOCTO_LAYER_DO_UPDATE=0
|
||||
POKY=poky
|
||||
POKY_NAME=$IMAGE_VERSION
|
||||
BUILD_ROOT_DIR=$BASEPATH/$POKY-$IMAGE_VERSION
|
||||
BUILD_ROOT=$BUILD_ROOT_DIR/build
|
||||
|
||||
TUXBOX_LAYER_GIT_URL=https://github.com/neutrino-hd
|
||||
OE_LAYER_NAME=meta-openembedded
|
||||
OE_LAYER_GIT_URL=https://git.openembedded.org/meta-openembedded
|
||||
OE_LAYER_PATCH_LIST="0001-openembedded-disable-meta-python.patch 0002-openembedded-disable-openembedded-layer-meta-phyton.patch"
|
||||
|
||||
OE_CORE_LAYER_NAME=openembedded-core
|
||||
OE_CORE_LAYER_GIT_URL=https://github.com/openembedded/openembedded-core.git
|
||||
|
||||
TUXBOX_LAYER_NAME=meta-neutrino
|
||||
TUXBOX_LAYER_GIT_URL=https://github.com/Tuxbox-Project
|
||||
|
||||
TUXBOX_BSP_LAYER_GIT_URL=$TUXBOX_LAYER_GIT_URL
|
||||
AIRDIGITAL_LAYER_NAME=meta-airdigital
|
||||
AIRDIGITAL_LAYER_GIT_URL=$TUXBOX_BSP_LAYER_GIT_URL/$AIRDIGITAL_LAYER_NAME
|
||||
GFUTURES_LAYER_NAME=meta-gfutures
|
||||
GFUTURES_LAYER_GIT_URL=$TUXBOX_BSP_LAYER_GIT_URL/$GFUTURES_LAYER_NAME
|
||||
|
||||
EDISION_LAYER_NAME=meta-edision
|
||||
EDISION_LAYER_GIT_URL=$TUXBOX_LAYER_GIT_URL/$EDISION_LAYER_NAME
|
||||
HISI_LAYER_NAME=meta-hisilicon
|
||||
HISI_LAYER_GIT_URL=$TUXBOX_LAYER_GIT_URL/$HISI_LAYER_NAME
|
||||
|
||||
PYTHON2_LAYER_NAME=meta-python2
|
||||
PYTHON2_LAYER_GIT_URL=https://git.openembedded.org
|
||||
PYTHON2_LAYER_DO_UPDATE=1
|
||||
PYTHON2_LAYER_GIT_URL=https://git.openembedded.org/$PYTHON2_LAYER_NAME
|
||||
PYTHON2_PATCH_LIST="0001-local_conf_outcomment_line_15.patch"
|
||||
|
||||
QT5_LAYER_NAME=meta-qt5
|
||||
QT5_LAYER_GIT_URL=https://github.com/meta-qt5
|
||||
QT5_LAYER_DO_UPDATE=1
|
||||
|
||||
GIT_CLONE='git clone'
|
||||
GIT_PULL='git pull -r'
|
||||
GIT_STASH='git stash'
|
||||
GIT_STASH_POP='git stash pop'
|
||||
QT5_LAYER_GIT_URL=https://github.com/meta-qt5/$QT5_LAYER_NAME
|
||||
|
||||
|
||||
# set required branch
|
||||
YOCTO_BRANCH_NAME=gatesgarth
|
||||
# set required branches
|
||||
COMPATIBLE_BRANCH=gatesgarth
|
||||
YOCTO_BRANCH_HASH=bc71ec0
|
||||
|
||||
PYTHON2_BRANCH_HASH=27d2aeb
|
||||
OE_BRANCH_HASH=f3f7a5f
|
||||
|
||||
# clone required branch from yocto
|
||||
if test ! -d $BUILD_ROOT_DIR/.git; then
|
||||
echo -e "\033[36;1mCLONE POKY:\033[0m clone branch $YOCTO_BRANCH_NAME from $YOCTO_GIT_URL into $BUILD_ROOT_DIR..."
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME $YOCTO_GIT_URL $POKY_NAME" ' ' 'show_output'
|
||||
|
||||
echo -e "set $POKY_NAME-repository to required yocto-release $IMAGE_VERSION at commit $YOCTO_BRANCH_HASH..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR reset --hard $YOCTO_BRANCH_HASH"
|
||||
|
||||
echo -e "create local branch $IMAGE_VERSION at commit $YOCTO_BRANCH_HASH..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $YOCTO_BRANCH_HASH -b $IMAGE_VERSION"
|
||||
|
||||
echo -e "create local tag $IMAGE_VERSION..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR tag $IMAGE_VERSION"
|
||||
|
||||
# if [ $YOCTO_LAYER_DO_UPDATE != 0 ]; then
|
||||
# do_exec "git pull -C $BUILD_ROOT_DIR origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
# fi
|
||||
echo -e "\033[36;1mdone ...\033[0m\n"
|
||||
else
|
||||
if [ $YOCTO_LAYER_DO_UPDATE != 0 ]; then
|
||||
|
||||
CURRENT_YOCTO_BRANCH=`git -C $BUILD_ROOT_DIR rev-parse --abbrev-ref HEAD`
|
||||
|
||||
echo -e "\033[36;1mUPDATE poky:\033[0m\nupdate $CURRENT_YOCTO_BRANCH..."
|
||||
|
||||
echo -e "switch from $CURRENT_YOCTO_BRANCH to $IMAGE_VERSION..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $IMAGE_VERSION" ' ' 'show_output'
|
||||
|
||||
echo -e "update $POKY_NAME from (branch $YOCTO_BRANCH_NAME) $YOCTO_GIT_URL ..."
|
||||
do_exec "git pull -r -C $BUILD_ROOT_DIR origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
echo -e "switch back to $YOCTO_BRANCH_NAME ..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
do_exec "git pull -r -C $BUILD_ROOT_DIR origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
echo -e "switch back to $IMAGE_VERSION ..."
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $IMAGE_VERSION" ' ' 'show_output'
|
||||
|
||||
echo -e "\033[36;1mdone ...\033[0m\n"
|
||||
else
|
||||
HAS_CHANGES=0
|
||||
YOCTO_BRANCH_HASH_CURRENT=`git -C $BUILD_ROOT_DIR rev-parse --verify HEAD | awk '{print substr($0, 0,7)}'`
|
||||
if [[ "$YOCTO_BRANCH_HASH_CURRENT" != "$YOCTO_BRANCH_HASH" ]]; then
|
||||
HAS_CHANGES=1
|
||||
LOCAL_YOCTO_BRANCH=$IMAGE_VERSION.mod.$YOCTO_BRANCH_HASH
|
||||
echo -e "\033[36;1mupdate yocto: found local changes, create branch $LOCAL_YOCTO_BRANCH\033[0m\n"
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $YOCTO_BRANCH_HASH -b $LOCAL_YOCTO_BRANCH"
|
||||
echo -e "\033[36;1mswitch to required branch $YOCTO_BRANCH_NAME at $YOCTO_BRANCH_HASH\033[0m\n"
|
||||
do_exec "git -C $BUILD_ROOT_DIR checkout $IMAGE_VERSION"
|
||||
fi
|
||||
if [ $HAS_CHANGES=0 ]; then
|
||||
echo -e "\033[36;1mkeeping $YOCTO_BRANCH_NAME at $YOCTO_BRANCH_HASH\033[0m\n"
|
||||
do_exec "git -C $BUILD_ROOT_DIR reset --hard $YOCTO_BRANCH_HASH"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# clone or update required branch from gui meta layer
|
||||
if test ! -d $BUILD_ROOT_DIR/$GUI_LAYER_NAME/.git; then
|
||||
echo -e "\033[33;1mCLONE $GUI_LAYER_NAME:\033[0m\nclone $GUI_LAYER_NAME (branch $YOCTO_BRANCH_NAME) from $TUXBOX_LAYER_GIT_URL ..."
|
||||
do_exec "cd $BUILD_ROOT_DIR"
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME $TUXBOX_LAYER_GIT_URL/$GUI_LAYER_NAME.git $GUI_LAYER_NAME" ' ' 'show_output'
|
||||
echo -e "\033[33;1mdone ...\033[0m\n"
|
||||
else
|
||||
do_exec "cd $BUILD_ROOT_DIR/$GUI_LAYER_NAME"
|
||||
CURRENT_GUI_LAYER_BRANCH=`git -C $BUILD_ROOT_DIR/$GUI_LAYER_NAME rev-parse --abbrev-ref HEAD`
|
||||
echo -e "\033[33;1mUPDATE: update $GUI_LAYER_NAME $CURRENT_GUI_LAYER_BRANCH\033[0m"
|
||||
do_exec "$GIT_STASH" 'no_exit'
|
||||
|
||||
if [ "$CURRENT_GUI_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[37;1mCHECKOUT:\033[0m\nswitch from $CURRENT_GUI_LAYER_BRANCH to $YOCTO_BRANCH_NAME..."
|
||||
do_exec "git checkout $YOCTO_BRANCH_NAME"
|
||||
fi
|
||||
|
||||
echo -e "\033[37;1mUPDATE:\033[0m\nupdate $GUI_LAYER_NAME from (branch $YOCTO_BRANCH_NAME) $TUXBOX_LAYER_GIT_URL ..."
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
if [ "$CURRENT_GUI_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[37;1mCHECKOUT:\033[0m\nswitch back to $CURRENT_GUI_LAYER_BRANCH ..."
|
||||
do_exec "git checkout $CURRENT_GUI_LAYER_BRANCH"
|
||||
echo -e "\033[37;1mREBASE:\033[0m\nrebase branch $YOCTO_BRANCH_NAME into $CURRENT_GUI_LAYER_BRANCH"
|
||||
do_exec "git rebase $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
fi
|
||||
|
||||
do_exec "$GIT_STASH_POP" 'no_exit'
|
||||
echo -e "\033[33;1mdone ...\033[0m\n"
|
||||
fi
|
||||
|
||||
|
||||
# clone or update required branch for python2 from https://git.openembedded.org/meta-python2
|
||||
function clone_meta_python2 () {
|
||||
META_MACHINE_LAYER=meta-$1
|
||||
|
||||
if [ $PYTHON2_LAYER_DO_UPDATE == "1" ] && [ "$IMAGE_VERSION" != "3.0" ] && [ "$IMAGE_VERSION" != "3.1" ] && test -d $BUILD_ROOT_DIR/$META_MACHINE_LAYER/recipes-multimedia/kodi; then
|
||||
|
||||
$CURRENT_PYTHON_LAYER_BRANCH
|
||||
|
||||
if test ! -d $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME/.git; then
|
||||
echo -e "\033[35;1mCLONE $PYTHON2_LAYER_NAME:\033[0m\nclone $PYTHON2_LAYER_NAME (branch $YOCTO_BRANCH_NAME) from $PYTHON2_LAYER_GIT_URL ..."
|
||||
do_exec "cd $BUILD_ROOT_DIR"
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME $PYTHON2_LAYER_GIT_URL/$PYTHON2_LAYER_NAME $PYTHON2_LAYER_NAME" ' ' 'show_output'
|
||||
do_exec "git -C $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME checkout $PYTHON2_BRANCH_HASH -b $IMAGE_VERSION"
|
||||
do_exec "git -C $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME am $FILES_DIR/0001-local_conf_outcomment_line_15.patch" ' ' 'show_output'
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
echo -e "\033[35;1mdone ...\033[0m\n"
|
||||
else
|
||||
do_exec "cd $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME"
|
||||
CURRENT_PYTHON_LAYER_BRANCH=`git -C $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME rev-parse --abbrev-ref HEAD`
|
||||
echo -e "\033[35;1mUPDATE: update $PYTHON2_LAYER_NAME $CURRENT_PYTHON_LAYER_BRANCH\033[0m"
|
||||
do_exec "$GIT_STASH" 'no_exit'
|
||||
|
||||
if [ "$CURRENT_PYTHON_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[35;1mCHECKOUT:\033[0m\nswitch from $CURRENT_PYTHON_LAYER_BRANCH to $YOCTO_BRANCH_NAME..."
|
||||
do_exec "git checkout $YOCTO_BRANCH_NAME"
|
||||
fi
|
||||
|
||||
#echo -e "\033[35;1mUPDATE:\033[0m\nupdate $PYTHON2_LAYER_NAME from (branch $YOCTO_BRANCH_NAME) $PYTHON2_LAYER_GIT_URL ..."
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
if [ "$CURRENT_PYTHON_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[35;1mCHECKOUT:\033[0m\nswitch back to $CURRENT_PYTHON_LAYER_BRANCH ..."
|
||||
do_exec "git checkout $CURRENT_PYTHON_LAYER_BRANCH"
|
||||
echo -e "\033[35;1mREBASE:\033[0m\nrebase branch $YOCTO_BRANCH_NAME into $CURRENT_PYTHON_LAYER_BRANCH"
|
||||
do_exec "git rebase $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
fi
|
||||
|
||||
do_exec "$GIT_STASH_POP" 'no_exit'
|
||||
echo -e "\033[35;1mdone ...\033[0m\n"
|
||||
PYTHON2_LAYER_DO_UPDATE=0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# clone or update required branch for qt5
|
||||
function clone_meta_qt5 () {
|
||||
META_MACHINE_LAYER=meta-$1
|
||||
|
||||
if [ $QT5_LAYER_DO_UPDATE == "1" ] && test -d $BUILD_ROOT_DIR/$META_MACHINE_LAYER/recipes-multimedia/kodi; then
|
||||
|
||||
$CURRENT_QT_LAYER_BRANCH
|
||||
|
||||
if test ! -d $BUILD_ROOT_DIR/$QT5_LAYER_NAME/.git; then
|
||||
echo -e "\033[35;1mCLONE $QT5_LAYER_NAME:\033[0m\nclone $QT5_LAYER_NAME (branch $YOCTO_BRANCH_NAME) from $QT5_LAYER_GIT_URL ..."
|
||||
do_exec "cd $BUILD_ROOT_DIR"
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME $QT5_LAYER_GIT_URL/$QT5_LAYER_NAME $QT5_LAYER_NAME" ' ' 'show_output'
|
||||
do_exec "git -C $BUILD_ROOT_DIR/$QT5_LAYER_NAME checkout $QT5_BRANCH_HASH -b $IMAGE_VERSION"
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
echo -e "\033[35;1mdone ...\033[0m\n"
|
||||
else
|
||||
do_exec "cd $BUILD_ROOT_DIR/$QT5_LAYER_NAME"
|
||||
CURRENT_QT_LAYER_BRANCH=`git -C $BUILD_ROOT_DIR/$QT5_LAYER_NAME rev-parse --abbrev-ref HEAD`
|
||||
echo -e "\033[35;1mUPDATE: update $QT5_LAYER_NAME $CURRENT_QT_LAYER_BRANCH\033[0m"
|
||||
do_exec "$GIT_STASH" 'no_exit'
|
||||
|
||||
if [ "$CURRENT_QT_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[35;1mCHECKOUT:\033[0m\nswitch from $CURRENT_QT_LAYER_BRANCH to $YOCTO_BRANCH_NAME..."
|
||||
do_exec "git checkout $YOCTO_BRANCH_NAME"
|
||||
fi
|
||||
|
||||
#echo -e "\033[35;1mUPDATE:\033[0m\nupdate $QT5_LAYER_NAME from (branch $YOCTO_BRANCH_NAME) $QT5_LAYER_GIT_URL ..."
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
if [ "$CURRENT_QT_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[35;1mCHECKOUT:\033[0m\nswitch back to $CURRENT_QT_LAYER_BRANCH ..."
|
||||
do_exec "git checkout $CURRENT_QT_LAYER_BRANCH"
|
||||
echo -e "\033[35;1mREBASE:\033[0m\nrebase branch $YOCTO_BRANCH_NAME into $CURRENT_QT_LAYER_BRANCH"
|
||||
do_exec "git rebase $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
fi
|
||||
|
||||
do_exec "$GIT_STASH_POP" 'no_exit'
|
||||
echo -e "\033[35;1mdone ...\033[0m\n"
|
||||
QT5_LAYER_DO_UPDATE=0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function get_metaname () {
|
||||
TMP_NAME=$1
|
||||
|
||||
if [ "$TMP_NAME" == "hd51" ]; then
|
||||
META_NAME="gfutures"
|
||||
elif [ "$TMP_NAME" == "h7" ]; then
|
||||
if [ "$TMP_NAME" == "hd51" ] || [ "$TMP_NAME" == "bre2ze4k" ] || [ "$TMP_NAME" == "mutant51" ] || [ "$TMP_NAME" == "ax51" ]; then
|
||||
META_NAME="gfutures"
|
||||
elif [ "$TMP_NAME" == "h7" ] || [ "$TMP_NAME" == "zgemmah7" ]; then
|
||||
META_NAME="airdigital"
|
||||
elif [ "$TMP_NAME" == "hd60" ] || [ "$TMP_NAME" == "hd61" ]; then
|
||||
META_NAME="hisilicon"
|
||||
elif [ "$TMP_NAME" == "osmio4k" ] || [ "$TMP_NAME" == "osmio4kplus" ]; then
|
||||
META_NAME="edision"
|
||||
elif [ "$TMP_NAME" == "bre2ze4k" ]; then
|
||||
META_NAME="gfutures"
|
||||
else
|
||||
META_NAME=$TMP_NAME
|
||||
fi
|
||||
echo "$META_NAME"
|
||||
}
|
||||
|
||||
# function for clone or update required branch(es) from machine meta layer
|
||||
function clone_box_layer () {
|
||||
NAME=`get_metaname $1`
|
||||
|
||||
if [ "$NAME" != "all" ]; then
|
||||
if test ! -d $BUILD_ROOT_DIR/meta-$NAME/.git; then
|
||||
do_exec "cd $BUILD_ROOT_DIR"
|
||||
# clone or update required branch for required meta-<layer>
|
||||
function clone_meta () {
|
||||
|
||||
if [ "$NAME" != "gfutures" ]; then
|
||||
echo -e "\033[34;1mCLONE: clone meta-$NAME (branch $YOCTO_BRANCH_NAME) from $TUXBOX_LAYER_GIT_URL ...\033[0m"
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME $TUXBOX_LAYER_GIT_URL/meta-$NAME.git" ' ' 'show_output'
|
||||
LAYER_NAME=$1
|
||||
BRANCH_NAME=$2
|
||||
LAYER_GIT_URL=$3
|
||||
BRANCH_HASH=$4
|
||||
TARGET_GIT_PATH=$5
|
||||
PATCH_LIST=$6
|
||||
|
||||
#echo -e "Parameters= $LAYER_NAME $BRANCH_NAME $LAYER_GIT_URL $BRANCH_HASH $TARGET_GIT_PATH $PATCH_LIST"
|
||||
|
||||
TMP_LAYER_BRANCH=$BRANCH_NAME
|
||||
|
||||
if test ! -d $TARGET_GIT_PATH/.git; then
|
||||
echo -e "\033[35;1mclone from $LAYER_GIT_URL into $TARGET_GIT_PATH (branch $BRANCH_NAME)\033[0m"
|
||||
do_exec "git clone -b $BRANCH_NAME $LAYER_GIT_URL $TARGET_GIT_PATH" ' ' 'show_output'
|
||||
do_exec "git -C $TARGET_GIT_PATH checkout $BRANCH_HASH -b $IMAGE_VERSION"
|
||||
do_exec "git -C $TARGET_GIT_PATH pull -r origin $BRANCH_NAME" ' ' 'show_output'
|
||||
echo -e "\033[35;1mpatching $TARGET_GIT_PATH.\033[0m"
|
||||
for PF in $PATCH_LIST ; do
|
||||
PATCH_FILE="$FILES_DIR/$PF"
|
||||
echo -e "apply: $PATCH_FILE"
|
||||
do_exec "git -C $TARGET_GIT_PATH am $PATCH_FILE" ' ' 'show_output'
|
||||
done
|
||||
else
|
||||
echo -e "\033[34;1mCLONE: clone meta-$NAME (branch $YOCTO_BRANCH_NAME) from https://github.com/dbt1 ...\033[0m"
|
||||
do_exec "$GIT_CLONE -b $YOCTO_BRANCH_NAME https://github.com/dbt1/meta-$NAME.git" ' ' 'show_output'
|
||||
fi
|
||||
echo -e "\033[34;1mdone ...\033[0m\n"
|
||||
TMP_LAYER_BRANCH=`git -C $TARGET_GIT_PATH rev-parse --abbrev-ref HEAD`
|
||||
echo -e "\033[35;1mupdate $TARGET_GIT_PATH $TMP_LAYER_BRANCH\033[0m"
|
||||
do_exec "git -C $TARGET_GIT_PATH stash" 'no_exit'
|
||||
|
||||
if test ! -d $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME; then
|
||||
clone_meta_python2 $NAME
|
||||
if [ "$TMP_LAYER_BRANCH" != "$BRANCH_NAME" ]; then
|
||||
echo -e "switch from branch $TMP_LAYER_BRANCH to branch $BRANCH_NAME..."
|
||||
do_exec "git -C $TARGET_GIT_PATH checkout $BRANCH_NAME"
|
||||
fi
|
||||
|
||||
if test ! -d $BUILD_ROOT_DIR/$QT5_LAYER_NAME; then
|
||||
clone_meta_qt5 $NAME
|
||||
fi
|
||||
else
|
||||
do_exec "cd $BUILD_ROOT_DIR/meta-$NAME"
|
||||
do_exec "$GIT_STASH" 'no_exit'
|
||||
#echo -e "\033[35;1mUPDATE:\033[0m\nupdate $LAYER_NAME from (branch $BRANCH_NAME) $LAYER_GIT_URL ..."
|
||||
do_exec "git -C $TARGET_GIT_PATH pull -r origin $BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
CURRENT_MACHINE_LAYER_BRANCH=`git -C $BUILD_ROOT_DIR/meta-$NAME rev-parse --abbrev-ref HEAD`
|
||||
if [ "$CURRENT_MACHINE_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[37;1mCHECKOUT:\033[0m\nswitch from $CURRENT_MACHINE_LAYER_BRANCH to $YOCTO_BRANCH_NAME..."
|
||||
do_exec "git checkout $YOCTO_BRANCH_NAME"
|
||||
if [ "$TMP_LAYER_BRANCH" != "$BRANCH_NAME" ]; then
|
||||
echo -e "\033[35;1mswitch back to branch $TMP_LAYER_BRANCH\033[0m"
|
||||
do_exec "git -C $TARGET_GIT_PATH checkout $TMP_LAYER_BRANCH"
|
||||
echo -e "\033[35;1mrebase branch $BRANCH_NAME into branch $TMP_LAYER_BRANCH\033[0m"
|
||||
do_exec "git -C $TARGET_GIT_PATH rebase $BRANCH_NAME" ' ' 'show_output'
|
||||
fi
|
||||
|
||||
echo -e "\033[34;1mUPDATE: update meta-$NAME (branch $YOCTO_BRANCH_NAME) from $TUXBOX_LAYER_GIT_URL ...\033[0m"
|
||||
do_exec "$GIT_PULL origin $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
|
||||
if [ "$CURRENT_MACHINE_LAYER_BRANCH" != "$YOCTO_BRANCH_NAME" ]; then
|
||||
echo -e "\033[37;1mCHECKOUT:\033[0m\nswitch back to $CURRENT_MACHINE_LAYER_BRANCH ..."
|
||||
do_exec "git checkout $CURRENT_MACHINE_LAYER_BRANCH"
|
||||
echo -e "\033[37;1mREBASE:\033[0m\nrebase branch $YOCTO_BRANCH_NAME into $CURRENT_MACHINE_LAYER_BRANCH"
|
||||
do_exec "git rebase $YOCTO_BRANCH_NAME" ' ' 'show_output'
|
||||
do_exec "git -C $TARGET_GIT_PATH stash pop" 'no_exit'
|
||||
fi
|
||||
|
||||
do_exec "$GIT_STASH_POP" 'no_exit'
|
||||
echo -e "\033[34;1mdone ...\033[0m\n"
|
||||
|
||||
clone_meta_python2 $NAME
|
||||
clone_meta_qt5 $NAME
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# clone or update meta layers
|
||||
if [ "$MACHINE" == "all" ]; then
|
||||
for M in $MACHINES ; do
|
||||
clone_box_layer $M;
|
||||
# clone/update required branch from yocto
|
||||
clone_meta '' $COMPATIBLE_BRANCH $YOCTO_GIT_URL $YOCTO_BRANCH_HASH $BUILD_ROOT_DIR
|
||||
# for compatibility with old path structure
|
||||
# ln -sf $BUILD_ROOT_DIR $BASEPATH/$POKY-$IMAGE_VERSION
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
|
||||
# clone required branch from openembedded
|
||||
clone_meta '' $COMPATIBLE_BRANCH $OE_LAYER_GIT_URL $OE_BRANCH_HASH $BUILD_ROOT_DIR/$OE_LAYER_NAME "$OE_LAYER_PATCH_LIST"
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
clone_meta '' master $OE_CORE_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$OE_CORE_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
|
||||
# clone required branch for meta-python2
|
||||
clone_meta '' $COMPATIBLE_BRANCH $PYTHON2_LAYER_GIT_URL $PYTHON2_BRANCH_HASH $BUILD_ROOT_DIR/$PYTHON2_LAYER_NAME "$PYTHON2_PATCH_LIST"
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
|
||||
# clone required branch for meta-qt5
|
||||
clone_meta '' $COMPATIBLE_BRANCH $QT5_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$QT5_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
|
||||
# clone/update required branch from meta-neutrino
|
||||
clone_meta '' $COMPATIBLE_BRANCH $TUXBOX_LAYER_GIT_URL/$TUXBOX_LAYER_NAME '' $BUILD_ROOT_DIR/$TUXBOX_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
|
||||
|
||||
# clone/update required branch from tuxbox bsp layers
|
||||
function is_required_machine_layer ()
|
||||
{
|
||||
HIM1=$1
|
||||
for M in $HIM1 ; do
|
||||
if [ "$M" == "$MACHINE" ]; then
|
||||
echo true
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
clone_box_layer $MACHINE;
|
||||
echo false
|
||||
return 0
|
||||
}
|
||||
|
||||
# gfutures
|
||||
if [ "$MACHINE" == "all" ] || [ `is_required_machine_layer "' $MACHINES_GFUTURES '"` == true ]; then
|
||||
# gfutures
|
||||
clone_meta '' $COMPATIBLE_BRANCH $GFUTURES_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$GFUTURES_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
fi
|
||||
# airdigital
|
||||
if [ "$MACHINE" == "all" ] || [ `is_required_machine_layer "' $MACHINES_AIRDIGITAL '"` == true ]; then
|
||||
clone_meta '' $COMPATIBLE_BRANCH $AIRDIGITAL_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$AIRDIGITAL_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
fi
|
||||
# edision
|
||||
if [ "$MACHINE" == "all" ] || [ `is_required_machine_layer "' $MACHINES_EDISION '"` == true ]; then
|
||||
clone_meta '' $COMPATIBLE_BRANCH $EDISION_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$EDISION_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
fi
|
||||
#TODO: move into gfutures
|
||||
# hisilicon
|
||||
if [ "$MACHINE" == "all" ] || [ "$MACHINE" == "hd60" ] || [ "$MACHINE" == "hd61" ]; then
|
||||
clone_meta '' $COMPATIBLE_BRANCH $HISI_LAYER_GIT_URL '' $BUILD_ROOT_DIR/$HISI_LAYER_NAME
|
||||
echo -e "\033[32;1mOK ...\033[0m\n"
|
||||
fi
|
||||
|
||||
|
||||
@@ -378,7 +287,7 @@ if test ! -f $BASEPATH/local.conf.common.inc; then
|
||||
echo -e "\033[37;1mCONFIG:\033[0m\tcreate $BASEPATH/local.conf.common.inc as include file for layer configuration ..."
|
||||
do_exec "cp -v $BASEPATH/local.conf.common.inc.sample $BASEPATH/local.conf.common.inc"
|
||||
else
|
||||
echo -e "\033[37;1mNOTE:\t Local configuration not considered\033[0m"
|
||||
echo -e "\033[37;1mNOTE:\tLocal configuration not considered\033[0m"
|
||||
echo -e "\t##########################################################################################"
|
||||
echo -e "\t# $BASEPATH/local.conf.common.inc already exists. #"
|
||||
echo -e "\t# Nothing was changed on this file for your configuration. #"
|
||||
@@ -388,51 +297,99 @@ else
|
||||
echo -e "\t##########################################################################################"
|
||||
fi
|
||||
|
||||
# get matching machine type from machine build id
|
||||
function get_real_machine_type() {
|
||||
MACHINE_TYPE=$1
|
||||
if [ "$MACHINE_TYPE" == "mutant51" ] || [ "$MACHINE_TYPE" == "ax51" ] || [ "$MACHINE_TYPE" == "hd51" ]; then
|
||||
RMT_RES="hd51"
|
||||
elif [ "$MACHINE_TYPE" == "zgemmah7" ] || [ "$MACHINE_TYPE" == "h7" ]; then
|
||||
RMT_RES="h7"
|
||||
else
|
||||
RMT_RES=$MACHINE_TYPE
|
||||
fi
|
||||
echo $RMT_RES
|
||||
}
|
||||
|
||||
# get matching machine build id from machine type
|
||||
function get_real_machine_id() {
|
||||
MACHINEBUILD=$1
|
||||
if [ "$MACHINEBUILD" == "hd51" ]; then
|
||||
RMI_RES="ax51"
|
||||
elif [ "$MACHINEBUILD" == "h7" ]; then
|
||||
RMI_RES="zgemmah7"
|
||||
else
|
||||
RMI_RES=$MACHINEBUILD
|
||||
fi
|
||||
echo $RMI_RES
|
||||
}
|
||||
|
||||
# function to create configuration for box types
|
||||
function create_local_config () {
|
||||
CLC_ARG1=$1
|
||||
if [ "$CLC_ARG1" != "all" ]; then
|
||||
BOX_BUILD_DIR=$BUILD_ROOT_DIR/$CLC_ARG1
|
||||
MACHINE_BUILD_DIR=$BUILD_ROOT/$CLC_ARG1
|
||||
mkdir -p $BUILD_ROOT
|
||||
|
||||
if test -d $BUILD_ROOT_DIR/$CLC_ARG1; then
|
||||
if test ! -L $BUILD_ROOT_DIR/$CLC_ARG1; then
|
||||
# generate build/config symlinks for compatibility
|
||||
echo -e "\033[37;1m\tcreate compatible symlinks directory for $CLC_ARG1 environment ...\033[0m"
|
||||
mv $BUILD_ROOT_DIR/$CLC_ARG1 $BUILD_ROOT
|
||||
ln -s $MACHINE_BUILD_DIR $BUILD_ROOT_DIR/$CLC_ARG1
|
||||
fi
|
||||
else
|
||||
# generate default config
|
||||
if test ! -d $BOX_BUILD_DIR/conf; then
|
||||
echo -e "\033[37;1m\tcreate directory for $CLC_ARG1 environment ...\033[0m"
|
||||
if test ! -d $MACHINE_BUILD_DIR/conf; then
|
||||
echo -e "\033[37;1m\tcreate build directory for $CLC_ARG1 environment ...\033[0m"
|
||||
do_exec "cd $BUILD_ROOT_DIR"
|
||||
do_exec ". ./oe-init-build-env $CLC_ARG1"
|
||||
do_exec ". ./oe-init-build-env $MACHINE_BUILD_DIR"
|
||||
do_exec "cd $BASEPATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# move config files into conf directory
|
||||
if test -f $BASEPATH/local.conf.common.inc; then
|
||||
if test ! -f $BOX_BUILD_DIR/conf/local.conf.$BACKUP_SUFFIX; then
|
||||
echo -e "\tset base configuration for $CLC_ARG1 ... "
|
||||
do_exec "mv -v $BOX_BUILD_DIR/conf/local.conf $BOX_BUILD_DIR/conf/local.conf.$BACKUP_SUFFIX"
|
||||
echo 'MACHINE ?= "'$CLC_ARG1'"' > $BOX_BUILD_DIR/conf/local.conf
|
||||
echo "include $BASEPATH/local.conf.common.inc" >> $BOX_BUILD_DIR/conf/local.conf
|
||||
LOCAL_CONFIG_FILE_PATH=$MACHINE_BUILD_DIR/conf/local.conf
|
||||
if test ! -f $LOCAL_CONFIG_FILE_PATH.$BACKUP_SUFFIX || test ! -f $LOCAL_CONFIG_FILE_PATH; then
|
||||
echo -e "\tcreate configuration for $CLC_ARG1 ... "
|
||||
if test -f $LOCAL_CONFIG_FILE_PATH; then
|
||||
do_exec "mv -v $LOCAL_CONFIG_FILE_PATH $LOCAL_CONFIG_FILE_PATH.$BACKUP_SUFFIX"
|
||||
fi
|
||||
# add line 1, include for local.conf.common.inc
|
||||
echo "include $BASEPATH/local.conf.common.inc" > $LOCAL_CONFIG_FILE_PATH
|
||||
|
||||
# add line 2
|
||||
M_TYPE='MACHINE = "'`get_real_machine_type $CLC_ARG1`'"'
|
||||
echo $M_TYPE >> $LOCAL_CONFIG_FILE_PATH
|
||||
|
||||
# add line 3
|
||||
M_ID='MACHINEBUILD = "'`get_real_machine_id $CLC_ARG1`'"'
|
||||
echo $M_ID >> $LOCAL_CONFIG_FILE_PATH
|
||||
fi
|
||||
else
|
||||
echo -e "\033[31;1mERROR:\033[0m:\ttemplate $BASEPATH/local.conf.common.inc not found..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test ! -f $BOX_BUILD_DIR/conf/bblayers.conf.$BACKUP_SUFFIX; then
|
||||
echo -e "\033[37;1m\tset base bblayer configuration for $CLC_ARG1...\033[0m"
|
||||
do_exec "cp -v $BOX_BUILD_DIR/conf/bblayers.conf $BOX_BUILD_DIR/conf/bblayers.conf.$BACKUP_SUFFIX"
|
||||
if test ! -f $MACHINE_BUILD_DIR/conf/bblayers.conf.$BACKUP_SUFFIX; then
|
||||
echo -e "\tcreate bblayer configuration for $CLC_ARG1..."
|
||||
do_exec "cp -v $MACHINE_BUILD_DIR/conf/bblayers.conf $MACHINE_BUILD_DIR/conf/bblayers.conf.$BACKUP_SUFFIX"
|
||||
META_MACHINE_LAYER=meta-`get_metaname $CLC_ARG1`
|
||||
echo 'BBLAYERS += " \
|
||||
'$BUILD_ROOT_DIR'/meta-neutrino \
|
||||
'$BUILD_ROOT_DIR'/'$TUXBOX_LAYER_NAME' \
|
||||
'$BUILD_ROOT_DIR'/'$META_MACHINE_LAYER' \
|
||||
"' >> $BOX_BUILD_DIR/conf/bblayers.conf
|
||||
if test -d $BUILD_ROOT_DIR/$META_MACHINE_LAYER/recipes-multimedia/kodi; then
|
||||
'$BUILD_ROOT_DIR'/'$OE_LAYER_NAME/meta-oe' \
|
||||
'$BUILD_ROOT_DIR'/'$OE_LAYER_NAME/meta-networking' \
|
||||
"' >> $MACHINE_BUILD_DIR/conf/bblayers.conf
|
||||
if test -d $BUILD_ROOT_DIR/$META_MACHINE_LAYER/recipes-kodi; then
|
||||
echo 'BBLAYERS += " \
|
||||
'$BUILD_ROOT_DIR'/'$PYTHON2_LAYER_NAME' \
|
||||
"' >> $BOX_BUILD_DIR/conf/bblayers.conf
|
||||
"' >> $MACHINE_BUILD_DIR/conf/bblayers.conf
|
||||
fi
|
||||
if test -d $BUILD_ROOT_DIR/$QT5_LAYER_NAME; then
|
||||
if test -d $BUILD_ROOT_DIR/$META_MACHINE_LAYER/recipes-qt; then
|
||||
echo 'BBLAYERS += " \
|
||||
'$BUILD_ROOT_DIR'/'$QT5_LAYER_NAME' \
|
||||
"' >> $BOX_BUILD_DIR/conf/bblayers.conf
|
||||
"' >> $MACHINE_BUILD_DIR/conf/bblayers.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -440,60 +397,36 @@ function create_local_config () {
|
||||
|
||||
# function create local dist directory to prepare for web access
|
||||
function create_dist_tree () {
|
||||
PAR1=$1
|
||||
if [ "$PAR1" != "all" ]; then
|
||||
|
||||
# create dist dir
|
||||
DIST_BASEDIR="$BASEPATH/dist/$IMAGE_VERSION"
|
||||
DIST_LINK=$DIST_BASEDIR/$PAR1
|
||||
DIST_LINK_IMAGES=$DIST_BASEDIR/$PAR1/images
|
||||
DIST_LINK_IPK=$DIST_BASEDIR/$PAR1/ipk
|
||||
DIST_LINK_LICENSE=$DIST_BASEDIR/$PAR1/licenses
|
||||
DIST_LINK_SOURCE_DOC=$DIST_BASEDIR/$PAR1/source-doc
|
||||
|
||||
if test ! -d "$DIST_LINK"; then
|
||||
echo -e "\n\033[37;1mcreate directory:\033[0m $DIST_LINK"
|
||||
do_exec "mkdir -p $DIST_LINK"
|
||||
if test ! -d "$DIST_BASEDIR"; then
|
||||
echo -e "\033[37;1mcreate dist directory:\033[0m $DIST_BASEDIR"
|
||||
do_exec "mkdir -p $DIST_BASEDIR"
|
||||
fi
|
||||
|
||||
DEPLOY_DIR=$BUILD_ROOT_DIR/$PAR1/tmp/deploy
|
||||
DEPLOY_DIR_IMAGES=$DEPLOY_DIR/images/$PAR1
|
||||
DEPLOY_DIR_IPK=$DEPLOY_DIR/ipk
|
||||
DEPLOY_DIR_LICENSE=$DEPLOY_DIR/licenses
|
||||
DEPLOY_DIR_SOURCE_DOC=$DEPLOY_DIR/source-doc
|
||||
|
||||
if test ! -L "$DIST_LINK_IMAGES"; then
|
||||
echo -e "\033[37;1mcreate symlink:\033[0m $DIST_LINK_IMAGES"
|
||||
do_exec "ln -sf $DEPLOY_DIR_IMAGES $DIST_LINK_IMAGES"
|
||||
fi
|
||||
|
||||
if test ! -L "$DIST_LINK_IPK"; then
|
||||
echo -e "\033[37;1mcreate symlink:\033[0m $DIST_LINK_IPK"
|
||||
do_exec "ln -sf $DEPLOY_DIR_IPK $DIST_LINK_IPK"
|
||||
fi
|
||||
|
||||
if test ! -L "$DIST_LINK_LICENSE"; then
|
||||
echo -e "\033[37;1mcreate symlink:\033[0m $DIST_LINK_LICENSE"
|
||||
do_exec "ln -sf $DEPLOY_DIR_LICENSE $DIST_LINK_LICENSE"
|
||||
fi
|
||||
|
||||
if test ! -L "$DIST_LINK_SOURCE_DOC"; then
|
||||
echo -e "\033[37;1mcreate symlink:\033[0m $DIST_LINK_SOURCE_DOC"
|
||||
do_exec "ln -sf $DEPLOY_DIR_SOURCE_DOC $DIST_LINK_SOURCE_DOC"
|
||||
fi
|
||||
# create link sources
|
||||
DIST_LIST=`ls $BUILD_ROOT`
|
||||
for DL in $DIST_LIST ; do
|
||||
DEPLOY_DIR="$BUILD_ROOT/$DL/tmp/deploy"
|
||||
ln -sf $DEPLOY_DIR $DIST_BASEDIR/$DL
|
||||
if test -L "$DIST_BASEDIR/$DL/deploy"; then
|
||||
unlink $DIST_BASEDIR/$DL/deploy
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# create configuration for machine
|
||||
if [ "$MACHINE" == "all" ]; then
|
||||
for M in $MACHINES ; do
|
||||
create_local_config $M;
|
||||
create_dist_tree $M;
|
||||
done
|
||||
else
|
||||
create_local_config $MACHINE;
|
||||
create_dist_tree $MACHINE;
|
||||
fi
|
||||
|
||||
create_dist_tree;
|
||||
|
||||
# check and create distribution directory inside html directory for online update
|
||||
if test ! -L /var/www/html/dist; then
|
||||
echo -e "\033[37;1mNOTE:\t Online update usage.\033[0m"
|
||||
|
@@ -48,10 +48,18 @@ YOCTO_BASEDIR = "${COREBASE}"
|
||||
DL_DIR ?= "${COREBASE}/yocto-downloads"
|
||||
#DL_DIR = "${HOME}/Archive"
|
||||
|
||||
### Directory for the shared state cache. By default, the SSTATE_DIR variable points to sstate-cache within the build directory as ${TOPDIR}/sstate-cache.
|
||||
### Directory for the shared state cache. By default, the SSTATE_DIR variable points to sstate-cache within the build directory as ${TOPDIR}/sstate-cache,
|
||||
# but it's a good idea to place it into your user directory, so that this folder is always available in case the build folder should be deleted anyway.
|
||||
#
|
||||
SSTATE_DIR = "${TOPDIR}/sstate-cache"
|
||||
#SSTATE_DIR = "${HOME}/sstate-cache"
|
||||
#SSTATE_DIR = "${TOPDIR}/sstate-cache"
|
||||
SSTATE_DIR = "${HOME}/sstate-cache"
|
||||
|
||||
### Share ccache files between different builds
|
||||
# Set CCACHE_TOP_DIR to a shared dir
|
||||
# CCACHE_TOP_DIR = /path/to/shared_ccache/
|
||||
#CCACHE_TOP_DIR = "${TMPDIR}/ccache"
|
||||
# recommended:
|
||||
CCACHE_TOP_DIR = "${HOME}/.ccache"
|
||||
|
||||
### sdk options
|
||||
#
|
||||
@@ -87,7 +95,8 @@ BB_DISKMON_DIRS = "\
|
||||
#
|
||||
BB_HASHSERVE = "auto"
|
||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
|
||||
#
|
||||
# https://docs.yoctoproject.org/ref-manual/variables.html#term-BB_DANGLINGAPPENDS_WARNONLY
|
||||
BB_DANGLINGAPPENDS_WARNONLY = "1"
|
||||
|
||||
### Qemu configuration
|
||||
@@ -136,14 +145,14 @@ IMAGE_BASENAME = "my-image"
|
||||
#DISTRO_VERSION = "22.5.0"
|
||||
|
||||
### Release type string
|
||||
# Possible types are beta, release, nightly, all others means personal
|
||||
# Possible types are beta, release, nightly, all others means what ever you want
|
||||
#
|
||||
#DISTRO_TYPE = "beta"
|
||||
|
||||
### IMAGE_NAME_SUFFIXES:
|
||||
#
|
||||
#IMAGE_VERSION_SUFFIX="-${DATE}"
|
||||
## proposed:
|
||||
### proposed:
|
||||
#IMAGE_VERSION_SUFFIX="-${DISTRO_TYPE}"
|
||||
#IMAGE_VERSION_SUFFIX="-${DATE}-${DISTRO_TYPE}"
|
||||
#IMAGE_VERSION_SUFFIX="-${PR}"
|
||||
@@ -153,14 +162,14 @@ IMAGE_BASENAME = "my-image"
|
||||
|
||||
### Complete image name
|
||||
#
|
||||
#IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-v${DISTRO_VERSION}${IMAGE_VERSION_SUFFIX}"
|
||||
#IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE_BRAND}-${MACHINE_NAME}-${DISTRO_VERSION}${IMAGE_VERSION_SUFFIX}"
|
||||
|
||||
### Default image root password
|
||||
# set initial password for user root. Keep empty for root:
|
||||
#
|
||||
ROOTPW = ""
|
||||
|
||||
### Add Image Maintainer and host build machinehere
|
||||
### Add Image Maintainer and host build machine here
|
||||
#
|
||||
# CREATOR = "${USER}"
|
||||
# KBUILD_BUILD_USER = "${CREATOR}"
|
||||
@@ -171,31 +180,29 @@ KBUILD_BUILD_HOST = "127.0.0.1"
|
||||
GIT_USER = "root"
|
||||
MAIL = "root@${MACHINE}"
|
||||
|
||||
### dev keys for neutrino gui
|
||||
# NOTE: Here you see empty entries! NOT WORKING! Own key are required!
|
||||
#
|
||||
## NOTE: WEATHER_DEV_KEY for darksky not longer used and are not longer valid
|
||||
## WEATHER_DEV_KEY = "dedec626c1ab3998aca1c74ee43264cc"
|
||||
## Beginning on March 31st, 2023 the Dark Sky API will no longer be available.
|
||||
## WeatherKit, a new Apple API available on iOS, iPadOS, macOS, tvOS,
|
||||
## and web that provides access to the new Apple Weather forecast data.
|
||||
## Now in use is: openweather map
|
||||
#
|
||||
### dev keys for neutrino gui and weather plugin
|
||||
# NOTE: Here you see empty entries! NOT WORKING! Own keys are required!
|
||||
# You can also include a file eg. named "local.conf.devkeys.inc"
|
||||
# and add these lines into your included file:
|
||||
# Modify and add these line:
|
||||
# include /<path>/<to>/local.conf.devkeys.inc
|
||||
#
|
||||
# NOTE: Beginning on March 31st, 2023 the Dark Sky API will not longer be available.
|
||||
# WeatherKit, a new Apple API available on iOS, iPadOS, macOS, tvOS,
|
||||
# and web that provides access to the new Apple Weather forecast data.
|
||||
# The WEATHER_DEV_KEY variable is not longer used for darksky keys
|
||||
# Currently used provider is: openweather map
|
||||
WEATHER_DEV_KEY = ""
|
||||
# YouTube, TMDB, OMDB, ShoutCast
|
||||
YT_DEV_KEY = ""
|
||||
TMDB_DEV_KEY = ""
|
||||
SHOUTCAST_DEV_KEY = ""
|
||||
OMDB_API_KEY = ""
|
||||
WEATHER_DEV_KEY = ""
|
||||
|
||||
|
||||
### Extra build config options for neutrino build
|
||||
# e.g: to enable the neutrino test menu
|
||||
# NOTE! Works only with FLAVOUR = "tuxbox"
|
||||
# keep this entry disabled, if you want to use an other FLAVOUR the "tuxbox".
|
||||
# Keep this entry disabled, if you want to use an other FLAVOUR than "tuxbox".
|
||||
# and add these lines into your local.conf within your build directory
|
||||
# EXTRA_OECONF_append_pn-neutrino-mp = " \
|
||||
# --enable-testing \
|
||||
# "
|
||||
@@ -333,6 +340,7 @@ SSTATE_MIRRORS += "\
|
||||
# "
|
||||
|
||||
### Put additional packages that should be packaged into your image. Separated with a whitespace. or use IMAGE_INSTALL += ...
|
||||
|
||||
# https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-IMAGE_INSTALL
|
||||
# See: ./meta-neutrino/recipes-images/images/neutrino-image-base.inc.
|
||||
#
|
||||
|
Reference in New Issue
Block a user