Skip to content

Flash images on Renesas R-Car S4

To flash AutoSD onto your R-Car S4 board, install the Renesas boot firmware and the Arm Embedded Base Boot Requirements (EBBR)-compliant U-Boot firmware, then flash an AutoSD EBBR image onto the board.

Install the boot firmware

To install the boot firmware for the R-Car S4, download and install the Renesas boot firmware files and the CentOS Stream Automotive Special Interest Group (SIG) board support U-Boot firmware from COPR.

Get the Renesas firmware

To install the boot firmware for the R-Car S4, download the latest startup guide, Tera Term macros, and boot firmware files from the R-Car S4 support page. These files are on the Software and Tools tab and require login credentials from Renesas.

Prerequisites

  • Access to the Renesas R-Car S4 support page
  • A serial console connection to the R-Car S4 board (see the Renesas Startup Guide for serial port setup)
  • A workstation PC configured with a TFTP server
  • A network connection between the PC and the R-Car S4 board

Procedure

  1. From the Software and Tools tab on the R-Car S4 support page, download and extract the latest R-Car S4 SDK Start-Up Guide archive. The archive contains the startup guide PDF and the teratermmacro folder.

  2. Download and extract the latest R-Car S4 SDK Linux PKG with GCC compiler archive.

    1. Extract the outer archive to find the inner rcar-xos_sdk1-gateway_*_release.tar.gz file.

    2. Extract the inner archive. The boot firmware is in the rcar-xos/<version>/os/bootloader/s4 directory.

  3. To install the firmware, follow the instructions in “How to flash images” in the startup guide PDF.

Install the EBBR-compliant U-Boot firmware

Install the EBBR-compliant U-Boot firmware from the uboot-tools board support package. This U-Boot version includes EFI boot support, which you configure during installation to boot AutoSD from the EFI System Partition.

Procedure

  1. Navigate to the latest uboot-tools build directory for your aarch64 system version, and download the latest uboot-images-armv8-<version>.noarch.rpm file from the from the board support package builds.

  2. Extract the u-boot.bin file from the RPM file:

    rpm2cpio uboot-images-armv8-2025.07-2.fc43.noarch.rpm | cpio -id
    

    The R-Car S4 Spider binary is at ./usr/share/uboot/r8a779f0_spider/u-boot.bin.

  3. Place the u-boot.bin file on the TFTP server.

  1. Connect port 1 of the three ports on the Ethernet subboard.

    Note

    Identify port 1 from the printed circuit board (PCB) label (silkscreen) next to the connector. Of the three connectors labeled CN101, CN201, and CN301, port 1 is CN101. When you examine the RJ45 connector side of the board, port 1 is located further from the other two ports and on the right.

  2. Turn on the board and press any key during the U-Boot autoboot countdown to enter the U-Boot command line. If the board has an existing U-Boot, configure a temporary network configuration:

    setenv ethaddr <xx:xx:xx:xx:xx:xx>
    setenv ipaddr <board_ip_address>
    setenv serverip <tftp_server_ip_address>
    

    Where:

    • <xx:xx:xx:xx:xx:xx> is the MAC address from the sticker attached to the Ethernet connector.
    • <board_ip_address> is the IP address of the S4 board.
    • <tftp_server_ip_address> is the IP address of the PC hosting the TFTP server.
  3. Load the u-boot.bin file and write it to flash memory:

    mmc dev 0 1
    mw.b 0x48000000 0 40000
    tftp 0x48000000 u-boot.bin
    mmc write 0x48000000 7C00 <block_count>
    

    Where:

    • mmc dev 0 1 selects eMMC device 0, boot hardware partition 1.
    • mw.b 0x48000000 0 40000 clears 256 KiB of memory at the load address to ensure no residual data interferes with the firmware binary.
    • tftp 0x48000000 u-boot.bin downloads the U-Boot binary from the TFTP server into memory.
    • mmc write 0x48000000 7C00 <block_count> writes the binary from memory to the eMMC boot partition at the required offset.

    Important

    Calculate the <block_count> from the file size reported by the tftp command. Divide the file size in bytes by 512 and round up to get the number of blocks. For example, if tftp reports a file size of 0xC8430 bytes (820,272 bytes), the block count is 0x643 (1603 blocks).

  4. Configure U-Boot to boot AutoSD from the EFI System Partition:

    setenv boot_uki 'fatload mmc 0:1 ${loadaddr} /EFI/BOOT/BOOTAA64.EFI && bootefi ${loadaddr} ${fdt_addr}'
    setenv bootcmd 'run boot_uki'
    saveenv
    

    Where:

    • boot_uki defines a command that loads the Unified Kernel Image (UKI) from the EFI System Partition and boots it by using the UEFI boot stub.
    • bootcmd sets the default boot command that U-Boot runs automatically after the countdown.
    • saveenv persists the environment variables to eMMC so they survive reboots.
  5. Reboot the board by using the reset command.

  6. Verify that the U-Boot version command returns a version matching the RPM release (for example, U-Boot 2025.07-2.fc43).

Install the AutoSD image

To flash AutoSD onto your R-Car S4 board, download a prebuilt EBBR image or build a custom image.

