Skip to content

Application Notes

Configure IP address for Ethernet

If you want to use the Ethernet for networking, please assign IP address by DHCP protocol. Static IP assignment mechanism is not supported. Since it is necessary to change the framework part to support Static IP assignment, we don't have plans to support static IP mechanism.

Configure display resolution

Booting without video parameter set

By default, HWComposer selects highest resolution (up to HD 1280x720 60fps).

Booting with video parameter set

1) Power on the device and interrupt autoboot.

2) Execute: editenv bootargs

3) Append to bootargs:

androidboot.display.res.HDMI=<width>x<height>@<refresh-rate>
Example:

bootargs: androidboot.display.res.HDMI=720x480@60

4) Execute: saveenv

Remount filesystem

By default, “/system” partition and “/vendor” partition are read-only even if you run “adb remount” command. If you want to access/modify these partitions, please operate as below.

  • On Ubuntu Host PC, execute command:

adb root              # Access with root
adb disable-verity    # Disable verity
adb shell reboot      # Reboot your devices
adb root              # Access with root
adb remount           # Remount filesystem

After remounting, you can access and modify files under “/vendor”, “/system” partition. This step is useful for debugging purpose.

USB Storage / micro SD-Card Usage

To use USB Storage / micro SD-Card on Android GUI, user should format and create partition for USB Storage / micro SD-Card on Ubuntu Host PC beforehand:

Note

before formatting, please confirm carefully /dev/sdX of your Storage devices (by 'lsblk' command)

  • Format USB Storage / micro SD-Card

  • Plug in USB Storage / micro SD-Card on Ubuntu Host PC, and delete all existed partitions:

sudo fdisk /dev/sdX (X = storage devices)

type ‘d’ and type ‘Enter’                            # Loop until there is no existed partition)
type ‘w'                                             # Alter changing

  • Create new partition (1 partition is OK)

sudo fdisk /dev/sdX (X = storage devices)

type ‘n’ and type ‘Enter’ (4 times)                  # Create new partition
type ‘w’                                             # Alter changing

  • Change partition type

sudo fdisk /dev/sdX (X = storage devices)

type ‘t’ and type ‘c’                                # Format as W95 FAT32 (LBA)
type ‘w'                                             # Alter changing

  • Format partition as FAT32

sudo mkfs.vfat /dev/sdX1                             # (X = storage devices; 1 = partition number)

  • Plug USB Storage/micro SD-Card on board and use it!

Change SELinux mode

SELinux mode is set "enforcing" mode as default. If you face any failure related to SELinux, try with "permissive" mode permanent by the following procedure.

1) Turn on device and interrupt autoboot.

2) Edit bootargs.

=> editenv bootargs

# Add "androidboot.selinux=permissive" to bootargs as below example.

Example:

bootargs: init_time=xxxxxxxxxx androidboot.selinux=permissive

=> saveenv

If you only want to set SELinux mode temporary to "permissive" mode to run your application, we recommend using below commands:

  • On Ubuntu host PC, execute command:

adb root
adb shell setenforce 0	#Disable SELinux
adb shell setenforce 1	#Enable SELinux

Density setting

With different display resolutions, the suitable density value will be set to make display shows properly. Now density is set based on display resolution automatically. But if your display is still not correct (navigation bar may be displayed wrongly). Please adjust “Density value” by executing below commands:

  • On Board's console, execute command:

su
wm density reset
wm density <Density value>

Display ResolutionDensity value (*)Note
640 x 480 (VGA)90
800 x 600 (SVGA)110
1024 x 600120
1024 x 768 (XGA)145
1280 x 720 (HD)150Max display resolution of RZ/G3L

(*) These density values are based on user experiment.

Video format

Only limited range YUV video format is supported.

Optimize boot time

Note

The command in the box above will be executed on the Board u-boot's console.

In this release, we provide some tips that help you to reduce the boot time. Please follow the steps below to reduce boot time:

  • Disable console log (user won’t see console log when booting):

    editenv bootargs
    edit: loglevel=0
    

  • Disable boot animation

    editenv bootargs
    edit: loglevel=0 androidboot.nobootanimation=1
    

  • Reduce boot delay

    setenv bootdelay 1
    

  • Save changes

    saveenv
    

