Difference between revisions of "RZ-G/Boards/Yocto 2.0"
Renesas-rz (talk | contribs) m (→Preliminary steps) |
Renesas-rz (talk | contribs) |
||
Line 28: | Line 28: | ||
<br/>Download the related kernel drivers as well: | <br/>Download the related kernel drivers as well: | ||
<br/>https://www.renesas.com/en-us/software/D6000544.html | <br/>https://www.renesas.com/en-us/software/D6000544.html | ||
+ | <br/>You should have something like this: | ||
+ | <pre> | ||
+ | $ ls -1 | ||
+ | RZG_Series_Evaluation_Software_Package_for_Linux-yyyymmdd.tar.gz.zip | ||
+ | RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-yyyymmdd.tar.gz.zip | ||
+ | </pre> | ||
</li> | </li> | ||
Line 46: | Line 52: | ||
== Building the BSP for the Renesas RZ/G1 Starter Kit Boards == | == Building the BSP for the Renesas RZ/G1 Starter Kit Boards == | ||
+ | === Setting up a new build directory === | ||
+ | These steps need to be executed only once for a new build directory. For subsequent builds in the same directory skip this section and go straight to [[RZ-G/Boards/Yocto_2.0#Running a build|Running a build.]] | ||
<ol> | <ol> | ||
− | <li>Create a directory and switch to it:<br/> | + | <li>Create a build directory and switch to it:<br/> |
− | |||
<pre> | <pre> | ||
export WORK=<path-to-your-build-directory> | export WORK=<path-to-your-build-directory> | ||
Line 56: | Line 63: | ||
</li> | </li> | ||
− | <li> | + | <li>Copy the downloaded multimedia and graphics zip files and the setup scripts to the build directory. You should have something like this: |
<pre> | <pre> | ||
− | + | $ ls -1 | |
− | + | rzg_bsp_setup_yocto2.0.sh | |
− | + | rzg_demos_setup_yocto2.0.sh | |
− | + | RZG_Series_Evaluation_Software_Package_for_Linux-yyyymmdd.tar.gz.zip | |
+ | RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-yyyymmdd.tar.gz.zip | ||
</pre> | </pre> | ||
</li> | </li> | ||
<li> | <li> | ||
− | + | Execute the script rzg_bsp_setup_yocto2.0.sh: | |
+ | <br/>This will clone all necessary repositories, switch to the proper branches/commits, copy files as necessary, etc. | ||
<pre> | <pre> | ||
− | + | ./rzg_bsp_setup_yocto2.0.sh | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | |||
</li> | </li> | ||
+ | </ol> | ||
− | + | === Running a build === | |
− | + | Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build. | |
− | + | <ol> | |
− | + | <li>Go to your build directory:<br/> | |
− | |||
− | < | ||
− | |||
− | |||
− | <li> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<pre> | <pre> | ||
+ | export WORK=<path-to-your-build-directory> | ||
cd $WORK | cd $WORK | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
</li> | </li> | ||
<li> | <li> | ||
− | + | Initialize the build environment: | |
+ | <br/>Note that this command is executed from the $WORK folder and it changes the current folder to $WORK\build | ||
<pre> | <pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
source poky/oe-init-build-env | source poky/oe-init-build-env | ||
</pre> | </pre> | ||
Line 146: | Line 101: | ||
<li> | <li> | ||
− | + | Copy the proper default configuration files (bblayers.conf and local.conf) depending on the target board: | |
+ | <br/>Note: At this point the current folder should be $WORK/build | ||
<pre> | <pre> | ||
− | |||
cp ../meta-renesas/meta-rzg1/templates/<board>/bblayers.conf ./conf | cp ../meta-renesas/meta-rzg1/templates/<board>/bblayers.conf ./conf | ||
− | |||
− | |||
cp ../meta-renesas/meta-rzg1/templates/<board>/local.conf ./conf/local.conf | cp ../meta-renesas/meta-rzg1/templates/<board>/local.conf ./conf/local.conf | ||
</pre> | </pre> | ||
− | + | You can edit the file local.conf, e.g. to enable/disable graphics and multimedia proprietary drivers support. | |
</li> | </li> | ||
Revision as of 17:17, 28 June 2017
This page contains information on building a Yocto 2.0 based Linux BSP for the Renesas RZ/G1E and Renesas RZ/G1M Starter Kit boards.
Click here for instructions on building a Yocto 1.6.1 BSP.
Supported Linux Host distributions
Yocto 2.0 (Jethro) is compatible with various Linux Host distributions - Ubuntu 14 and 15, Debian 7 and 8, Fedora 21 and 21 and others. For a complete list of the supported distributions see the Supported Linux Distributions section of the Yocto 2.0 Reference Manual. Please use one of the distributions on that list, e.g. Ubuntu 14.04 LTS.
Preliminary steps
- Install the required host packages:
Ubuntu and Debiansudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat
Fedora
sudo dnf 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 \ findutils which
Refer to Yocto Project Quick Start for more information.
- Download the proprietary Multimedia and Graphics evaluation libraries for RZ/G from Renesas:
https://www.renesas.com/en-us/software/D6000548.html
Download the related kernel drivers as well:
https://www.renesas.com/en-us/software/D6000544.html
You should have something like this:$ ls -1 RZG_Series_Evaluation_Software_Package_for_Linux-yyyymmdd.tar.gz.zip RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-yyyymmdd.tar.gz.zip
- Download the helper scripts that will set up the build environment:
File:Rzg scripts yocto2.0.tar.gz -
Unpack the script files:
$ tar -xvf Rzg_scripts_yocto2.0.tar.gz rzg_bsp_setup_yocto2.0.sh rzg_demos_setup_yocto2.0.sh
Building the BSP for the Renesas RZ/G1 Starter Kit Boards
Setting up a new build directory
These steps need to be executed only once for a new build directory. For subsequent builds in the same directory skip this section and go straight to Running a build.
- Create a build directory and switch to it:
export WORK=<path-to-your-build-directory> mkdir $WORK cd $WORK
- Copy the downloaded multimedia and graphics zip files and the setup scripts to the build directory. You should have something like this:
$ ls -1 rzg_bsp_setup_yocto2.0.sh rzg_demos_setup_yocto2.0.sh RZG_Series_Evaluation_Software_Package_for_Linux-yyyymmdd.tar.gz.zip RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-yyyymmdd.tar.gz.zip
-
Execute the script rzg_bsp_setup_yocto2.0.sh:
This will clone all necessary repositories, switch to the proper branches/commits, copy files as necessary, etc../rzg_bsp_setup_yocto2.0.sh
Running a build
Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
- Go to your build directory:
export WORK=<path-to-your-build-directory> cd $WORK
-
Initialize the build environment:
Note that this command is executed from the $WORK folder and it changes the current folder to $WORK\buildsource poky/oe-init-build-env
-
Copy the proper default configuration files (bblayers.conf and local.conf) depending on the target board:
Note: At this point the current folder should be $WORK/buildcp ../meta-renesas/meta-rzg1/templates/<board>/bblayers.conf ./conf cp ../meta-renesas/meta-rzg1/templates/<board>/local.conf ./conf/local.conf
You can edit the file local.conf, e.g. to enable/disable graphics and multimedia proprietary drivers support.
-
Start the build
bitbake core-image-weston
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.
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. You can also boot from microSD but note that the microSD slot is recognized as mmcblk1.