First build
You should have installed all requirements and run the packages setup step.
Buildroot
To start a buildroot script we first need to make sure buildroot is available, for that we can run:
cd buildroot
riji downloadThis will download the buildroot repo and set it to the correct version.
After that we now can start a build (note this will take between 1h and 3h depending on your system):
riji build intel Release
# riji build <board> <channel>Board here can be one of intel, intel-headless, pi4 and pi4-headless and channel can be Debug or Release. In Debug builds ssh and other useful tools are included.
To finish the build we need to upload the image to the package server:
riji upload intel Debug server-nameWhere server-name is the name you used with publisher config.
You have now completed the buildroot build, we now need to build the packages you want to include in your final product.
Chromium
If you built intel or pi4 you will need to publish chromium as well.
Fast
If you just want to get the current chromium (which is really old) you can download the following file
Extract the files into chromium/amd64/release/chromium.
Manual
Run the following commands:
cd chromium
riji download
riji build amd64 ReleaseIf you only did a buildroot Debug build you need to change the command to:
riji build amd64 Release DebugPublish
Now inside the chromium folder you can run:
publisher upload --arch Amd64 server-nameWhere server-name is the name you used with publisher config.
If you only did a buildroot Debug build you need to use:
publisher upload --arch Amd64 server-name --host-channel DebugService
Now the next package you need is the service for the service to work correctly we need to add a build-config.toml file:
[release]
whitelist = ["127.0.0.1", "localhost", "external.api"]This needs to match what your chromium browser then needs to be able to access since all other connections will be blocked.
After that config we can publish:
cd service
publisher upload --arch Amd64 server-nameWhere server-name is the name you used with publisher config.
If you only did a buildroot Debug build you need to use:
publisher upload --arch Amd64 server-name --host-channel DebugApp
Now you need a "user" application to run on the os. For this documentation we will use example-binary.
cd example-binary
publisher upload --arch Amd64 server-nameWhere server-name is the name you used with publisher config.
If you only did a buildroot Debug build you need to use:
publisher upload --arch Amd64 server-name --host-channel DebugProduct
Now to build our final image we need to create a new product configuration.
Create a new file, for example buildroot/products/basic.toml in this repo.
With the content:
list = ["service", "chromium", "example-binary"]
channel = "Release"
on-run = "example-binary"
# product is the name that will be returned inside the os
# api, it can be the same for multiple product files
# it should more reflect the generation of product and not if its
# a debug or release build
# based on this you can then toggle features inside your application
product = "one"
[[source]]
address = "myaddr:port"
pub-key = "your-connection-public-key"
sign-key = "your-signature-public-key"This config defines what packages to install how to call it and where to get the packages from.
Create image
We are now finally ready to create an image we can burn to a usb stick or launch inside a vm.
To create the image we can run:
riji create_image basic intel Release
# riji create_image <product> <board> <host-channel>The host channel here means if buildroot was a Debug or Release build.
This will download all required packages and then create buildroot/output/intel/Release/one.img.
If virtual box is installed it will also create buildroot/output/intel/Release/one.vdi which you can import to boot.
Ssh
If you have done a Debug build you will be able to ssh into your new os:
user: user
password: Password!