RZ-G/RZ-G2 BSP Porting kernel: Difference between revisions

From Renesas.info
(Created page with "{{DISPLAYTITLE:RZ/G2 BSP Porting - Linux Kernel}} ← Back to RZ-G/RZ-G2_BSP_Porting = Cloning repository = == SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H == Content: TBD == So...")
Β 
Line 10: Line 10:
Content: TBD
Content: TBD
= Device tree =
= Device tree =
== SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H==
Please refer to the device tree [[RZ-G/RZG DeviceTree|main wiki page]].
Content: TBD
Β 
== SoC: RZ/G2L, RZ/V2L ==
Content: TBD
= Source code modification =
= Source code modification =
== SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H ==
== SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H ==

Revision as of 07:18, 3 August 2022

← Back to RZ-G/RZ-G2_BSP_Porting

Cloning repository

SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H

Content: TBD

SoC: RZ/G2L, RZ/V2L

Content: TBD

Device tree

Please refer to the device tree main wiki page.

Source code modification

SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H

Content: TBD

SoC: RZ/G2L, RZ/V2L

Content: TBD

Multimedia modules

SoC: RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H

During development you do not normally want to use Yocto to build your kernel but instead do it outside of Yocto in a separate repository. Once the kernel has been built you need to make sure that the kernel modules are built against the newly compiled kernel.

A series of scripts have been developed to ease this process. You can refer to this Readme for more information, here below a summary of the operations to build the RZ/G2E-N-M-H multimedia modules.

git clone https://github.com/renesas-rz/rz_linux-cip; cd rz_linux-cip ; git checkout -b rzg2_bsp_v1.0.9 ba8ac89871d7 ; cd ..

The line above is for the kernel version included in BSP v1.0.9. Then board and build options can be chosen by giving the following command:

./build.sh s

You can choose one of the hihope boards or the ek874. Then:

./build.sh k defconfig

The generic script supports different toolchains as per this text document, however the multimedia modules can only be built with the SDK, so option 1 must be selected and the SDK must be installed in the path shown. If the path does not correspond you need to change it manually in the board.ini file. Now we are ready to build the kernel:

./build.sh k _all

Now you have to download the multimedia package from the Renesas website. Then:

mkdir mm_packages

and copy the file downloaded file in the directory just created. We are finally ready to build the multimedia modules:

./build.sh m

The .ko files are copied in the build directory inside the mmp temporary folder. Once done you can safely remove this folder. The modules built have to be copied on the target root file system in the location /lib/modules/KERNEL_VERSION/extra. At the first boot of the target you would need to give the following commands:

depmod
ldcconfig

Alternatively the script can install automatically the files into the target, you have to edit the board.ini and append the following lines:

TARGET_INSTALL=TRUE
TARGET_IP_ADDRESS=IP_ADDRESS

and make sure to configure "IP_ADDRESS" accordingly.

SoC: RZ/G2L, RZ/V2L

Content:TBD

SD Card Speed

SoC: All

When first testing the board and booting off SD Card, it might be helpful to set the clock speed to 50MHz. If you use a SD card that is capable of higher speeds, such as an Ultra SD Card, Linux might try to run at speeds and voltages that might not be supported by your design. So it's better to restrict the speed to the lower class. Add this setting to the device tree for your SD Card.

max-frequency = <50000000>