Setup¶
- 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 master -m common-torizon/syn/integration.xml $ repo sync -j 10
[!IMPORTANT] Until an official release of Common Torizon OS, only the
integration.xmlmanifest is suitable for end-users to build. After an official release, users will be able to use thedefault.xmlmanifest.
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 the
masterbranch.
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.
Build Environment¶
You can use Synaptics Crops container to also build Common Torizon
The following command must be run inside the common-torizon directory¶
$ docker run --rm -it --name=syn-crops-common -v $(pwd):/workdir --workdir=/workdir ghcr.io/synaptics-astra/crops:latest
Build¶
| 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.:If a build directory is not given, the script will create one named$ MACHINE=sl1680 . setup-environment <build-directory>build-${DISTRO}, where all build artifacts will be stored. By defaultDISTROis automatically set tocommon-torizonwith the Synaptics boards. -
Inside the build directory, start the build e.g.:
All artifacts should be inside$ bitbake torizon-docker<build-directory>/deploy/images/${MACHINE}, including theSYNAIMGfolder.
Recovery Mode¶
Astra SL1680¶
On the device, press the USB-Boot button, and while holding it down either power on the device or press the RESET button.
Luna SL1680¶
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.
Flashing eMMC¶
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.* Or make a symlink to it$ cd usb-tool $ cp -r <build-directory>/deploy/images/${MACHINE}/SYNAIMG SYNAIMGc. Grab the manifest ID:$ cd usb-tool $ ln -s <build-directory>/deploy/images/${MACHINE}/SYNAIMG SYNAIMGd. Run$ cat astra-usbboot-images/sl1680_suboot/manifest.yaml | grep ^id:astra-updateOr, if you like you could make it in one line using$ sudo ./bin/linux/x86_64/astra-update -c sl1680 -m 4gb -d lpddr4x -t emmc -i <manifest ID from previous step>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 folderastra-usbboot-imageswith the one provided here. Just rename the current one something else, for instanceastra-usbboot-images-sl1680and add the providedastra-usbboot-imagesinusb-toolAnd if you'll need to flash Astra SL1680, you'll need to switch back to the original binaries, so keep that in mind!
Manual Setup¶
- 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
For example:$ git clone https://github.com/synaptics-astra/sdk.git -b scarthgap_6.12_<last_release_version> layers$ git clone https://github.com/synaptics-astra/sdk.git -b scarthgap_6.12_v2.1.0 layers -
Download
meta-torizon,meta-torizon-bspand 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 scarthgap - 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