With the above changes, boot time will be reduced by around 10 seconds.

Audio sampling rate support

Currently, SMARC RZ/G3L could support both audio sampling rate 48 kHz or 44.1 kHz . If user wants to use sampling rate 44.1 kHz, please set use_sample_rate_441k=1 at u-boot. By default, sampling rate 48kHz is used.

Support eSD boot

This feature supported fully boot SMARC RZ/G3L bootloader and Android userland from eSD (uSD0). Users could freely bring SDCard to another board to boot Android. If user wants to use eSD boot, please follow (See Flashing bootloader, Method 2: Flash bootloaders to eSD) and update eSD bootloader by fastboot (See Flashing images using fastboot, Method: Fastboot USB).

Android build options

AOSP 17 supports many lunch combos. Users can freely choose them based on their target. Please refer to below build options:

Build optionLunch commandboard_nameNote
Baselunch smarc_rzg3l-cp2a-userdebugsmarc_rzg3lBase environment based on pure AOSP. No demo applications.
Demolunch smarc_rzg3l_demo-cp2a-userdebugsmarc_rzg3lInherit base build option. But it has some demo applications.

Note

Disabling non-blocking feature in drm_hwcomposer

Open Camera, MX Player, Antutu and other application does not work properly on SMARC RZ/G3L due to timing issue between GPU rendering thread and drm hwcomposer.

By default, disabling non-blocking feature is a workaround to resolve above problems.

User can re-enable it by executing below command:

  • On host PC, execute command:

adb root
adb shell setprop vendor.hwc.drm.disable_non_block 0

Codecs low performance

By default, when playing a video whose resolution is different from the display resolution (For example: Playback 800x600 video on display resolution 1280x720), the GPU must be used for handling both:

  • video scaling
  • layer composition

This additional workload causes high GPU usage and leads to low video playback performance.

To improve video playback performance on RZ/G3L, Image Scaling Unit (ISU) scaling and GPU scaling have been integrated into the Codec 2.0 HAL (C2 HAL). The C2 HAL pre-scales the video layer so that it matches with the display resolution prior to composition.

The ISU scaling and GPU scaling are used by default to scale the video buffer, and the scaled video layer is then handled directly by the display driver through the overlay plane. This reduces the GPU workload by avoiding unnecessary GPU scaling and composition.

The ISU scaling supports video resolutions from 640 × 360 to 1280 × 720. GPU scaling is used for video resolutions lower than 640 × 360.

Current limitations of current GPU Scaling implementation

  • Low performance may still occur when playing 60 FPS videos.
  • Video playback may be frozen when the mouse is moved during playback.

How to disable C2 HAL Pre-scaling:

If it’s required to disable the default Pre-scaling feature, please execute the command below via adb shell:

  • On host PC, execute command:

adb root # userdebug or eng build only
adb shell setprop persist.vendor.c2.prescale.enable 0
adb shell setprop persist.sys.media.prescale.enable 0
adb shell stop media && sleep 1 && adb shell start media
adb shell stop vendor-c2-hal-1-0 && sleep 1 && adb shell start vendor-c2-hal-1-0

CAUTION

It’s permanent change even users reboot the device

How to sign release keys for Android images

When user wants to perform CTS/VTS testing or sign keys for final product, please refer this part to sign keys for Android images.

Note

generate-signed-img.sh script contains some specific information that is related to Renesas. Please update if needed.

Go to your mydroid directory

cd ${workspace}/mydroid

Copy signed keys script to your mydroid

cp ${workspace}/RELFILES/tools/generate-signed-img.sh .

Export all necessary build variables

export TARGET_BOARD_PLATFORM=r9a08g046
source build/envsetup.sh

Please see more lunch build options at Android build options. Assume that you are signing key for Android “user” build images (build option is “base”), run below commands:

lunch smarc_rzg3l-cp2a-user

Run below command to sign keys. Input your password or blank for non-password. Press "Enter" to continue.

chmod 777 generate-signed-img.sh
./generate-signed-img.sh

Confirm any missing APKs or APEXs not signed with new own release keys:

check_target_files_signatures -l .android-certs signed-target_files_smarc_rzg3l.zip

Copy output into images_dir (Building Android, IPL, U-Boot, and Kernel sources). Please export images_dir before copying images

