This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
civilinfrastructureplatform:cipreferencehardware:iwg20m:iwg20mbuildinstructions [2018/10/03 12:48] patersonc Added info on how to build Renesas RZ/G BSP |
civilinfrastructureplatform:cipreferencehardware:iwg20m:iwg20mbuildinstructions [2018/10/21 13:45] patersonc Corrected MMP/GFX package links to evaluation version. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Renesas RZ/G1M iwg20m build instructions (WIP) ====== | + | ====== Renesas RZ/G1M iwg20m build instructions ====== |
- | ===== How to build the Kernel only ===== | + | ===== How to build the latest CIP Kernel for iwg20m ===== |
- | TODO | + | |
- | ===== How to build the full iwg20m BSP from Renesas ===== | + | The Renesas RZ/G1M iWave Qseven development kit (iwg20m) is supported in the [[https://gitlab.com/cip-project/cip-kernel/linux-cip|CIP SLTS Kernel]]. The instructions below describe how to build the CIP SLTS Kernel for the iwg20m platform using the Renesas RZ/G toolchain. |
+ | ==== Build Steps ==== | ||
+ | 1. Checkout CIP Kernel | ||
+ | <code> | ||
+ | $ cd [your working directory] | ||
+ | $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-cip.git | ||
+ | $ cd linux-cip | ||
+ | $ git fetch origin # Not needed if a fresh clone | ||
+ | $ git checkout origin/linux-4.4.y-cip | ||
+ | </code> | ||
+ | 2. Configure compiler environment | ||
+ | |||
+ | If using the [[civilinfrastructureplatform:cipreferencehardware:iwg20m:iwg20mbuildinstructions#how-to-builduse-the-sdk|Renesas SDK]]: | ||
+ | <code> | ||
+ | $ source /opt/poky/2.0.1/environment-setup-cortexa15hf-vfp-neon-poky-linux-gnueabi | ||
+ | $ unset LDFLAGS | ||
+ | </code> | ||
+ | |||
+ | 3. Configure uImage load address | ||
+ | <code> | ||
+ | $ export LOADADDR="0x40008000" | ||
+ | </code> | ||
+ | |||
+ | 4. Configure Linux config for iwg20m platform | ||
+ | <code> | ||
+ | $ make shmobile_defconfig | ||
+ | </code> | ||
+ | |||
+ | 5. Build the Kernel and device tree | ||
+ | <code> | ||
+ | $ make uImage | ||
+ | $ make dtbs | ||
+ | </code> | ||
+ | |||
+ | ==== Build Output ==== | ||
+ | Output file locations:\\ | ||
+ | - Kernel: arch/arm/boot/uImage\\ | ||
+ | - Device tree: arch/arm/boot/dts/r8a7743-iwg20d-q7.dtb\\ | ||
+ | - Device tree: arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dtb (when using camera/HDMI add-on board) | ||
+ | |||
+ | ===== How to build the full iwg20m BSP from Renesas ===== | ||
This section contains information on how to build a CIP based Yocto BSP for the Renesas RZ/G1M iWave Qseven development kit (iwg20m). | This section contains information on how to build a CIP based Yocto BSP for the Renesas RZ/G1M iWave Qseven development kit (iwg20m). | ||
Line 43: | Line 82: | ||
</code> | </code> | ||
- | 4. Install proprietary software packages (graphics, multi-media) | + | 4. Install proprietary software packages (graphics, multimedia) |
Download packages (Kernel version CIP3) from the RZ/G Marketplace:\\ | Download packages (Kernel version CIP3) from the RZ/G Marketplace:\\ | ||
- | America: https://mp.renesas.com/en-us/rzg/marketplace/linux_package/rzg-mlp-pro.html\\ | + | America: https://mp.renesas.com/en-us/rzg/marketplace/linux_package/rzg-vlp-eva.html\\ |
- | Europe: https://mp.renesas.com/en-eu/rzg/marketplace/linux_package/rzg-mlp-pro.html\\ | + | Europe: https://mp.renesas.com/en-eu/rzg/marketplace/linux_package/rzg-vlp-eva.html\\ |
- | Asia: https://mp.renesas.com/en-sg/rzg/marketplace/linux_package/rzg-mlp-pro.html\\ | + | Asia: https://mp.renesas.com/en-sg/rzg/marketplace/linux_package/rzg-vlp-eva.html\\ |
- | Japan: https://mp.renesas.com/ja-jp/rzg/marketplace/linux_package/rzg-mlp-pro.html | + | Japan: https://mp.renesas.com/ja-jp/rzg/marketplace/linux_package/rzg-vlp-eva.html |
<code> | <code> | ||
$ mkdir $WORK/proprietary | $ mkdir $WORK/proprietary | ||
$ cp RZG_Series_Evaluation_Software_Package* $WORK/proprietary | $ cp RZG_Series_Evaluation_Software_Package* $WORK/proprietary | ||
- | $ cd $WORK/proprietary | ||
$ cd $WORK/meta-renesas/meta-rzg1 | $ cd $WORK/meta-renesas/meta-rzg1 | ||
$ sh copy_mm_software_lcb.sh $WORK/proprietary | $ sh copy_mm_software_lcb.sh $WORK/proprietary | ||
Line 68: | Line 106: | ||
6. Copy build configuration files | 6. Copy build configuration files | ||
<code> | <code> | ||
- | $ cp $WORK/meta-renesas-ai-demos/meta-qt5-object-recognition-demo/templates/iwg20m/* $WORK/build/conf/ | + | $ cp $WORK/meta-renesas/meta-rzg1/templates/iwg20m/* $WORK/build/conf/ |
</code> | </code> | ||
Line 77: | Line 115: | ||
</code> | </code> | ||
- | NOTE: The build may TAKE several hours to complete depending on the Linux Host PC performance and the network environment. | + | NOTE: The build may take several hours to complete depending on the Linux Host PC performance and the network environment. |
Line 85: | Line 123: | ||
===== How to build/use the SDK ===== | ===== How to build/use the SDK ===== | ||
- | TODO | + | This section contains information on how to build and use the Renesas RZ/G SDK. |
+ | |||
+ | Full instructions can be found in section 5 of the "Yocto Start-Up Guide" that can be downloaded from the Renesas RZ/G Marketplace:\\ | ||
+ | https://mp.renesas.com/en-eu/rzg/marketplace/document/R01US0227EJ.html | ||
+ | |||
+ | ==== Build Steps ==== | ||
+ | 1. Follow the BSP build instructions above, steps 1-6 | ||
+ | |||
+ | It doesn't matter if step 7 has already been run or not. | ||
+ | |||
+ | 2. Configure host PC architecture | ||
+ | |||
+ | It is possible to build the SDK to run on a host PC using a different environment to the PC building the SDK. | ||
+ | |||
+ | In $WORK/build/conf/local.conf: | ||
+ | <code> | ||
+ | # This variable specified the architecture to build SDK/ADT items for and means | ||
+ | # you can build the SDK packages for architectures other than the machine you are | ||
+ | # running the build on (i.e. building i686 packages on an x86_64 host.) | ||
+ | # Supported values are i686 and x86_64 | ||
+ | #SDKMACHINE ?= "x86_64" | ||
+ | SDKMACHINE ?= "i686" | ||
+ | </code> | ||
+ | |||
+ | 3. Build SDK with bitbake | ||
+ | <code> | ||
+ | $ cd $WORK/build | ||
+ | $ bitbake core-image-weston-sdk -c populate_sdk | ||
+ | </code> | ||
+ | |||
+ | ==== Build Output ==== | ||
+ | Once the build is completed, the toolchain will be located in the $WORK/build/tmp/deploy/sdk/ directory (poky-glibc-[x86_64|i686]-core-image-weston-sdkcortexa15hf-vfp-neon-toolchain-2.0.1.sh). | ||
+ | |||
+ | ==== Using the SDK ==== | ||
+ | 1. Install the toolchain on host PC | ||
+ | <code> | ||
+ | $ sudo poky-glibc-[x86_64|i686]-core-image-weston-sdk-cortexa15hf-vfp-neon-toolchain-2.0.1.sh | ||
+ | [sudo] password for (INSTALL person): [enter password of your account] | ||
+ | Enter target directory for SDK (default: /opt/poky/2.0.1): [enter new location or just key enter] | ||
+ | Extracting SDK...done | ||
+ | Setting it up...done | ||
+ | SDK has been successfully set up and is ready to be used. | ||
+ | </code> | ||
+ | |||
+ | 2. Set up environment variables for build | ||
+ | <code> | ||
+ | $ cd [your working directory] | ||
+ | $ source /opt/poky/2.0.1/environment-setup-cortexa15hf-vfp-neon-poky-linux-gnueabi | ||
+ | |||
+ | # When you use “ld” directly but not via gcc (in case of building Kernel, Driver or u-boot), disable LDFLAGS: | ||
+ | $ unset LDFLAGS | ||
+ | </code> | ||
+ | |||
+ | 3. Build application | ||
+ | <code> | ||
+ | $ $CC [your source code].c [optional FLAGs etc.] | ||
+ | </code> |