Adding support for new device
Every device supported by RadxaOS requires several metapackages available in the apt repositories. They are usually unique to each hardware, as such cannot be shared between devices.
It is intentional to keep this info in form of package dependencies, and spread out in several packages, instead of a single hard coded config file. This is because:
- Different build tools don't need to track this config in order to build with correct packages.
- Ease of migration between tools.
For example, fromrbuild
torsdk
, we use the same simple package logic instead doing data transform, which was the case forrbuild
'sconfigs
files. - Allow underlying package to be changed/updated in the future.
Adding new device
Currently, there are 4 places that need to be updated:
- Kernel metapackages
Those includes Linux kernel image as well as kernel header, and some other less used packages.
Currently you need to edit the relatedbsp
Linux profile to include the new device. - Firmware metapackage
This is similar to the kernel package in case of U-Boot, where the U-Boot profile needs to be updated.
For EDK2 you will need to add the metapackage in the related repo. - Product metapackage
Each product also needs its own package to pull device-specific drivers, and some common config options. Those are defined inradxa-profiles
repo. products.json
This registers the supported products forrsdk
and their default configurations.
Right now, product metapackage does not specify dependencies to kernel and firmware (even though we have product-agnostic metapackages for those two). This is to allow users to install custom kernels only without breaking the dependencies.
Note that vendor metapackage is listed as recommended in product metapackages. This way users can install the system without SoC vendors' binary packages.
Finally, create the new product build repo under radxa-build
with rsdk-infra-product-update
command.
What if we introduce a new SoC?
You need to additionally update following places:
- Vendor metapackage
Each SoC needs their own package to pull SoC-specific packages, and some common config options. Those are defined invendor-profiles
repo. socs.json
New SoC MUST be added tosoc_specific_repo
array as well.- New SoC-specific apt repo under
radxa-repo
organization. - SoC-specific package repo
In case of Rockchip, those are managed byrockchip-prebuilt
repo, and we create Rockchip SDK prebuilt packages in GitHub Releases, which will be uploaded to the SoC-specific apt repo.
If the new SoC is only a variant of already supported SoC, then you only need to edit the relatedpkg.conf
to include the new SoC-specific apt repo.
What if we introduce a new SoC vendor?
You need to additionally update following places:
- Vendor metapackage
Each vendor needs their own package to pull common config options. Those are defined invendor-profiles
repo. socs.json
There should be a new item for the new vendor.