RZ-G/RZ-G2L Flash Programming: Difference between revisions

From Renesas.info
mNo edit summary
mNo edit summary
Line 8: Line 8:
In any of the cases above the goal is to have U-Boot up and running, then there are plenty of options to program the rootfs: ethernet, USB as host, USB with Mass Storage gadget, fastboot or even boot the linux kernel + initramfs.
In any of the cases above the goal is to have U-Boot up and running, then there are plenty of options to program the rootfs: ethernet, USB as host, USB with Mass Storage gadget, fastboot or even boot the linux kernel + initramfs.


With option 1, you can download the flash writer and program the bootloaders (ATF and U-Boot) into QSPI / eMMC boot partition, then reset and run U-Boot.
With option 1, you can download the flash writer and program the bootloaders, Arm Trusted Firmware (ATF) and U-Boot, into QSPI / eMMC boot partition, then reset and run U-Boot.


With option 2, you can download ATF and U-Boot via JTAG and then run the boot loaders without having to initially program them. Once U-Boot runs, you can program both bootloaders and rootfs.
With option 2, you can download ATF and U-Boot via JTAG and then run the boot loaders without having to initially program them. Once U-Boot runs, you can program both bootloaders and rootfs.
Line 17: Line 17:


== Boot from SCIF ==
== Boot from SCIF ==
The main tool that can assist in performing external non-volatile memory (QSPI and eMMC) is [https://github.com/renesas-rz/rzg2_flash_writer/tree/rz_g2l Flash Writer]. Depending on the host PC used, you can either use a script (link to be added) or a [https://ttssh2.osdn.jp/index.html.en TeraTerm] macro.
The main tool that can assist in performing external non-volatile memory (QSPI and eMMC) is [https://github.com/renesas-rz/rzg2_flash_writer/tree/rz_g2l Flash Writer]. Depending on the host PC used, you can either use a script (link to be added) or a [https://ttssh2.osdn.jp/index.html.en TeraTerm] macro. In both cases what you would need are two files:
 
* bl2_bp-smarc-rzg2l.bin
* fip-smarc-rzg2l.bin
 
These are either the output of Yocto or generated by combining ATF and U-Boot binaries. Actually the first one is generated by ATF directly whereas the second is the generated by the Firmware Image Package (FIP) utility by combining BL3x binaries.


=== Linux script ===
=== Linux script ===

Revision as of 07:33, 2 August 2021

RZ/G2L cannot boot from USB, so at the end-of-line there are two/three real viable options:

  1. Boot from SCIF
  2. Use JTAG
  3. It is worth to mention that, in general, if a QSPI FLASH is present on the custom board, it can also be bought preprogrammed

In any of the cases above the goal is to have U-Boot up and running, then there are plenty of options to program the rootfs: ethernet, USB as host, USB with Mass Storage gadget, fastboot or even boot the linux kernel + initramfs.

With option 1, you can download the flash writer and program the bootloaders, Arm Trusted Firmware (ATF) and U-Boot, into QSPI / eMMC boot partition, then reset and run U-Boot.

With option 2, you can download ATF and U-Boot via JTAG and then run the boot loaders without having to initially program them. Once U-Boot runs, you can program both bootloaders and rootfs.

With option 3, QSPI has already bootloaders pre-programmed, so U-Boot is already available.

All the options above may not require any human intervention and can be to a certain extent automatized.

Boot from SCIF

The main tool that can assist in performing external non-volatile memory (QSPI and eMMC) is Flash Writer. Depending on the host PC used, you can either use a script (link to be added) or a TeraTerm macro. In both cases what you would need are two files:

  • bl2_bp-smarc-rzg2l.bin
  • fip-smarc-rzg2l.bin

These are either the output of Yocto or generated by combining ATF and U-Boot binaries. Actually the first one is generated by ATF directly whereas the second is the generated by the Firmware Image Package (FIP) utility by combining BL3x binaries.

Linux script

TBD

Windows TeraTerm macro

TBD

Use JTAG

TBD