You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Package infrastructure
- [x] Configuration Node for multiple package build backend
- [x] Package base class
- [ ] Implicit handling of kernel/runtime package
- [x] Meson package support
- [x] Cargo package support
## Change in configuration
The followings nodes are renamed:
- `sentry` --> `kernel`
- `libshield` --> `runtime` (will cover runtime for supported languages)
- `app` --> `application`
The following properties are renamed:
- `exelist` --> `provides` (which may contain other compile product than
an executable)
- `config_file` --> `config`
- `deps` --> `depends`
Scm and git configuration are no longer flattened. each package has a
scm.<method>, only scm.git is supported yet.
Application has a build.backend entry with meson/cargo value. A generic
options list can be passed w/ build.options.<opt>, they can be either a
boolean, a string or a integer value.
There will be a set of "built-in" options derived according to the
backend. Others, will be translate as-is and pass to configure step.
e.g.:
```toml
build.options.with_doc = true
```
-->
```meson
-Dwith_doc=true
```
### Configuration example
```toml
name = 'Sample project'
license = 'Apache-2.0'
license_file = ['LICENSE.txt']
dts = 'dts/sample_project.dts'
crossfile = 'cm33-none-eabi-gcc.ini'
version = 'v0.0.1'
[kernel]
scm.git.uri = 'https://github.com/outpost-os/sentry-kernel.git'
scm.git.revision = 'main'
config = 'configs/sentry/nucleo_u5a5.config'
[runtime]
scm.git.uri = 'https://github.com/outpost-os/libshield.git'
scm.git.revision = 'main'
config = 'configs/shield/shield.config'
[application.app1]
scm.git.uri = 'https://github.com/outpost-os/app1.git'
scm.git.revision = 'main'
config = 'configs/app1.config'
build.backend = 'meson'
depends = []
provides = ['app1.elf']
[application.app2]
scm.git.uri = 'https://github.com/outpost-os/app2.git'
scm.git.revision = 'main'
config = 'configs/app2.config'
build.backend = 'meson'
depends = []
provides = ['app2.elf']
```
## Package base class
Provide base package attribute and property as source directory, build
directory forge, config and dts handling, virtual methods for:
- post download hook (e.g. meson subprojects download, cargo vendoring)
- post update hook
- install hook (e.g. cargo install can't install in a sysroot w/ elf
suffix).
- classmethod setup hook (each package backend may need a dedicated step
before configure/compile, e.g. cargo need a config.toml to configure SDK
path, meson a cross file, cmake a toolchain file for toolchain/sysroot
configuration, etc.).
## Implicit kernel/runtime
Kernel and runtime build and/or scm config shall not appear at
integration level. A system integration should select an OS release
(usually the tuple kernel, runtime, compiler collection). This is not
supported yet but dependencies on kernel and runtime are implicit. In
future version, this will be packaged as sdk source, project will only
has to choose a version to use.
## Meson Package
- [x] Meson package class inherit from Package
- [x] Add option to enable/disable subprojects fetch/update (e.g.
download might be false by defaut, update shall be true)
- [ ] Impl virtual property for configure/compile/install args
## Cargo Package
0 commit comments