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:
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:
- Create new partition (1 partition is OK)
- Change partition type
- Format partition as FAT32
- 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:
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:
| Display Resolution | Density value (*) | Note |
|---|---|---|
| 640 x 480 (VGA) | 90 | |
| 800 x 600 (SVGA) | 110 | |
| 1024 x 600 | 120 | |
| 1024 x 768 (XGA) | 145 | |
| 1280 x 720 (HD) | 150 | Max 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):
Disable boot animation
Reduce boot delay
Save changes
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 option | Lunch command | board_name | Note |
|---|---|---|---|
| Base | lunch smarc_rzg3l-cp2a-userdebug | smarc_rzg3l | Base environment based on pure AOSP. No demo applications. |
| Demo | lunch smarc_rzg3l_demo-cp2a-userdebug | smarc_rzg3l | Inherit base build option. But it has some demo applications. |
Note
- Please update “board_name” based on lunch command before copying Android images (See Building Android, IPL, U-Boot, and Kernel sources)
- This release is fully tested for “Base” build option. Other build options are NOT fully tested yet.
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:
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
Copy signed keys script to your mydroid
Export all necessary build variables
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:
Run below command to sign keys. Input your password or blank for non-password. Press "Enter" to continue.
Confirm any missing APKs or APEXs not signed with new own release keys:
Copy output into images_dir (Building Android, IPL, U-Boot, and Kernel sources). Please export images_dir before copying images
Overwrite with the signed images
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
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¶
| Application | Source | Build Method | Purpose |
|---|---|---|---|
| ApiDemos | AOSP (with Renesas RZ bug-fixes) | AOSP Build System | Android APIs tests: Graphics/Camera/General Android APIs |
| Grafika | Grafika (Google) | Android Studio | Codecs/Graphics samples |
| Video Playback sample | Renesas RZ | Android Studio | Video 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.
| Feature | Status |
|---|---|
| Graphics | Partially Supported. May fail to suspend at some cases |
| Codecs | Supported |
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:
- Power on board and interrupt at u-boot by pressing any key
Edit boot arguments to include the mouse polling parameter:
Parameter Values¶
Here are the current experiment of usbhid.mousepoll parameter:
| Value | Polling Rate | Description |
|---|---|---|
| 8 | 125 Hz | Recommended for general Android use |
| 4 | 250 Hz | Higher performance, may impact system |
| 2 | 500 Hz | High performance, likely to cause issues |
| 1 | 1000 Hz | Maximum 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¶
- Plug in SDCard to SDIO Port
- Set SW_OPT_MUX switch to enable SDCard support:
| Switch Name | Pin1 | Pin2 | Pin3 | Pin4 |
|---|---|---|---|---|
| SW_OPT_MUX | OFF | - | - | - |
U-Boot configuration¶
To enable SDCard storage support, set the required parameters in u-boot:
- Power on the device and interrupt autoboot by pressing any key
Set the u-boot parameters:
Reset the system:
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¶
Attach 2AE / 2BC M.2 Module into M2 Key B slot
Set SW_OPT_MUX switch to enable Wi-Fi support:
Switch Name Pin1 Pin2 Pin3 Pin4 SW_OPT_MUX ON - - -
U-Boot configuration¶
Make sure the use_usb_wifi variable is set to 0 in u-boot:
- Power on the device and interrupt autoboot by pressing any key
Set the u-boot parameters:
Reset the system:
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¶
- Plug in SDCard to SDIO Port
- Set SW_OPT_MUX switch to enable SDCard support:
| Switch Name | Pin1 | Pin2 | Pin3 | Pin4 |
|---|---|---|---|---|
| SW_OPT_MUX | OFF | - | - | - |
U-Boot configuration¶
To enable SDCard boot support, set the required parameters in u-boot:
- Power on the device and interrupt autoboot by pressing any key
Set the u-boot parameters:
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!
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):
| Board | Boot device | mmc_dev | soc_suffix | Default mode |
|---|---|---|---|---|
| SMARC RZ/G3L | eMMC/SDCard (uSD0) for eSD boot | 0 | soc/11c00000.mmc | ✓ |
| SDCard | 1 | soc/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.