README: Update build instructions

Update the build instructions with
steps for containerized builds.

Changelog-entry: Update build instructions in README
Signed-off-by: Alex Gonzalez <alexg@balena.io>
This commit is contained in:
Alex Gonzalez 2023-08-10 13:40:48 +02:00
parent c890901f6c
commit 0f8953f70a

View file

@ -29,24 +29,36 @@ bring in all the needed dependencies.
## Build information ## Build information
### Build flags balenaOS currently only builds with cgroups v1. If your distribution defaults
to using cgroups v2, please boot with the following kernel command line
argument:
`systemd.unified_cgroup_hierarchy=0`
* Consult layers/meta-balena/README.md for info on various build flags (setting ### Containerized build
up serial console support for example) and build prerequisites. Build flags can
be set by using the build script (barys) or by manually modifying `local.conf`.
See below for using the build script. * If you have a working docker installation, you can build in a containerized
environment as follows:
`./balena-yocto-scripts/build/balena-build.sh -d <device type> -s <shared directory>`
### Build this repository Where:
* Device type is one of the supported devices with a valid `<device type name>.coffee` description file.
* Shared directory is the absolute path to the build folder
* Run the build script: ### Native build
To build all supported device types natively, please make sure your Linux
distribution is [supported](https://docs.yoctoproject.org/singleindex.html#supported-linux-distributions) by Yocto Project.
Additional host tools need to be installed for native builds to work.
* Run the barys build script:
`./balena-yocto-scripts/build/barys` `./balena-yocto-scripts/build/barys`
* You can also run barys with the -h switch to inspect the available options * You can also run barys with the -h switch to inspect the available options
### Custom build using this repository ### Custom build using this repository
* Run the build script in dry run mode to setup an empty `build` directory * Run the barys build script in dry run mode to setup an empty `build` directory
`./balena-yocto-scripts/build/barys --remove-build --dry-run` `./balena-yocto-scripts/build/barys --remove-build --dry-run`
* Edit the `local.conf` in the `build/conf` directory * Edit the `local.conf` in the `build/conf` directory
@ -56,6 +68,13 @@ See below for using the build script.
* Run bitbake (see message outputted when you sourced above for examples) * Run bitbake (see message outputted when you sourced above for examples)
### Build flags
* Consult layers/meta-balena/README.md for info on various build flags (setting
up serial console support for example) and build prerequisites. Build flags can
be set by using the build scripts (barys or balena-build) or by manually
modifying `local.conf`.
## Contributing ## Contributing
### Issues ### Issues