Skip to content

Setup

  1. If you don't have the repo tool installed, please refer to Build Torizon OS From Source with Yocto Project.
  2. Initialize and sync the repo manifest for Texas Instruments:
    $ mkdir common-torizon; cd common-torizon
    $ repo init -u https://git.toradex.com/toradex-manifest.git -b master -m common-torizon/ti/default.xml
    $ repo sync -j 10
    
    We strongly recommend using the default.xml manifest. The integration.xml and next.xml are development manifests used internally and they might be unstable. default.xml is the manifest used for our releases, so they are reliable.

    [!IMPORTANT]
    Common Torizon OS is only available on the master branch.

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

  1. Source setup-environment, specifying the machine to build with the MACHINE variable e.g.:

    $ MACHINE=am62xx-evm . setup-environment <build-directory>
    
    If a build directory is not given, the script will create one named build-ti-${DISTRO}, where all build artifacts will be stored. By default DISTRO is automatically set to common-torizon with the TI boards.

  2. Inside the build directory, start the build e.g.:

    $ bitbake torizon-docker
    
    All artifacts should be inside <build-directory>/deploy/images/${MACHINE}, including the .wic file.

Boot the Image from an SD Card

  1. Flash the generated .wic artifact file to a micro SD card and insert it into the board. For example, if using dd to flash the image, double-check the device name of the SD card with lsblk, make sure it's unmounted, then run the command below:
    $ sudo dd if=<image-name>.wic of=/dev/<sdcard-device-name> bs=4M status=progress
    
  2. Configure the board for SD card boot and connect the UART interface to the host PC. For example, for the AM62x SK EVM you can follow the instructions on the TI Resource Explorer website.
  3. Establish a serial connection with the board e.g. using picocom:
    $ picocom -b 115200 /dev/ttyUSB0
    

Alternate way to flash the SD Card

With the generated .wic file, you could use bmaptool. If you don't have it installed, you could get it by running sudo apt install bmap-tools. But first, run lsblk and make sure that you SD Card is not mounted. If so, please unmount all partitions beforehand.

$ bmaptool create -o torizon.bmap torizon.wic
$ sudo bmaptool copy --bmap torizon.bmap torizon.wic /dev/sdx
Where you should replace /dev/sdx with the SD Card you want to flash.


Manual Setup

  1. Create the directory structure for the Yocto layers e.g.:
    $ mkdir common-torizon; cd common-torizon
    $ mkdir sources; cd sources
    
  2. Clone the necessary layers to build the Common Torizon image for the TI boards:
  3. Download Bitbake:
    $ git clone https://git.openembedded.org/bitbake -b 2.8
    $ cd bitbake && git checkout 6c2641f7a9 && cd ..
    
  4. Download meta-yocto:
    $ git clone https://git.yoctoproject.org/meta-yocto -b scarthgap
    
  5. Download meta-ti and its dependencies:
    $ git clone https://git.yoctoproject.org/meta-ti -b scarthgap
    $ git clone https://git.yoctoproject.org/meta-arm -b scarthgap
    $ git clone https://git.yoctoproject.org/openembedded-core -b scarthgap oe-core
    
  6. Download meta-torizon, meta-torizon-bsp and their dependencies:
    $ 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
    $ git clone https://git.yoctoproject.org/meta-virtualization -b scarthgap
    
  7. And finally, download the dependency for meta-updater and meta-virtualization:
    $ git clone https://github.com/openembedded/meta-openembedded -b scarthgap
    
  8. Go back to our top folder common-torizon;
  9. Create a symlink to our setup-environment:
    $ ln -s sources/meta-torizon-bsp/scripts/setup-environment setup-environment