Embedded module TQMaRZG2x - YOCTO Linux BSP documentation
Preface
The meta-tq layer extends the Yocto Project's reference system Poky to provide support for a selection of TQ Embedded CPU Modules, including the TQMaRZG2x.
It uses the same codebase as the PTXdist based TQ Linux BSPs and therefore provides the same versions of U-Boot and Linux kernel, but doesn't define a specific root filesystem configuration.
The instructions on this page refer to the BSP and ancillary tools listed in the following table:
BSP Revision | 0020 |
---|---|
ci-meta-tq release | dunfell.TQMaRZG2x.BSP.SW.0020 |
Yocto Project / Poky Release | 3.1.17 |
Target machine1) | tqmarzg2m-mbarzg2x tqmarzg2n_mbarzg2x tqmarzg2h_mbarzg2x |
U-Boot | v2021.10/rz |
Linux Kernel | rz-5.10-cip17 |
For further details regarding Yocto Project 3.1.17 - Dunfell please refer to its official documentation.
Prerequisites
Build Host
Yocto Project / Poky requires a Linux build host, so first of all you need a development workstation (or a virtual machine2)) with a Linux distribution installed.
Please refer to section Compatible Linux Distribution of the Yocto Project Quick Start for supported linux distributions and section Build Host Packages for required build host packages for those distributions.
Although not required by Yocto Project / Poky, we also recommend to configure and run a tftp server (for image download / update) and an nfs server (for network mounted root filesystem) on your development host.
Yocto Build instructions
BSP build instructions
1. Open a new terminal and create a directory for the BSP build e.g. in the home directory afterwards enter the new directory.
$ mkdir -p ~/workspace/dunfell.TQMaRZG2x.BSP.SW.0020 $ cd ~/workspace/dunfell.TQMaRZG2x.BSP.SW.0020
2. Create a local copy of meta-tq
$ git clone --recurse-submodules https://github.com/tq-systems/ci-meta-tq.git
3. Checkout BSP release on new local branch.
$ cd ci-meta-tq $ git checkout dunfell.TQMaRZG2x.BSP.SW.0020 -b dunfell-tqmarzg2x
4. Update git submodules:
$ git submodule update --init $ git submodule sync
5. Download RZ/G Multimedia Package and extract it into the sources folder in the BSP directroy.
e.g.
$ tar -C ~/workspace/rocko.TQMaRZG2x.BSP.SW.0010/ci-meta-tq/sources -zxvf ~/Downloads/RZG2_Group_Evaluation_Software_Package_for_Linux_20200619.tar.gz
6. The meta-rzg2 layer provides a script to deploy the RZ/G Multimedia Package into the right place. Navigate to the meta-rzg2 Yocto layer and execute the copy_proprietary_softwares script:
$ cd ~/workspace/rocko.TQMaRZG2x.BSP.SW.0010/ci-meta-tq/sources/meta-rzg2 $ sh docs/sample/copyscript/copy_proprietary_softwares.sh -f ~/workspace/rocko.TQMaRZG2x.BSP.SW.0010/ci-meta-tq/sources/proprietary $ cd ../../
7. Export the environment DISTRO and MACHINE3) environment variable:
$ export DISTRO=dumpling-wayland-rzg2 $ export MACHINE=tqmarzg2m_mbarzg2x
8. Setup local branch to track the remote branch.
$ git branch -u origin/dunfell
9. Configure the Build:
$ source setup-environment tqmarzg2x_build rzg2
10.Build an Image for STKaRZG2x:
Image with debug features/root login
bitbake rzg2-image-weston-debug-debug
Image without debug features/root login
bitbake rzg2-image-weston-debug
The resulting image is tmp/deploy/images/tqmarzg2m_mbarzg2x4)/rzg2-image-weston-debug-tqmarzg2m_mbarzg2x5).wic
11. Write the Image6)7)
$ sudo dd if=tmp/deploy/images/tqmarzg2m_mbarzg2x/rzg2-image-weston-debug-tqmarzg2m_mbarzg2x.wic of=TARGET_DEVICE
12. Boot the STKaRZG2x from SD card (cf. MBaRZG2x DIP switch settings) |