Difference between revisions of "RZ-G/Boards/Yocto"
Renesas-rz (talk | contribs) (Created page with "{{TOC right}} This page contains information on building and running Yocto on the Renesas RZ/G1E and Renesas RZ/G1M Start...") |
m (copy in Quick steps from main page) |
||
(44 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
This page contains information on building and running Yocto on the [[RZ-G/Boards/SK-RZG1E | Renesas RZ/G1E]] and [[RZ-G/Boards/SK-RZG1M | Renesas RZ/G1M]] Starter Kit boards. | This page contains information on building and running Yocto on the [[RZ-G/Boards/SK-RZG1E | Renesas RZ/G1E]] and [[RZ-G/Boards/SK-RZG1M | Renesas RZ/G1M]] Starter Kit boards. | ||
− | == Yocto versions == | + | == Yocto versions and supported Linux distributions == |
− | [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-1.6.1 | + | Two versions of Yocto are supported - 1.6.1 and 2.0. Yocto 1.6.1 builds a BSP based on Linux kernel 3.10 and Yocto 2.0 builds a BSP based on kernel 4.4. This page contains the instructions for building Yocto 1.6.1. <br/> |
+ | <br/>[http://elinux.org/RZ-G/Boards/Yocto_2.0 Click here for instructions on building Yocto 2.0]. | ||
+ | |||
+ | <br/>[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-1.6.1 Yocto-1.6.1 (Daisy)] is compatible with various Linux distributions - Ubuntu 12, 13 and 14, Debian 7, Fedora 19 and 20 and others. For a complete list of the supported distributions see the [http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#detailed-supported-distros Supported Linux Distributions] section of the Yocto 1.6.1 Reference Manual. Please use one of the distributions on that list, e.g. Ubuntu 14.04 LTS. | ||
+ | |||
+ | == Quick steps == | ||
+ | To get started, pull the https://github.com/renesas-rz/meta-renesas tree. | ||
+ | |||
+ | Update bblayers.conf by adding the the meta-renesas and meta-rzg1 layers. e.g.: | ||
+ | |||
+ | BBLAYERS ?= " \ | ||
+ | <path to layer>/poky/meta \ | ||
+ | <path to layer>/poky/meta-yocto \ | ||
+ | <path to layer>/poky/meta-yocto-bsp \ | ||
+ | <path to layer>/meta-renesas \ | ||
+ | <path to layer>/meta-renesas/meta-rzg1 \ | ||
+ | " | ||
+ | |||
+ | Specify the associated machine in local.conf: | ||
+ | |||
+ | MACHINE ?= "<supported board name>" (skrzg1m skrzg1e) | ||
+ | |||
+ | Setup be build environment using the 'oe-init-build-env' script in Poky: | ||
+ | |||
+ | $ source poky/oe-init-build-env | ||
+ | |||
+ | Build the target file system image using bitbake: | ||
+ | |||
+ | $ bitbake core-image-minimal | ||
+ | |||
== Preliminary steps == | == Preliminary steps == | ||
<ol> | <ol> | ||
− | <li>Download proprietary graphics and multimedia drivers from Renesas. Evaluation version is available at <br/> | + | <li>Download proprietary graphics and multimedia libraries and drivers from Renesas. Evaluation version of the libraries is available at <br/>https://www.renesas.com/en-us/software/D3016958.html <br/>and the drivers can be downloaded from <br/>https://www.renesas.com/en-us/software/D3017598.html <br/> |
− | Graphic | + | The Graphic packages are required for X11 and Wayland. Multimedia drivers are optional.<br/> |
<br/> | <br/> | ||
</li> | </li> | ||
Line 54: | Line 83: | ||
cd $WORK/poky | cd $WORK/poky | ||
git checkout -b tmp yocto-1.6.1 | git checkout -b tmp yocto-1.6.1 | ||
+ | |||
cd $WORK/meta-openembedded | cd $WORK/meta-openembedded | ||
git checkout -b tmp dca466c074c9a35bc0133e7e0d65cca0731e2acf | git checkout -b tmp dca466c074c9a35bc0133e7e0d65cca0731e2acf | ||
+ | |||
cd $WORK/meta-linaro | cd $WORK/meta-linaro | ||
git checkout -b tmp 8a0601723c06fdb75e62aa0f0cf15fc9d7d90167 | git checkout -b tmp 8a0601723c06fdb75e62aa0f0cf15fc9d7d90167 | ||
</pre> | </pre> | ||
Other versions are not tested for compatibility. | Other versions are not tested for compatibility. | ||
+ | </li> | ||
+ | |||
+ | <li> | ||
+ | Edit the file '''$WORK/meta-linaro/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc''' to adjust the source URL for the Linaro toolchain (add ''''archive'''' right after the base url): | ||
+ | <pre> | ||
+ | -SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \ | ||
+ | +SRC_URI = "https://releases.linaro.org/archive/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \ | ||
+ | </pre> | ||
</li> | </li> | ||
Line 71: | Line 110: | ||
<li> | <li> | ||
− | Download the proprietary | + | Switch to a known tag: |
+ | <pre> | ||
+ | cd $WORK/meta-renesas | ||
+ | git checkout -b tmp certified-linux-v1.0.0 | ||
+ | </pre> | ||
+ | </li> | ||
+ | |||
+ | <li> | ||
+ | Download the proprietary libraries from <br/>https://www.renesas.com/en-us/software/D3016958.html<br/> and related kernel drivers from https://www.renesas.com/en-us/software/D3017598.html | ||
+ | </li> | ||
+ | |||
+ | <li> | ||
+ | Create an install folder for the proprietary libraries: | ||
+ | <pre> | ||
+ | cd $WORK | ||
+ | mkdir proprietary | ||
+ | </pre> | ||
+ | Copy the downloaded proprietary libraries into this new folder, e.g.: | ||
+ | <pre> | ||
+ | cp ~/Downloads/RZG_Series_Evaluation_Software_Package* $WORK/proprietary | ||
+ | </pre> | ||
+ | </li> | ||
+ | |||
+ | <li> | ||
+ | Unzip the proprietary libraries, e.g.: | ||
+ | <pre> | ||
+ | cd $WORK/proprietary | ||
+ | unzip RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.gz.zip | ||
+ | unzip RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.gz.zip | ||
+ | </pre> | ||
You should see the following files: | You should see the following files: | ||
<pre> | <pre> | ||
− | $ ls - | + | $ ls -l $WORK/proprietary |
− | total | + | total 4.3M |
− | -rw-rw-r-- 1 builduser builduser | + | -rw-rw-r-- 1 builduser builduser 3.1M Dec 06 10:25 RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.gz |
− | -rw-rw-r-- 1 builduser builduser | + | -rw-rw-r-- 1 builduser builduser 1.2M Dec 06 10:25 RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.gz |
</pre> | </pre> | ||
</li> | </li> | ||
Line 112: | Line 180: | ||
cp ../meta-renesas/meta-rzg1/templates/<board>/local-x11.conf ./conf/local.conf | cp ../meta-renesas/meta-rzg1/templates/<board>/local-x11.conf ./conf/local.conf | ||
</pre> | </pre> | ||
− | Edit local.conf to enable/disable graphics and multimedia proprietary drivers support.<br /> | + | Edit local.conf to enable/disable graphics and multimedia proprietary drivers support. The H264 encoder library is not enabled by default, |
+ | in order to enable it uncomment the following line:<br/> | ||
+ | DISTRO_FEATURES_append = " h264avcenc_lib" | ||
</li> | </li> | ||
Line 137: | Line 207: | ||
You can verify its content: | You can verify its content: | ||
<pre class="bash"> | <pre class="bash"> | ||
− | + | $ ls -lh `find ./tmp/deploy/images/skrzg1e/ -maxdepth 1 -type l -print` | |
lrwxrwxrwx 1 builduser builduser 56 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.manifest -> core-image-weston-skrzg1e-20151027185916.rootfs.manifest | lrwxrwxrwx 1 builduser builduser 56 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.manifest -> core-image-weston-skrzg1e-20151027185916.rootfs.manifest | ||
lrwxrwxrwx 1 builduser builduser 55 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.tar.bz2 -> core-image-weston-skrzg1e-20151027185916.rootfs.tar.bz2 | lrwxrwxrwx 1 builduser builduser 55 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.tar.bz2 -> core-image-weston-skrzg1e-20151027185916.rootfs.tar.bz2 | ||
Line 220: | Line 290: | ||
Verify that TFTP server is working. | Verify that TFTP server is working. | ||
<pre> | <pre> | ||
− | tftp localhost | + | $ tftp localhost |
+ | tftp> get uImage | ||
+ | Received 3291623 bytes in 0.3 seconds | ||
+ | </pre> | ||
+ | If you get 'permission denied' errors, modify the file permissions to allow read access to everyone: | ||
+ | <pre> | ||
+ | $ sudo chmod 444 /var/lib/tftpboot/uImage | ||
</pre> | </pre> | ||
</li> | </li> | ||
Line 235: | Line 311: | ||
</li> | </li> | ||
<li> | <li> | ||
− | Start NFS server: | + | Start NFS server. This might fail because of no exports, in that case just run the command again after adding the exports: |
<pre> | <pre> | ||
sudo /etc/init.d/nfs-kernel-server start | sudo /etc/init.d/nfs-kernel-server start | ||
Line 301: | Line 377: | ||
Verify that NFS is working. | Verify that NFS is working. | ||
<pre> | <pre> | ||
− | + | $ showmount -e localhost | |
Export list for localhost: | Export list for localhost: | ||
/nfs/skrzg1e * | /nfs/skrzg1e * | ||
Line 314: | Line 390: | ||
<li> | <li> | ||
Make sure SW9 is on pin 1 side. <br/> | Make sure SW9 is on pin 1 side. <br/> | ||
− | [[File: | + | [[File:G1E_Switch.png|100px|Switch pin layout]] |
</li> | </li> | ||
<li> | <li> | ||
Line 341: | Line 417: | ||
setenv ipaddr <board-ip> | setenv ipaddr <board-ip> | ||
setenv serverip <your-computer-ip> | setenv serverip <your-computer-ip> | ||
− | setenv bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7745- | + | setenv bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7745-skrzg1e.dtb; bootm 0x40007fc0 - 0x40f00000' |
setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:skrzg1e vmalloc=384M' | setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:skrzg1e vmalloc=384M' | ||
saveenv | saveenv | ||
Line 390: | Line 466: | ||
The board should boot the kernel: | The board should boot the kernel: | ||
<pre> | <pre> | ||
− | SKRZG1E SPI_LOADER V0. | + | SKRZG1E SPI_LOADER (DDR1333) V0.12 2015.11.10 |
DEVICE S25FL512 | DEVICE S25FL512 | ||
− | U-Boot 2013.01.01-gcb82c56-dirty ( | + | U-Boot 2013.01.01-gcb82c56-dirty (Dec 14 2015 - 10:45:39) |
CPU: Renesas Electronics R8A7745 rev 2.0 | CPU: Renesas Electronics R8A7745 rev 2.0 | ||
− | Board: | + | Board: SKRZG1E Board |
DRAM: 1 GiB | DRAM: 1 GiB | ||
Line 521: | Line 597: | ||
The board should boot the kernel: | The board should boot the kernel: | ||
<pre> | <pre> | ||
− | SKRZG1E SPI_LOADER V0. | + | SKRZG1E SPI_LOADER (DDR1333) V0.12 2015.11.10 |
DEVICE S25FL512 | DEVICE S25FL512 | ||
− | U-Boot 2013.01.01-gcb82c56-dirty ( | + | U-Boot 2013.01.01-gcb82c56-dirty (Dec 14 2015 - 10:45:39) |
CPU: Renesas Electronics R8A7745 rev 2.0 | CPU: Renesas Electronics R8A7745 rev 2.0 | ||
− | Board: | + | Board: SKRZG1E Board |
DRAM: 1 GiB | DRAM: 1 GiB | ||
Line 559: | Line 635: | ||
Dual source (MMC and NFS) boot configuration for the RZ/G1E Starter Kit board: | Dual source (MMC and NFS) boot configuration for the RZ/G1E Starter Kit board: | ||
<pre> | <pre> | ||
− | setenv mkBootcmdMMC 'setenv bootcmd ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0' | + | setenv mkBootcmdMMC 'setenv bootcmd ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb\; bootm 0x40007fc0' |
setenv mkBootargsMMC 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M' | setenv mkBootargsMMC 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M' | ||
− | setenv mkBootcmdTFTP 'setenv bootcmd tftp 0x40007fc0 uImage+dtb; bootm 0x40007fc0' | + | setenv mkBootcmdTFTP 'setenv bootcmd tftp 0x40007fc0 uImage+dtb\; bootm 0x40007fc0' |
setenv mkBootargsNFS 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.27:/nfs/skrzg1e,nfsvers=3 ip=192.168.1.107:192.168.1.27::255.255.255.0:skrzg1e vmalloc=384M' | setenv mkBootargsNFS 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.27:/nfs/skrzg1e,nfsvers=3 ip=192.168.1.107:192.168.1.27::255.255.255.0:skrzg1e vmalloc=384M' | ||
setenv bootMMC 'run mkBootargsMMC; run mkBootcmdMMC; run bootcmd' | setenv bootMMC 'run mkBootargsMMC; run mkBootcmdMMC; run bootcmd' | ||
Line 570: | Line 646: | ||
== Building QT == | == Building QT == | ||
− | This section describes building Qt 5 for Renesas RZ-G boards. | + | This section describes building Qt 5 for Renesas RZ-G boards. Both Qt 5.5 and 5.6 are supported |
<ol> | <ol> | ||
<li>Clone the meta-qt5 layer: | <li>Clone the meta-qt5 layer: | ||
Line 578: | Line 654: | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
<li> | <li> | ||
− | Switch to the proper branch/commit: | + | Switch to the proper branch/commit. |
+ | <br> | ||
+ | For Qt 5.6: | ||
+ | <pre> | ||
+ | cd $WORK/meta-qt5 | ||
+ | git checkout -b tmp c1b0c9f546289b1592d7a895640de103723a0305 | ||
+ | </pre> | ||
+ | For Qt 5.5: | ||
<pre> | <pre> | ||
cd $WORK/meta-qt5 | cd $WORK/meta-qt5 | ||
Line 585: | Line 669: | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
<li> | <li> | ||
− | + | Cherry-pick a couple of poky patches to add contains_any: | |
<pre> | <pre> | ||
− | - | + | cd $WORK/poky |
− | + | git cherry-pick 17daa2ba6280304771c5fe52b94eb56f0c087490 | |
+ | git cherry-pick 8e0c54cd0e82ffe120f84f495101cd29e6fd06bf | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
+ | <li> | ||
+ | Qt 5.6 only: If building Qt 5.6, cherry pick a couple of additional poky commits: | ||
+ | <pre> | ||
+ | cd $WORK/poky | ||
+ | git cherry-pick 1139cc4eef305fc14bc5db19a5f8729e7b3bf27a | ||
+ | git cherry-pick 111af1d9138e7208200e48861be8f144a280b10e | ||
+ | </pre> | ||
+ | </li> | ||
+ | |||
+ | <li> | ||
+ | Qt 5.5 only: If building Qt 5.5, checkout the matching meta-renesas revision: | ||
+ | <pre> | ||
+ | cd $WORK/meta-renesas | ||
+ | git checkout -b tmp 00649ea7ce956bd05dd3ed55fda8c66187a60236 | ||
+ | </pre> | ||
+ | </li> | ||
+ | |||
<li> | <li> | ||
Add meta-qt5 and meta-rubby to bblayers.conf: | Add meta-qt5 and meta-rubby to bblayers.conf: | ||
Line 600: | Line 704: | ||
</li> | </li> | ||
<li> | <li> | ||
− | Create your own configuration for Qt 5 | + | Create your own configuration for Qt 5 by add the packages that you need to IMAGE_INSTALL: |
− | |||
− | |||
− | |||
<pre> | <pre> | ||
IMAGE_INSTALL_append := qtbase ... | IMAGE_INSTALL_append := qtbase ... | ||
Line 611: | Line 712: | ||
== Building the Renesas demos == | == Building the Renesas demos == | ||
− | This section describes building the demos for Renesas RZ-G boards. | + | This section describes building the demos for Renesas RZ-G boards. |
<ol> | <ol> | ||
<li>Clone the meta-rzg-demos layer: | <li>Clone the meta-rzg-demos layer: | ||
Line 619: | Line 720: | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
<li> | <li> | ||
− | + | Checkout the proper meta-rzg-demos revision. | |
+ | <br> | ||
+ | For Qt 5.6: | ||
<pre> | <pre> | ||
− | + | cd $WORK/meta-rzg-demos | |
+ | git checkout -b tmp certified-linux-v1.0.0 | ||
+ | </pre> | ||
+ | For Qt 5.5: | ||
+ | <pre> | ||
+ | cd $WORK/meta-rzg-demos | ||
+ | git checkout -b tmp 48b87fa9cb31c197e83fc643725402bf67fac8d0 | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
<li> | <li> | ||
− | + | Copy the configuration files for the desired demo image. There are currently three images that can be built - 'hmi-demo', 'qt-hmi-demo' and 'doorphone'. | |
<pre> | <pre> | ||
− | + | cd $WORK/build | |
− | + | cp ../meta-rzg-demos/meta-rzg1/<demo_folder>/template/<board>/bblayers.conf ./conf | |
+ | cp ../meta-rzg-demos/meta-rzg1/<demo_folder>/template/<board>/local.conf ./conf | ||
</pre> | </pre> | ||
</li> | </li> | ||
+ | |||
+ | When building the 'doorphone' demo from the 'certified-linux-v1.0.0' tag, there are a couple of manual steps that need to be done: <br/> | ||
+ | 1. Edit the file '''$WORK/meta-rzg-demos/meta-rzg1/common/recipes-qt/qt/qtbase_git.bbappend''' and uncomment the lines that apply the 'Disable DirectFB' patch: | ||
+ | <pre> | ||
+ | -#SRC_URI_append += " \ | ||
+ | -# file://0001-Disable-DirectFB-automatic-detection-and-mark-it-dep.patch \ | ||
+ | -#" | ||
+ | +SRC_URI_append += " \ | ||
+ | + file://0001-Disable-DirectFB-automatic-detection-and-mark-it-dep.patch \ | ||
+ | +" | ||
+ | </pre> | ||
+ | 2. Edit the file '''$WORK/build/conf/local.conf''' and enable the H264 encoder by uncommenting the following line:<br/> | ||
+ | DISTRO_FEATURES_append = " h264avcenc_lib" | ||
+ | |||
<li> | <li> | ||
Build core-image-weston: | Build core-image-weston: | ||
<pre> | <pre> | ||
bitbake core-image-weston | bitbake core-image-weston | ||
+ | </pre> | ||
+ | </li> | ||
+ | </ol> | ||
+ | |||
+ | == Exporting Toolchains == | ||
+ | Before exporting a toolchain/SDK, the steps in [[#Building the BSP for the Renesas RZ/G1 Starter Kit Boards|Building the BSP for the Renesas RZ/G1 Starter Kit Boards]] must be executed (up to running bitbake) to prepare the proper recipe environment. There is no need to actually build the BSP, but if it is already built the $WORK/build directory can be reused. | ||
+ | <ol> | ||
+ | <li>Configure the target architecture for the SDK. Edit $WORK/build/conf/local.conf and make sure the SDKMACHINE variable is correctly set: | ||
+ | <pre> | ||
+ | SDKMACHINE ?= "i686" (or " x86_64") | ||
+ | </pre> | ||
+ | </li> | ||
+ | <li>Build the SDK using bitbake: | ||
+ | <pre> | ||
+ | cd $WORK/build | ||
+ | bitbake core-image-weston-sdk -c populate_sdk | ||
+ | </pre> | ||
+ | The SDK is distributed as a single script file that is located in $WORK/build/tmp/deploy/sdk/poky-eglibc-x86_64(or i686)-core-image-weston-sdk-cortexa7hf-vfp-neon-toolchain-1.6.1.sh | ||
+ | </li> | ||
+ | <li>Install the toolchain. Copy the toolchain script to the host build machine and run it: | ||
+ | <pre> | ||
+ | sudo ./poky-eglibc-i686-core-image-weston-sdk-cortexa7hf-vfp-neon-toolchain-1.6.1.sh | ||
+ | </pre> | ||
+ | By default the toolchain is installed under /opt/poky/poky1.6.1 | ||
+ | </li> | ||
+ | <li>Prepare the environment by sourcing the proper script. This step needs to be executed in a new terminal window, not the one used to build the SDK: | ||
+ | <pre> | ||
+ | source /opt/poky/1.6.1/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi | ||
+ | </pre> | ||
+ | If building kernel, drivers or u-boot, disable the LDFLAGS variable by running: | ||
+ | <pre> | ||
+ | export LDFLAGS=”” | ||
+ | </pre> | ||
+ | </li> | ||
+ | <li>The SDK is ready to use. E.g. for make-based projects you can run 'make', or you can invoke gcc directly: | ||
+ | <pre> | ||
+ | $CC (Your source code).c | ||
</pre> | </pre> | ||
</li> | </li> |
Latest revision as of 14:36, 18 August 2020
This page contains information on building and running Yocto on the Renesas RZ/G1E and Renesas RZ/G1M Starter Kit boards.
Yocto versions and supported Linux distributions
Two versions of Yocto are supported - 1.6.1 and 2.0. Yocto 1.6.1 builds a BSP based on Linux kernel 3.10 and Yocto 2.0 builds a BSP based on kernel 4.4. This page contains the instructions for building Yocto 1.6.1.
Click here for instructions on building Yocto 2.0.
Yocto-1.6.1 (Daisy) is compatible with various Linux distributions - Ubuntu 12, 13 and 14, Debian 7, Fedora 19 and 20 and others. For a complete list of the supported distributions see the Supported Linux Distributions section of the Yocto 1.6.1 Reference Manual. Please use one of the distributions on that list, e.g. Ubuntu 14.04 LTS.
Quick steps
To get started, pull the https://github.com/renesas-rz/meta-renesas tree.
Update bblayers.conf by adding the the meta-renesas and meta-rzg1 layers. e.g.:
BBLAYERS ?= " \ <path to layer>/poky/meta \ <path to layer>/poky/meta-yocto \ <path to layer>/poky/meta-yocto-bsp \ <path to layer>/meta-renesas \ <path to layer>/meta-renesas/meta-rzg1 \ "
Specify the associated machine in local.conf:
MACHINE ?= "<supported board name>" (skrzg1m skrzg1e)
Setup be build environment using the 'oe-init-build-env' script in Poky:
$ source poky/oe-init-build-env
Build the target file system image using bitbake:
$ bitbake core-image-minimal
Preliminary steps
- Download proprietary graphics and multimedia libraries and drivers from Renesas. Evaluation version of the libraries is available at
https://www.renesas.com/en-us/software/D3016958.html
and the drivers can be downloaded from
https://www.renesas.com/en-us/software/D3017598.html
The Graphic packages are required for X11 and Wayland. Multimedia drivers are optional.
- Install required packages:
Ubuntu and Debiansudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev xterm
Fedora
sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \ diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \ ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \ SDL-devel xterm
Refer to Yocto Project Quick Start for more information.
Building the BSP for the Renesas RZ/G1 Starter Kit Boards
- Create a directory and switch to it
Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.export WORK=<path-to-your-build-directory> mkdir $WORK cd $WORK
- Clone the basic Yocto layers:
cd $WORK git clone git://git.yoctoproject.org/poky git clone git://git.openembedded.org/meta-openembedded git clone git://git.linaro.org/openembedded/meta-linaro.git
-
Switch to proper branches/commits:
cd $WORK/poky git checkout -b tmp yocto-1.6.1 cd $WORK/meta-openembedded git checkout -b tmp dca466c074c9a35bc0133e7e0d65cca0731e2acf cd $WORK/meta-linaro git checkout -b tmp 8a0601723c06fdb75e62aa0f0cf15fc9d7d90167
Other versions are not tested for compatibility.
-
Edit the file $WORK/meta-linaro/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc to adjust the source URL for the Linaro toolchain (add 'archive' right after the base url):
-SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \ +SRC_URI = "https://releases.linaro.org/archive/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \
-
Clone the Renesas BSP layer:
cd $WORK git clone https://github.com/renesas-rz/meta-renesas
-
Switch to a known tag:
cd $WORK/meta-renesas git checkout -b tmp certified-linux-v1.0.0
-
Download the proprietary libraries from
https://www.renesas.com/en-us/software/D3016958.html
and related kernel drivers from https://www.renesas.com/en-us/software/D3017598.html -
Create an install folder for the proprietary libraries:
cd $WORK mkdir proprietary
Copy the downloaded proprietary libraries into this new folder, e.g.:
cp ~/Downloads/RZG_Series_Evaluation_Software_Package* $WORK/proprietary
-
Unzip the proprietary libraries, e.g.:
cd $WORK/proprietary unzip RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.gz.zip unzip RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.gz.zip
You should see the following files:
$ ls -l $WORK/proprietary total 4.3M -rw-rw-r-- 1 builduser builduser 3.1M Dec 06 10:25 RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.gz -rw-rw-r-- 1 builduser builduser 1.2M Dec 06 10:25 RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.gz
-
Populate the meta-renesas layer with graphics and multimedia drivers:
cd $WORK/meta-renesas/meta-rzg1 ./copy_gfx_software_<board>.sh ../../proprietary ./copy_mm_software_lcb.sh ../../proprietary
-
Setup build environment:
cd $WORK source poky/oe-init-build-env
-
Prepare default configuration files:
cd $WORK/build cp ../meta-renesas/meta-rzg1/templates/<board>/bblayers.conf ./conf
For weston/wayland:
cp ../meta-renesas/meta-rzg1/templates/<board>/local-wayland.conf ./conf/local.conf
For X11:
cp ../meta-renesas/meta-rzg1/templates/<board>/local-x11.conf ./conf/local.conf
Edit local.conf to enable/disable graphics and multimedia proprietary drivers support. The H264 encoder library is not enabled by default, in order to enable it uncomment the following line:
DISTRO_FEATURES_append = " h264avcenc_lib" -
Start the build
For weston/wayland:bitbake core-image-weston
For X11:
bitbake core-image-x11
Building the image can take up to a few hours depending on your host system performance.
After the build has been completed successfully, you should see the output similar to:NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
and the command prompt should return.
-
Bitbake has generated all the necessary files in ./tmp/deploy/images directory.
You can verify its content:$ ls -lh `find ./tmp/deploy/images/skrzg1e/ -maxdepth 1 -type l -print` lrwxrwxrwx 1 builduser builduser 56 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.manifest -> core-image-weston-skrzg1e-20151027185916.rootfs.manifest lrwxrwxrwx 1 builduser builduser 55 Oct 27 12:33 ./tmp/deploy/images/skrzg1e/core-image-weston-skrzg1e.tar.bz2 -> core-image-weston-skrzg1e-20151027185916.rootfs.tar.bz2 lrwxrwxrwx 1 builduser builduser 87 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/modules-skrzg1e.tgz -> modules--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916.tgz lrwxrwxrwx 1 builduser builduser 55 Oct 27 12:31 ./tmp/deploy/images/skrzg1e/u-boot.bin -> u-boot-skrzg1e-v2013.01.01+gitAUTOINC+cb82c56b53-r0.bin lrwxrwxrwx 1 builduser builduser 55 Oct 27 12:31 ./tmp/deploy/images/skrzg1e/u-boot-skrzg1e.bin -> u-boot-skrzg1e-v2013.01.01+gitAUTOINC+cb82c56b53-r0.bin lrwxrwxrwx 1 builduser builduser 56 Oct 27 12:31 ./tmp/deploy/images/skrzg1e/u-boot-skrzg1e.srec -> u-boot-skrzg1e-v2013.01.01+gitAUTOINC+cb82c56b53-r0.srec lrwxrwxrwx 1 builduser builduser 56 Oct 27 12:31 ./tmp/deploy/images/skrzg1e/u-boot.srec -> u-boot-skrzg1e-v2013.01.01+gitAUTOINC+cb82c56b53-r0.srec lrwxrwxrwx 1 builduser builduser 86 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/uImage -> uImage--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916.bin lrwxrwxrwx 1 builduser builduser 86 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/uImage+dtb -> uImage+dtb--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916 lrwxrwxrwx 1 builduser builduser 94 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/uImage-r8a7745-skrzg1e.dtb -> uImage--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-r8a7745-skrzg1e-20151027185916.dtb lrwxrwxrwx 1 builduser builduser 86 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/uImage-skrzg1e.bin -> uImage--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916.bin lrwxrwxrwx 1 builduser builduser 82 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/zImage -> zImage--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916 lrwxrwxrwx 1 builduser builduser 86 Oct 27 12:20 ./tmp/deploy/images/skrzg1e/zImage+dtb -> zImage+dtb--3.10+gitef3cb04de0d01178a64fea73ffa4c5e21e79f310-r0-skrzg1e-20151027185916
uImage is the kernel image, uImage-r8a7745-skrzg1e.dtb is the device tree file, uImage+dtb is the combined kernel and device tree image, core-image-weston-skrzg1e.tar.bz2 is the rootfs, modules-skrzg1e.tgz are the kernel modules.
- You can now boot the RZ/G1E or RZ/G1M Starter Kit boards over TFTP and NFS
Running the Yocto image
Linux kernel can be booted from microSD card or from TFTP. Root FS can be mounted from micro SD card or via NFS.
Loading kernel via TFTP and rootfs via NFS
Follow these steps to setup working TFTP and NFS servers:
-
Setup a TFTP server:
Ubuntu and Debian
Install tftpd-hpa package along with tftp tools:sudo apt-get install tftp tftpd-hpa
Fedora
-
Install necessary packages:
sudo yum install tftp-server tftp
tftp-server is a part of xinetd. See Fedora manual for more information.
-
Enable TFTP server:
sudo vi /etc/xinetd.d/tftp
Setdisable = no
Save file and exit. -
Start xinetd:
sudo systemctl start xinetd.service sudo systemctl enable xinetd.service
-
Install necessary packages:
-
Copy uImage and the dtb file from $WORK/build/tmp/deploy/images/<board>/ to the TFTP server root.
Note 1: The instructions here use separate kernel and dtb files. See section Loading kernel and rootfs from microSD card for using the combined kernel+dtb image
Note 2: On Ubuntu/Debian the TFTP server root may be under /srv/tftp instead of /var/lib/tftpboot
RZ/G1E Starter Kit board:cp $WORK/build/tmp/deploy/images/skrzg1e/uImage /var/lib/tftpboot/ cp $WORK/build/tmp/deploy/images/skrzg1e/uImage-r8a7745-skrzg1e.dtb /var/lib/tftpboot/
RZ/G1M Starter Kit board:
cp $WORK/build/tmp/deploy/images/skrzg1m/uImage /var/lib/tftpboot/ cp $WORK/build/tmp/deploy/images/skrzg1m/uImage-r8a7743-skrzg1m.dtb /var/lib/tftpboot/
-
Verify that TFTP server is working.
$ tftp localhost tftp> get uImage Received 3291623 bytes in 0.3 seconds
If you get 'permission denied' errors, modify the file permissions to allow read access to everyone:
$ sudo chmod 444 /var/lib/tftpboot/uImage
-
Setup NFS server
Ubuntu and Debian-
Install necessary packages:
sudo apt-get install nfs-kernel-server nfs-common
-
Start NFS server. This might fail because of no exports, in that case just run the command again after adding the exports:
sudo /etc/init.d/nfs-kernel-server start
Fedora
-
Install necessary packages:
sudo yum install nfs-utils
-
Enable and start nfs server:
sudo systemctl enable rpcbind.service sudo systemctl enable nfs-server.service sudo systemctl enable nfs-lock.service sudo systemctl enable nfs-idmap.service sudo systemctl start rpcbind.service sudo systemctl start nfs-server.service sudo systemctl start nfs-lock.service sudo systemctl start nfs-idmap.service
-
Install necessary packages:
-
Export root FS to NFS. (Change IMAGE and MACHINE to fit your build).
-
Unpack rootfs to a dedicated directory:
IMAGE=weston|x11|sato|directfb MACHINE=skrzg1e|skrzg1m NFS_ROOT=/nfs/${MACHINE} sudo mkdir -p "${NFS_ROOT}" sudo rm -rf "${NFS_ROOT}"/* sudo tar -xjf "${WORK}/build/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}.tar.bz2" -C "${NFS_ROOT}" sync
-
Edit /etc/exports:
sudo vi /etc/exports
add
/nfs/skrzg1e *(rw,no_subtree_check,sync,no_root_squash,no_all_squash) /nfs/skrzg1m *(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
Save the file and exit.
-
Force NFS server to re-read /etc/exports
sudo exportfs -a
-
Unpack rootfs to a dedicated directory:
-
Verify that NFS is working.
$ showmount -e localhost Export list for localhost: /nfs/skrzg1e * /nfs/skrzg1m *
- Boot into U-Boot command prompt
For the RZ/G1E Starter Kit board-
Make sure SW9 is on pin 1 side.
- Connect to serial console over microUSB using minicom or picocom.
- Switch the board on or reset it. Press any key to stop U-Boot automatic countdown and go to U-Boot prompt.
Refer to RZ/G1E Starter Kit board page for more information.
For the RZ/G1M Starter Kit board- TBD
-
Make sure SW9 is on pin 1 side.
-
Configure Ethernet, TFTP, and kernel command line in U-Boot:
setenv ipaddr <board-ip> setenv serverip <your-computer-ip> setenv bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7745-skrzg1e.dtb; bootm 0x40007fc0 - 0x40f00000' setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:skrzg1e vmalloc=384M' saveenv
Replace <board-ip> with the proper IP address for the board. Replace <your-computer-ip> with the IP address of your computer, where tftp and nfs servers are installed. Replace <nfs-path> with the exported path of the root FS.
For example:setenv ipaddr 192.168.1.3 setenv serverip 192.168.1.2 setenv bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7745-skrzg1e.dtb; bootm 0x40007fc0 - 0x40f00000' setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.2:/nfs/skrzg1e,nfsvers=3 ip=192.168.1.3:192.168.1.2::255.255.255.0:skrzg1e vmalloc=384M' saveenv
The last command writes the configuration to SPI flash.
=> saveenv Saving Environment to SPI Flash... SF: Detected S25FL512S with page size 256 KiB, total 64 MiB Erasing SPI flash...Writing to SPI flash...done
You can also use
dhcp
command to obtain information from DHCP server.
Note: You can always see the environment with printenv command. Refer to U-Boot manual for details. -
Verify the connection over Ethernet from U-Boot:
ping <your-computer-ip>
You should see:
=> ping 192.168.1.2 sh_eth Waiting for PHY auto negotiation to complete... done sh_eth: 100Base/Full Using sh_eth device host 192.168.1.2 is alive
- Reset the board by pushing SW5 "Reset".
-
The board should boot the kernel:
SKRZG1E SPI_LOADER (DDR1333) V0.12 2015.11.10 DEVICE S25FL512 U-Boot 2013.01.01-gcb82c56-dirty (Dec 14 2015 - 10:45:39) CPU: Renesas Electronics R8A7745 rev 2.0 Board: SKRZG1E Board DRAM: 1 GiB MMC: sh-sdhi: 0, sh-sdhi: 1 SF: Detected S25FL512S with page size 256 KiB, total 64 MiB In: serial Out: serial Err: serial Net: sh_eth Hit any key to stop autoboot: 0 sh_eth Waiting for PHY auto negotiation to complete... done sh_eth: 100Base/Full Using sh_eth device TFTP from server 192.168.1.2; our IP address is 192.168.1.3 Filename 'uImage'. Load address: 0x40007fc0 Loading: ################################################################# ################################################################# ################################################################# ############################################## 3.5 MiB/s done Bytes transferred = 3525472 (35cb60 hex) sh_eth:1 is connected to sh_eth. Reconnecting to sh_eth sh_eth Waiting for PHY auto negotiation to complete... done sh_eth: 100Base/Full Using sh_eth device TFTP from server 192.168.1.2; our IP address is 192.168.1.3 Filename 'uImage-r8a7745-skrzg1e.dtb'. Load address: 0x40f00000 Loading: ## 3 MiB/s done Bytes transferred = 24859 (611b hex) ## Booting kernel from Legacy Image at 40007fc0 ... Image Name: Linux-3.10.31-ltsi Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3525408 Bytes = 3.4 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 40f00000 Booting using the fdt blob at 0x40f00000 XIP Kernel Image ... OK OK Loading Device Tree to 40ef6000, end 40eff11a ... OK Starting kernel ...
Loading kernel and rootfs from microSD card
Both kernel and root FS can be loaded from a microSD card. The approach requires only a console cable. No Ethernet connection is needed.
- Find a reliable microSD card with an adapter to fit your computer. 4 GB should be enough for the task.
-
Plug the SD card into you computer. Locate the proper device for it, typically /dev/mmcblk0. Use
dmesg | tail
to print latest messages if in doubt.
WARNING! Be very careful. Do not select you root partition or any other device with important information. It may be destroyed!
Double-check that device name is correct by mounting and examining it's content. -
Make sure the SD card doesn't contain any important files.
WARNING! Next step may erase the SD card completely. All files my be lost. -
Format the card with one partition with EXT3 file system.
TBD Update this page with a script which formats the card -
Copy root fs to the sd card:
SD=<path-to-your-device-partition> SD_ROOT=/tmp/sd-tool sudo umount "${SD}" sudo mkdir -p "${SD_ROOT}" sudo mount "${SD}" "${SD_ROOT}" sudo rm -rf "${SD_ROOT}"/* sudo cp "${BUILDDIR}/tmp/deploy/images/${MACHINE}/uImage+dtb" "${SD_ROOT}/boot/" sudo tar -xjf "${BUILDDIR}/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}.tar.bz2" -C "${SD_ROOT}" sudo umount "${SD}"
- Insert the SD card into microSD slot on the board.
- Boot the board into U-Boot command prompt. Refer to section Boot into U-Boot command prompt
-
Configure kernel command line in U-Boot:
setenv bootcmd 'ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0' setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M' saveenv
The last command writes the configuration to SPI flash.
=> saveenv Saving Environment to SPI Flash... SF: Detected S25FL512S with page size 256 KiB, total 64 MiB Erasing SPI flash...Writing to SPI flash...done
- Reset the board by pushing SW5 "Reset" on the RZ/G1E Starter Kit board, SW9 "Reset" on the RZ/G1M Starter Kit board
-
The board should boot the kernel:
SKRZG1E SPI_LOADER (DDR1333) V0.12 2015.11.10 DEVICE S25FL512 U-Boot 2013.01.01-gcb82c56-dirty (Dec 14 2015 - 10:45:39) CPU: Renesas Electronics R8A7745 rev 2.0 Board: SKRZG1E Board DRAM: 1 GiB MMC: sh-sdhi: 0, sh-sdhi: 1 SF: Detected S25FL512S with page size 256 KiB, total 64 MiB In: serial Out: serial Err: serial Net: sh_eth Hit any key to stop autoboot: 0 3534603 bytes read in 498 ms (6.8 MiB/s) ## Booting kernel from Legacy Image at 40007fc0 ... Image Name: 'Linux-3.10.31-ltsi' Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3534539 Bytes = 3.4 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK XIP Kernel Image ... OK OK Starting kernel ...
Multiboot
U-Boot allows multiboot configurations. U-Boot can try different boot commands one by one until it finds the first working command. Use command line interface to configure u-boot. Dual source (MMC and NFS) boot configuration for the RZ/G1E Starter Kit board:
setenv mkBootcmdMMC 'setenv bootcmd ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb\; bootm 0x40007fc0' setenv mkBootargsMMC 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M' setenv mkBootcmdTFTP 'setenv bootcmd tftp 0x40007fc0 uImage+dtb\; bootm 0x40007fc0' setenv mkBootargsNFS 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.27:/nfs/skrzg1e,nfsvers=3 ip=192.168.1.107:192.168.1.27::255.255.255.0:skrzg1e vmalloc=384M' setenv bootMMC 'run mkBootargsMMC; run mkBootcmdMMC; run bootcmd' setenv bootNET 'run mkBootargsNFS; run mkBootcmdTFTP; run bootcmd' setenv bootcmd 'run bootMMC; run bootNET'
For the RZ/G1M Starter kit board mkBootcmdMMC, mkBootargsMMC, mkBootcmdTFTP and mkBootargsNFS should be changed to use the correct names.
Building QT
This section describes building Qt 5 for Renesas RZ-G boards. Both Qt 5.5 and 5.6 are supported
- Clone the meta-qt5 layer:
cd $WORK git clone https://github.com/meta-qt5/meta-qt5.git
-
Switch to the proper branch/commit.
For Qt 5.6:cd $WORK/meta-qt5 git checkout -b tmp c1b0c9f546289b1592d7a895640de103723a0305
For Qt 5.5:
cd $WORK/meta-qt5 git checkout -b tmp 51b4620392aa9041d8512549bfa554bea368c5ea
-
Cherry-pick a couple of poky patches to add contains_any:
cd $WORK/poky git cherry-pick 17daa2ba6280304771c5fe52b94eb56f0c087490 git cherry-pick 8e0c54cd0e82ffe120f84f495101cd29e6fd06bf
-
Qt 5.6 only: If building Qt 5.6, cherry pick a couple of additional poky commits:
cd $WORK/poky git cherry-pick 1139cc4eef305fc14bc5db19a5f8729e7b3bf27a git cherry-pick 111af1d9138e7208200e48861be8f144a280b10e
-
Qt 5.5 only: If building Qt 5.5, checkout the matching meta-renesas revision:
cd $WORK/meta-renesas git checkout -b tmp 00649ea7ce956bd05dd3ed55fda8c66187a60236
-
Add meta-qt5 and meta-rubby to bblayers.conf:
${TOPDIR}/../meta-qt5 \ ${TOPDIR}/../meta-openembedded/meta-ruby \
-
Create your own configuration for Qt 5 by add the packages that you need to IMAGE_INSTALL:
IMAGE_INSTALL_append := qtbase ...
Building the Renesas demos
This section describes building the demos for Renesas RZ-G boards.
- Clone the meta-rzg-demos layer:
cd $WORK git clone https://github.com/renesas-rz/meta-rzg-demos
-
Checkout the proper meta-rzg-demos revision.
For Qt 5.6:cd $WORK/meta-rzg-demos git checkout -b tmp certified-linux-v1.0.0
For Qt 5.5:
cd $WORK/meta-rzg-demos git checkout -b tmp 48b87fa9cb31c197e83fc643725402bf67fac8d0
-
Copy the configuration files for the desired demo image. There are currently three images that can be built - 'hmi-demo', 'qt-hmi-demo' and 'doorphone'.
cd $WORK/build cp ../meta-rzg-demos/meta-rzg1/<demo_folder>/template/<board>/bblayers.conf ./conf cp ../meta-rzg-demos/meta-rzg1/<demo_folder>/template/<board>/local.conf ./conf
-
Build core-image-weston:
bitbake core-image-weston
When building the 'doorphone' demo from the 'certified-linux-v1.0.0' tag, there are a couple of manual steps that need to be done:
1. Edit the file $WORK/meta-rzg-demos/meta-rzg1/common/recipes-qt/qt/qtbase_git.bbappend and uncomment the lines that apply the 'Disable DirectFB' patch:
-#SRC_URI_append += " \ -# file://0001-Disable-DirectFB-automatic-detection-and-mark-it-dep.patch \ -#" +SRC_URI_append += " \ + file://0001-Disable-DirectFB-automatic-detection-and-mark-it-dep.patch \ +"
2. Edit the file $WORK/build/conf/local.conf and enable the H264 encoder by uncommenting the following line:
DISTRO_FEATURES_append = " h264avcenc_lib"
Exporting Toolchains
Before exporting a toolchain/SDK, the steps in Building the BSP for the Renesas RZ/G1 Starter Kit Boards must be executed (up to running bitbake) to prepare the proper recipe environment. There is no need to actually build the BSP, but if it is already built the $WORK/build directory can be reused.
- Configure the target architecture for the SDK. Edit $WORK/build/conf/local.conf and make sure the SDKMACHINE variable is correctly set:
SDKMACHINE ?= "i686" (or " x86_64")
- Build the SDK using bitbake:
cd $WORK/build bitbake core-image-weston-sdk -c populate_sdk
The SDK is distributed as a single script file that is located in $WORK/build/tmp/deploy/sdk/poky-eglibc-x86_64(or i686)-core-image-weston-sdk-cortexa7hf-vfp-neon-toolchain-1.6.1.sh
- Install the toolchain. Copy the toolchain script to the host build machine and run it:
sudo ./poky-eglibc-i686-core-image-weston-sdk-cortexa7hf-vfp-neon-toolchain-1.6.1.sh
By default the toolchain is installed under /opt/poky/poky1.6.1
- Prepare the environment by sourcing the proper script. This step needs to be executed in a new terminal window, not the one used to build the SDK:
source /opt/poky/1.6.1/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi
If building kernel, drivers or u-boot, disable the LDFLAGS variable by running:
export LDFLAGS=””
- The SDK is ready to use. E.g. for make-based projects you can run 'make', or you can invoke gcc directly:
$CC (Your source code).c
Known issues and limitations
TBD