The R-Car S4 uses the generic ebbr Automotive Image Builder target, which produces a standardized, hardware-agnostic image that boots on any EBBR-compliant board.

Prerequisites

  • Installed and functional boot firmware, including the EBBR-compliant U-Boot
  • A workstation PC configured with a TFTP server
  • A network connection between the PC and the R-Car S4 board

Download a prebuilt AutoSD image

Download the latest prebuilt AutoSD 10 EBBR image from the AutoSD nightly image repository. These images comply with the Arm Embedded Base Boot Requirements (EBBR) specification and are updated nightly.

  1. Identify the latest nightly EBBR image:

    $ latest=$(curl -s 'https://autosd.sig.centos.org/AutoSD-10/nightly/EBBR/?C=M;O=D' | sed -n \
    's|.*href=".*\(auto-osbuild-ebbr-autosd10-ps-regular[^"]*\.raw\.xz\)".*|\1|p' | head -n1)
    
  2. Download the image and its checksum file from the Automotive SIG nightly builds repository:

    $ wget "https://autosd.sig.centos.org/AutoSD-10/nightly/EBBR/$latest"
    $ wget "https://autosd.sig.centos.org/AutoSD-10/nightly/EBBR/${latest}.sha256"
    
  3. Verify the download integrity:

    $ sha256sum -c "${latest}.sha256"
    
  4. Recompress the .raw.xz archive in the gzip format that the U-Boot gzwrite command requires:

    $ xz -dc "$latest" | gzip > auto-osbuild-ebbr-autosd10.raw.gz
    

Next steps

Build a custom image

To build custom AutoSD images, use the automotive-image-builder tool. See Installing Automotive Image Builder for installation instructions.

Prerequisites

Procedure

  1. Build a disk image for R-Car S4 using the ebbr target, replacing <manifest> with your custom Automotive Image Builder manifest file:

    $ aib-dev build \
        --distro autosd10 \
        --target ebbr \
        <manifest>.aib.yml \
        autosd10-ebbr-rcar-s4.aarch64.img
    

    Note

    If you do not have your own manifest file, you can build an AutoSD image by using the example manifest file from sample-images.

  2. Compress the image in the gzip format that the U-Boot gzwrite command requires for transfer to the board.

    $ gzip -k autosd10-ebbr-rcar-s4.aarch64.img
    

Next steps

Additional resources

Flash the image

To flash the AutoSD image onto your R-Car S4, transfer the gzip-compressed image to the board over TFTP and write it to the eMMC storage through the U-Boot command line.

The U-Boot gzwrite command decompresses a gzip stream and writes the raw image data directly to the eMMC device. Because the raw image is larger than the board’s available RAM, gzip compression is required for transfer.

Prerequisites

  • A gzip-compressed prebuilt or custom AutoSD EBBR image (.gz)
  • A workstation PC configured with a TFTP server
  • A network connection between the PC and the R-Car S4 board

Procedure

  1. Place the .gz image file onto your TFTP server.

  1. Connect port 1 of the three ports on the Ethernet subboard.

    Note

    Identify port 1 from the printed circuit board (PCB) label (silkscreen) next to the connector. Of the three connectors labeled CN101, CN201, and CN301, port 1 is CN101. When you examine the RJ45 connector side of the board, port 1 is located further from the other two ports and on the right.

  2. Turn on the board and press any key during the U-Boot autoboot countdown to enter the U-Boot command line.

  3. Verify that the board acquires a network address from the DHCP server. The EBBR-compliant U-Boot automatically configures networking by using DHCP.

    If your network does not provide DHCP, configure a static IP address:

    setenv ipaddr <board_ip_address>
    setenv serverip <tftp_server_ip_address>
    

    Note

    The EBBR-compliant U-Boot reads the MAC address (ethaddr) from the board hardware automatically. Unlike the firmware installation procedure, you do not need to set ethaddr manually.

  4. Download the compressed image file to memory:

    tftp 0x480000000 <image_file>.gz
    

    Note

    The load address 0x480000000 is the start of the upper DDR memory bank on the R-Car S4, which provides a contiguous 2 GiB buffer for the compressed image. This is a different address from 0x48000000 used for the smaller U-Boot binary.

  5. Write the image to the MMC device:

    gzwrite mmc 0 0x480000000 ${filesize} 1000000 0
    

    Where:

    • mmc 0 is the eMMC device.
    • 0x480000000 is the memory address where the compressed image was loaded by tftp.
    • ${filesize} is the size of the compressed data, set automatically by the tftp command.
    • 1000000 is the write buffer size (16 MiB in hex).
    • 0 is the start offset on the MMC device.
  6. Verify that the image was written successfully:

    part list mmc 0
    

    The output should show an EFI System Partition and a root partition.

Boot the image

After flashing the image, the U-Boot boot_uki environment variable that you configured during the firmware installation boots AutoSD from the EFI System Partition on the MMC device.

Procedure

  1. After flashing, reset the board by using the reset command. U-Boot runs the boot_uki command and boots into AutoSD.

  2. Log in with the user name root and the password password.

Warning

The default credentials are for initial access to development images only. Change the root password immediately after first login, especially if the board has network connectivity.

Additional resources


© Red Hat