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 Texas Instruments:
We strongly recommend using the
$ 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 10default.xmlmanifest. Theintegration.xmlandnext.xmlare development manifests used internally and they might be unstable.default.xmlis the manifest used for our releases, so they are reliable.[!IMPORTANT]
Common Torizon OS is only available on themasterbranch.
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¶
-
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=am62xx-evm . setup-environment <build-directory>build-ti-${DISTRO}, where all build artifacts will be stored. By defaultDISTROis automatically set tocommon-torizonwith the TI boards. -
Inside the build directory, start the build e.g.:
All artifacts should be inside$ bitbake torizon-docker<build-directory>/deploy/images/${MACHINE}, including the.wicfile.
Boot the Image from an SD Card¶
- Flash the generated .wic artifact file to a micro SD card and insert it into the board. For example, if using
ddto flash the image, double-check the device name of the SD card withlsblk, 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 - 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.
- 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
/dev/sdx with the SD Card you want to flash.
Manual Setup¶
- Create the directory structure for the Yocto layers e.g.:
$ mkdir common-torizon; cd common-torizon $ mkdir sources; cd sources - Clone the necessary layers to build the Common Torizon image for the TI boards:
- Download Bitbake:
$ git clone https://git.openembedded.org/bitbake -b 2.8 $ cd bitbake && git checkout 6c2641f7a9 && cd .. - Download
meta-yocto:$ git clone https://git.yoctoproject.org/meta-yocto -b scarthgap - Download
meta-tiand 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 - Download
meta-torizon,meta-torizon-bspand 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 - And finally, download the dependency for
meta-updaterandmeta-virtualization:$ git clone https://github.com/openembedded/meta-openembedded -b scarthgap - Go back to our top folder
common-torizon; - Create a symlink to our
setup-environment:$ ln -s sources/meta-torizon-bsp/scripts/setup-environment setup-environment