- If you don't have the
repotool installed, please refer to Build Torizon OS From Source with Yocto Project. - Initialize and sync the repo manifest for Synaptics:
$ mkdir common-torizon; cd common-torizon
$ repo init -u https://git.toradex.com/toradex-manifest.git -b scarthgap-7.x.y -m common-torizon/syn/integration.xml
$ repo sync -j 10Manifests for Wrynose are still under development
Important
Until an official release of Common Torizon OS, only the integration.xml manifest is suitable for end-users to build. After an official release, users will be able to use the default.xml manifest.
Note that integration.xml is a development manifest used internally and it might contain development features and thus be considered unstable.
Important
Common Torizon OS is only available on branches scarthgap-7.x.y or newer!
Alternatively, you can manually clone all layers one by one. Refer to the section Manual Setup at the end of this document to learn how.
You can use Synaptics Crops container to also build Common Torizon
$ docker run --rm -it --name=syn-crops-common -v $(pwd):/workdir --workdir=/workdir ghcr.io/synaptics-astra/crops:latest| Board | MACHINE | Status |
|---|---|---|
| Luna SL1680 | luna-sl1680 | Supported |
| Astra SL1680 | sl1680 | Supported |
- Source
setup-environment, specifying the machine to build with the MACHINE variable e.g.:
$ MACHINE=sl1680 . setup-environment <build-directory>If a build directory is not given, the script will create one named build-${DISTRO}, where all build artifacts will be stored. By default DISTRO is automatically set to common-torizon with the Synaptics boards.
- Inside the build directory, start the build e.g.:
$ bitbake torizon-dockerAll artifacts should be inside <build-directory>/deploy/images/${MACHINE}, including the SYNAIMG folder.
On the device, press the USB-Boot button, and while holding it down either power on the device or press the RESET button.
To the right of the USB-C connector there is a jumper, that's the board USB-Boot jumper. Power off the device on the Power Switch, short this jumper and then power it on again.
After the flashing is done, remove the short on that jumper so the device can boot normally.
For flashing, there are two possible ways: use the helper script flash-image.sh or doing the steps manually.
-
The easiest way is to use the helper script:
a. After the build is done, get the file called
SYNAIMG-flash.tar.gzfrom thedeploy/images/${MACHINE}folder.
b. Unpack it into a proper folder, using the tar command:tar -xf SYNAIMG-flash.tar.gz.
c. With the board in recovery mode, execute the script:./flash-image.sh. -
Another option is to do all the steps manually:
a. For flashing, you'll need the latest release of Synaptics'
usb-tool. Please refer to their usb-tool GitHub repository and download the latestastra-update. OnLuna SL1680, make sure to check the important note at the bottom of this section.b. Unpack its contents somewhere, go into that folder and copy
SYNAIMGfrom the generated artifacts of your build.$ cd usb-tool $ cp -r <build-directory>/deploy/images/${MACHINE}/SYNAIMG SYNAIMG
- Or make a symlink to it
$ cd usb-tool $ ln -s <build-directory>/deploy/images/${MACHINE}/SYNAIMG SYNAIMG
c. Grab the manifest ID:
$ cat astra-usbboot-images/sl1680_suboot/manifest.yaml | grep ^id:d. Run
astra-update$ sudo ./bin/linux/x86_64/astra-update -c sl1680 -m 4gb -d lpddr4x -t emmc -i <manifest ID from previous step>
Or, if you like you could make it in one line using
shyaml$ pip install shyaml $ sudo ./bin/linux/x86_64/astra-update -c sl1680 -m 4gb -d lpddr4x -t emmc -i "$(cat astra-usbboot-images/sl1680_suboot/manifest.yaml | shyaml get-value id)"
Important
For Luna SL1680, you'll need to replace the folder astra-usbboot-images with the one provided here.
Just rename the current one something else, for instance astra-usbboot-images-sl1680 and add the provided astra-usbboot-images in usb-tool
And if you'll need to flash Astra SL1680, you'll need to switch back to the original binaries, so keep that in mind!
- Create the directory structure for the Yocto layers e.g.:
$ mkdir common-torizon; cd common-torizon- Clone the necessary layers to build the Common Torizon image for the Synaptics boards:
-
Download Synaptics SDK:
Obs. It is recommended to use the latest version of synaptics-astra sdk. You can get it in their release repository: https://github.com/synaptics-astra/sdk/releases
$ git clone https://github.com/synaptics-astra/sdk.git -b scarthgap_6.12_<last_release_version> layersFor example:
$ git clone https://github.com/synaptics-astra/sdk.git -b scarthgap_6.12_v2.1.0 layers- Download
meta-torizon,meta-torizon-bsp, and their dependencies:
$ cd layers
$ git clone https://github.com/torizon/meta-torizon.git -b master
$ git clone https://github.com/torizon/meta-torizon-bsp.git -b master
$ git clone https://github.com/uptane/meta-updater.git -b master- Go back to our top folder
common-torizon; - Create a symlink to our
setup-environment:
$ ln -s layers/meta-torizon-bsp/scripts/setup-environment setup-environment