Closed Bravo555 closed 1 year ago
addgroup
adduser
and runuser
commands for cross-unix systems compatibility
As for now, there is no layer for yocto embedded system that supports Ubuntu/Debian addgroup/adduser
wrappers. There is also a problem with runuser
command that has its own layer, but cannot be bitbaked on kirkstone release for some reason.
To run configuration scripts, that are located in /configuration/debian/
directory, the commands mentioned above must be replaced with the ones that are cross-unix compatible i.e.:
addgroup
replace with groupadd
adduser
replace with useradd
runuser
replace with sudo
@Bravo555 confirmed that we can close this issue.
This is an issue for tracking the progress of adding Yocto Linux support to thin-edge.io.
The process of creating a Yocto Linux distribution with thin-edge is outlined in the README of our Yocto Linux layer repository: https://github.com/Bravo555/meta-tedge
Required steps:
[x] #1330 Make it possible to generate bitbake recipes for thin-edge.io crates using
cargo-bitbake
utility Currently it fails because of missing eitherpackage.homepage
orpackage.repository
fields in crate manifests. These fields are not required by bitbake to build the package, but cargo-bitbake fails when they're missing. To fix this, we need to add the fields to affected crate manifests. Making a PR to cargo-bitbake is an option, but it's likely to stall, as the repository looks unmaintained.[x] #1342 Create required user documentation The documentation should reside in the How-to Guides directory and outline how to include the layer in the distribution and how to use provided packages to customise the distribution.
[x] #1343 Create a process to automatically generate necessary recipes In order to use thin-edge in Yocto Linux, one needs to create recipes for all the necessary components. Recipes are files used by bitbake that contain metadata about the package, location of its sources, build instructions, and any additional scripts to make that package available in the generated distribution. In bitbake build process, there are separate tasks for fetching, unpacking, and compiling the code, so all dependencies have to be fetched as one step, followed by them being unpacked in one step, followed by all the compiling in one step. Currently, cargo-bitbake achieves this by listing all the dependencies a crate in its recipe file. It means that every time
Cargo.lock
file changes, the recipe file has to change too. To achieve this, we'd have to use some automated process (eg. Github Actions) to regenerate the recipe with cargo-bitbake every time any lockfile changes and put updated recipe in its proper place in the layer repository. As a last resort, the recipe could be generated by the user running cargo-bitbake themselves, but this isn't recommended. A possible impovement would be to make bitbake fetch the dependencies usingcargo fetch
command.[x] Transfer the meta-tedge layer repository under thin-edge Finally, the layer repository should be transferred under thin-edge organization, either as a separate repository, or as a part of thin-edge.io_examples repository. IMO the latter is discouraged, because layers in the OpenEmbedded Layer Index usually each have their own repository, and with this approach the user will have to pull unrelated things in order to use the layer. The details of the transfer can be addressed at a later date though.
This description will be updated as the steps are completed. Please do comment here if there are any more steps to add or concerns to address as a part of Yocto Linux support.