export images_dir=<your_images_dir>

Overwrite with the signed images

unzip signed-img_smarc_rzg3l.zip -d ${image_dir}

Re-flash Android images (Flashing images using fastboot)

Note

Enable USB Debugging in Developer options to use adb

To confirm whether new images are signed keys:

On host PC, below command should show release-keys (example: SMARC RZ/G3L):

adb shell getprop | grep 'ro.build.fingerprint'
[ro.build.fingerprint]: [Renesas/smarc_rzg3l/smarc_rzg3l:17/CP2A.260605.016/eng.huanho:user/release-keys]

On host PC, below command should show no result

adb shell getprop | grep 'test-keys'

Sample Applications for RZ AOSP BSP

Use these three sample applications to verify and test the functionalities of the RZ AOSP BSP. You can find the source code as Git bundles in our aosp_local_package repository.

Prerequisites: Clone the Repository

To access the bundle files, first clone the aosp_local_package repository:

export workdir=`pwd`
git clone https://github.com/renesas-rz/aosp_local_package.git -b android17-26q3
cd aosp_local_package/RELFILES/sample_apps/

Summary Table

ApplicationSourceBuild MethodPurpose
ApiDemosAOSP (with Renesas RZ bug-fixes)AOSP Build SystemAndroid APIs tests: Graphics/Camera/General Android APIs
GrafikaGrafika (Google)Android StudioCodecs/Graphics samples
Video Playback sampleRenesas RZAndroid StudioVideo playback sample application with Renesas H264 Hardware Decoder (using Media3 APIs)

How to Use

To use these applications, you need to unbundle the provided files into a local Git repository. Please follow the specific commands for each application below.

1. ApiDemos

  • Commands:

cd $workdir/aosp_local_package/RELFILES/sample_apps/
mkdir ApiDemos
cd ApiDemos/
git init
git fetch $workdir/aosp_local_package/RELFILES/sample_apps/apidemos.bundle origin/android-17.0.0_r1:origin/android-17.0.0_r1
git checkout origin/android-17.0.0_r1

2. Grafika

  • Commands:

cd $workdir/aosp_local_package/RELFILES/sample_apps/
mkdir Grafika
cd Grafika/
git init
git fetch $workdir/aosp_local_package/RELFILES/sample_apps/grafika.bundle origin/android14-dev:origin/android14-dev
git checkout origin/android14-dev

3. Video Playback Sample

  • Commands:

cd $workdir/aosp_local_package/RELFILES/sample_apps/
mkdir video_playback_sample
cd video_playback_sample/
git init
git fetch $workdir/aosp_local_package/RELFILES/sample_apps/video_playback_sample.bundle origin/main:origin/main
git checkout origin/main

GPIO Keys (Power, Volume up/down)

AOSP now supports GPIO key events for USER_SW1 (Power button), USER_SW2 (Volume down button), and USER_SW3 (Volume up button). These buttons are integrated with the standard Android input framework and can generate key events for application and system-level handling.

Supported Features

  • Single press detection for Power and Volume up/down buttons.

  • Double press detection for Power.

  • Long press detection for Power.

  • Combined key detection for two-button presses (Power + Volume up, Power + Volume down).

Suspend-to-RAM

Suspend-to-RAM (S2R) mode helps achieve low power consumption, enables faster system startup than a cold boot, and preserves the system state during suspension.

FeatureStatus
GraphicsPartially Supported. May fail to suspend at some cases
CodecsSupported

Note

"Supported" status means the feature has passed sanity checks only and does not guarantee the operation of full functionality. Others are not tested and may not work.

Use the following commands on the Android console to enter Suspend-to-RAM mode.

su
echo 0 > /sys/module/printk/parameters/console_suspend
echo deep > /sys/power/mem_sleep
echo enabled > /sys/class/tty/ttySC3/power/wakeup
echo mem > /sys/power/state

Press the SLEEP button on the board to wake up the system from Suspend-to-RAM mode.

Mouse Polling Rate Configuration

Graphics and video codec performance may be decreased when using a mouse with a polling rate higher than 125 Hz. This is due to increased CPU usage from processing more frequent input events.

Issue Description

