- BitBake 87.8%
- Python 4.6%
- C++ 4.3%
- HTML 1.1%
- JavaScript 0.9%
- Other 1.3%
|
|
||
|---|---|---|
| .cspell | ||
| electron-test | ||
| meta-addons | ||
| meta-clang@eaa08939ea | ||
| meta-lts-mixins@65b35821c8 | ||
| meta-miscfix-mixins | ||
| meta-openembedded@e92d0173a8 | ||
| meta-raspberrypi@3b27c95c16 | ||
| poky@c162696dae | ||
| xorg-conf/etc/x11/xorg.conf.d | ||
| yocto-conf | ||
| .gitignore | ||
| .gitmodules | ||
| .markdownlint2.jsonc | ||
| awk-gpl-3 | ||
| bblayers.conf.old | ||
| cspell.json | ||
| LICENSE | ||
| local.conf.old | ||
| README.md | ||
| yocto-failed-electron.code-workspace | ||
Yocto Test
Description
This project is a failed attempt to get ElectronJS working inside a Yocto project.
However, it resulted in some useful bits, describe below. Since then the author has started a new project called Yocto-Doky, which is a more complete and better done Yocto framework.
Results
It turns out Electron is huge and has a very large number of dependencies that have been modified from upstream and are therefore must also be downloaded and managed in order to build Electron.
In addition Electron's developers actively discourage building from source and are not supportive of attempts to build from source.
Further, attempting track the licenses of the myriad dependencies in an automated fashion, as is built into Yocto, is time-consuming and not supported.
This makes ElectronJS an unsuitable project for embedded development, where there tends to be per-device configuration, and therefore limited or no ability to use the prebuilt binaries supplied by the ElectronJS project.
But some useful bits
Fixes and tweaks for building mixed open source / proprietary firmware
In the process of making this attempt, the author Daniel F. Dickinson
created a meta-miscfix-mixins layer which makes it easier to create a
Yocto-based firmware that does not have any GPLv3 or LGPLv3 code. This is
important (along with avoiding similar licenses) because those licenses include
the condition that all the code which in the firmware has to be released under
the same license. This is problematic when the code is intended to be
proprietary.
Parts of the project (like this repository) which are derivatives of the original open source code are not a problem to release, and in fact doing so continues to be a requirement of much of the code base's licensing.
Some interesting code to pre-patch a codebase with supplied patches
Electron includes a number of patches on upstream projects, and these need to be applied in order for the upstream project to be usable for Electron's purposes. So we develop a means to apply Electron's patches to it's upstream sources (pre-patch) that is reliable and doesn't require pulling the patches into the Yocto build. (That would create a huge patch maintenance burden).
This method also maintains the ability to apply Yocto-specific patches on top of Electron's patches and code.
Build prerequisites
sudo apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd python3-websockets
Target machine
Currently configured with Raspberry Pi 5 as target
Electron is not built
The electron code is currently not included in the image as the build of Electron currently fails due to not having the code for most of the dependencies in the project either included in the project, or as part of the download process.
Builds a modified Poky reference image
Building core-image-x11 results in the build of a Poky reference image which
launches a rootless X server with xterm pretending to be matchbox-terminal,
and busybox ash pretending to be bash.
This is done since matchbox-terminal and bash are both GPLv3 licensed, and
we want to avoid that.
TODO: Repo configuration and building
To be added.