When using high-performance gaming mouse with polling rates which is higher than 125Hz, you may experience:

  • Decreased graphics performance
  • Video codec performance issues
  • Audio playback problems
  • Increased CPU usage

Workaround

To workaround this issue, please limit the mouse polling rate to 125Hz by adding the usbhid.mousepoll kernel parameter to the boot arguments.

Steps to configure:

  1. Power on board and interrupt at u-boot by pressing any key
  2. Edit boot arguments to include the mouse polling parameter:

    editenv bootargs
    edit: <existing_bootargs> usbhid.mousepoll=8
    saveenv
    boot
    

Parameter Values

Here are the current experiment of usbhid.mousepoll parameter:

ValuePolling RateDescription
8125 HzRecommended for general Android use
4250 HzHigher performance, may impact system
2500 HzHigh performance, likely to cause issues
11000 HzMaximum rate, not recommended

Note

  • These parameter values are based on experimental testing. Users can adjust the polling rate according to their specific requirements and system performance needs.
  • This configuration is particularly important when using high-end gaming mouse with Android systems.

SDCard storage support

Due to pin multiplexing between the SDHI interface (used for SDCard storage) and the SDIO interface (used for Wi-Fi), both features cannot be enabled simultaneously. To use SDCard functionality on the board, please configure the hardware switch and u-boot settings properly.

Hardware configuration

  1. Plug in SDCard to SDIO Port
  2. Set SW_OPT_MUX switch to enable SDCard support:
Switch NamePin1Pin2Pin3Pin4
SW_OPT_MUXOFF---

U-Boot configuration

To enable SDCard storage support, set the required parameters in u-boot:

  1. Power on the device and interrupt autoboot by pressing any key
  2. Set the u-boot parameters:

    setenv use_usb_wifi 1
    saveenv
    

  3. Reset the system:

    reset
    

Note

Both hardware switch configuration and u-boot parameter settings are required for proper SDCard functionality.

Wi-Fi usage

Due to pin multiplexing between the SDHI interface (used for SDCard storage) and the SDIO interface (used for Wi-Fi), both features cannot be enabled simultaneously. To use Wi-Fi functionality on the board, please configure the hardware switch and u-boot settings properly.

Hardware configuration

  1. Attach 2AE / 2BC M.2 Module into M2 Key B slot

  2. Set SW_OPT_MUX switch to enable Wi-Fi support:

    Switch NamePin1Pin2Pin3Pin4
    SW_OPT_MUXON---

U-Boot configuration

Make sure the use_usb_wifi variable is set to 0 in u-boot:

  1. Power on the device and interrupt autoboot by pressing any key
  2. Set the u-boot parameters:

    setenv use_usb_wifi 0
    saveenv
    

  3. Reset the system:

    reset
    

Note

Both hardware switch configuration and u-boot parameter settings are required for proper Wi-Fi functionality.

Using SDCard boot

Due to pin multiplexing between the SDHI interface (used for SDCard boot) and the SDIO interface (used for Wi-Fi), both features cannot be enabled simultaneously. To use SDCard boot functionality on the board, please configure the hardware switch and u-boot settings properly.

Hardware configuration

  1. Plug in SDCard to SDIO Port
  2. Set SW_OPT_MUX switch to enable SDCard support:
Switch NamePin1Pin2Pin3Pin4
SW_OPT_MUXOFF---

U-Boot configuration

To enable SDCard boot support, set the required parameters in u-boot:

  1. Power on the device and interrupt autoboot by pressing any key
  2. Set the u-boot parameters:

    setenv boot_device 1
    setenv use_usb_wifi 1
    saveenv
    

  3. Press and hold the Power button (POWER) for 2 seconds to turn off board. Press and hold the Power button (POWER) for 2 seconds to turn on board again!

  4. Interrupt autoboot by pressing any key and Flash Android image. Please follow Flashing images using fastboot

Note

  • Set boot devices (about mmc_dev, please refer table below):
BoardBoot devicemmc_devsoc_suffixDefault mode
SMARC RZ/G3LeMMC/SDCard (uSD0) for eSD boot0soc/11c00000.mmc
SDCard1soc/11c10000.mmc

Note

  • Both hardware switch configuration and u-boot parameter settings are required for proper SDCard boot functionality.
  • The boot time depends on SDCard speed.