RZ/G2L微處理器配備Cortex-A55(1.2GHz)CPU、16位DDR3L/DDR4接口、帶Arm Mali-G31的3D圖形加速引擎以及視頻編解碼器(H.264)。此外,這款微處理器還配備有大量接口,如攝像頭輸入、顯示輸出、USB 2.0和千兆以太網(wǎng),因此特別適用于入門級工業(yè)人機(jī)界面(HMI)和具有視頻功能的嵌入式設(shè)備等應(yīng)用。

在基于瑞薩RZ/G2L MPU的嵌入式開發(fā)過程中,傳統(tǒng)eMMC燒錄流程效率成為生產(chǎn)瓶頸——單板燒錄耗時約5分30秒,嚴(yán)重制約批量生產(chǎn)效率。針對這一痛點,我們創(chuàng)新性地推出了雙階段混合燒錄方案,巧妙結(jié)合SCIF與Fastboot技術(shù)優(yōu)勢,實現(xiàn)了多設(shè)備并行燒錄,大幅縮短了整體耗時。
雙階段技術(shù)架構(gòu)
01Bootloader燒錄階段
通過SCIF接口批量寫入U-Boot至多塊主板eMMC
支持并行操作,避免單板串行等待
02系統(tǒng)鏡像燒錄階段
配置U-Boot啟用Fastboot over USB功能
PC端Fastboot工具同時操控多塊主板,實現(xiàn)分區(qū)創(chuàng)建、內(nèi)核及文件系統(tǒng)并行寫入
效率對比:提升顯著

詳細(xì)實施方案
一、U-Boot配置
在源碼中啟用Fastboot和USB功能支持,并配置相關(guān)功能。
配置文件路徑為:u-boot/git/configs/smarc-rzg2l_defconfig
關(guān)鍵配置示例
左右滑動查看完整內(nèi)容
# Fastboot功能配置 CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x4D000000 CONFIG_FASTBOOT_BUF_SIZE=0x8000000 CONFIG_FASTBOOT_USB_DEV=28 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_CMD_FASTBOOT=y # USB功能配置 CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Renesas" CONFIG_USB_GADGET_VENDOR_NUM=0x18D1 CONFIG_USB_GADGET_PRODUCT_NUM=0x4E23
完成配置和源碼修改后編譯,得到fip_pmic.srec、bl2_bp_pmic.srec,再通過SCIF下載模式使用Flash Writer工具燒錄BL2與FIP至eMMC。
二、Fastboot燒錄流程
設(shè)備端操作
在U-Boot控制臺中執(zhí)行以下命令進(jìn)入Fastboot模式:
左右滑動查看完整內(nèi)容
setenv serial#'Renesas1'# 自定義設(shè)備唯一標(biāo)識 saveenv fastboot usb 27 # 啟動USB Fastboot服務(wù)
PC端操作
1驗證設(shè)備連接
左右滑動查看完整內(nèi)容
fastbootdevices
2創(chuàng)建并燒寫MBR分區(qū)表(包含500MB啟動分區(qū)和3.5GB根文件系統(tǒng)分區(qū))
左右滑動查看完整內(nèi)容
fastbootflash mbr part.mbr
3創(chuàng)建啟動分區(qū)鏡像
左右滑動查看完整內(nèi)容
ddif=/dev/zero of=boot.img bs=1M count=256 sudomkfs.vfat -v -c -F32boot.img
4掛載并復(fù)制內(nèi)核文件
左右滑動查看完整內(nèi)容
sudomount boot.img /mnt cpkernel /mnt cpdtb /mnt sudoumount /mnt
5燒錄分區(qū)并重啟
左右滑動查看完整內(nèi)容
fastbootflash0:1boot.img#啟動分區(qū) fastbootflash0:2core-image-minimal-smarc-rzg2l.ext4 # 根文件系統(tǒng) fastbootreboot
啟動參數(shù)配置
左右滑動查看完整內(nèi)容
setenvbootargs 'rw rootwait earlycon root=/dev/mmcblk0p2' setenvbootcmd 'mmc dev0; fatload mmc0:10x48080000 Image-smarc-rzg2l.bin; fatloadmmc0:10x48000000 Image-r9a07g044l2-smarc.dtb; booti0x48080000 - 0x48000000' saveenv
多設(shè)備并行燒錄實戰(zhàn)
通過設(shè)備唯一ID識別,實現(xiàn)單PC控制多設(shè)備同步燒錄:
設(shè)備端設(shè)置
左右滑動查看完整內(nèi)容
setenvserial# 'Device_001' # 設(shè)備唯一標(biāo)識 saveenv fastbootusb0
PC端并行操作
左右滑動查看完整內(nèi)容
# 查看已連接設(shè)備 fastbootdevices # 終端1操作設(shè)備1 fastboot-s Device_001 flash mbr part.mbr fastboot-s Device_001 flash0:1boot.img fastboot-s Device_001 reboot # 終端2同時操作設(shè)備2 fastboot-s Device_002 flash mbr part.mbr fastboot-s Device_002 flash0:1boot.img fastboot-s Device_002 reboot
附:單個板子燒錄成功log
fastboot log
左右滑動查看完整內(nèi)容
g2l@g2l-VirtualBox:~$ fastboot devices Renesas1fastboot g2l@g2l-VirtualBox:~$ fastboot flash mbr part.mbr targetreported max download size of134217728bytes sending'mbr' (0KB)... OKAY[ 0.007s] writing'mbr'... OKAY[ 0.007s] finished. total time:0.014s g2l@g2l-VirtualBox:~$ fastboot flash0:1boot.img#啟動分區(qū) targetreported max download size of134217728bytes sending'0:1' (85274KB)... OKAY[ 7.543s] writing'0:1'... OKAY[ 4.010s] finished. total time:11.553s g2l@g2l-VirtualBox:~$ fastboot flash0:2core-image-minimal-smarc-rzg2l.ext4 targetreported max download size of134217728bytes Invalidsparse file format at header magic erasing'0:2'... OKAY[ 5.145s] sendingsparse '0:2'1/1(80256KB)... OKAY[ 7.144s] writing'0:2'1/1... OKAY[ 54.646s] finished. total time:66.935s g2l@g2l-VirtualBox:~$ fastboot reboot rebooting... finished. total time:5.601s g2l@g2l-VirtualBox:~$
boot log
左右滑動查看完整內(nèi)容
=> fastboot usb 0 ** Bad device specification mmc mbr_a ** Couldn't find partition mmc mbr_a ** Bad device specification mmc mbr ** Couldn't find partition mmc mbr ** Bad device specification mmc mbr ** Couldn't find partition mmc mbr Starting download of 512 bytes downloading of 512 bytes finished fastboot_mmc_flash_write: updating MBR ........ success ** Bad partition specification mmc 0:1_a ** Couldn't find partition mmc 0:1_a Starting download of 87320576 bytes .......................................................................... downloading of 87320576 bytes finished Flashing Raw Image ........ wrote 87320576 bytes to '0:1' ** Bad partition specification mmc 0:2_a ** Couldn't find partition mmc 0:2_a Erasing blocks 1026048 to 8388608 due to alignment ........ erased 3769630720 bytes from '0:2' Starting download of 82182548 bytes .......................................................................... downloading of 82182548 bytes finished Flashing sparse image at offset 1026048 Flashing Sparse Image ........ wrote 1184509952 bytes to '0:2' resetting ... NOTICE: BL2: v2.9(release):v2.5/rzg2l-1.00-3883-gc314a391c-dirty NOTICE: BL2: Built : 1418, Sep 192023 NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x1f840 src=(p:1)0x20000(256) len=0x10(1) NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x1f9a0 src=(p:1)0x20010(256) len=0x28(1) NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x44000000 src=(p:1)0x20090(256) len=0x6069(49) NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x1f840 src=(p:1)0x20000(256) len=0x10(1) NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x1f9a0 src=(p:1)0x20010(256) len=0x28(1) NOTICE: BL2: Load dst=0x1f9a0 src=(p:1)0x20038(256) len=0x28(1) NOTICE: BL2: eMMC boot from partition 1 NOTICE: BL2: Load dst=0x50000000 src=(p:1)0x26100(304) len=0xc0120(1538) NOTICE: BL2: Booting BL31 NOTICE: BL31: v2.9(release):v2.5/rzg2l-1.00-3883-gc314a391c-dirty NOTICE: BL31: Built : 1418, Sep 192023 U-Boot 2021.10 (Feb 182025 - 1150 +0800) CPU: Renesas Electronics CPU rev 1.0 Model: smarc-rzg2l DRAM: 1.9 GiB WDT: watchdog@0000000012800800 WDT: Started with servicing (60s timeout) MMC: sd@11c00000: 0, sd@11c10000: 1 Loading Environment from MMC... OK In: serial@1004b800 Out: serial@1004b800 Err: serial@1004b800 U-boot WDT started! Net: eth0: ethernet@11c20000 Hit any key to stop autoboot: 0 switch to partitions#0, OK mmc0(part 0) is current device
方案適用場景
01推薦使用場景
產(chǎn)線混合生產(chǎn)不同硬件版本
系統(tǒng)鏡像需要頻繁迭代的開發(fā)階段
小批量多配置定制化訂單
02不適用場景
無USB調(diào)試接口的主板版本
方案價值
通過SCIF+Fastboot兩階段混合燒錄方案,RZG2L平臺不僅實現(xiàn)了多設(shè)備并行燒錄,還大幅提高了生產(chǎn)和開發(fā)效率。該方案尤其適合小批量定制化生產(chǎn)與快速迭代的開發(fā)階段,為嵌入式系統(tǒng)的量產(chǎn)部署提供了一種高效可行的思路。
-
瑞薩
+關(guān)注
關(guān)注
37文章
22481瀏覽量
90823 -
微處理器
+關(guān)注
關(guān)注
11文章
2431瀏覽量
85816 -
emmc
+關(guān)注
關(guān)注
7文章
261瀏覽量
55972
原文標(biāo)題:瑞薩RZ/G2L量產(chǎn)提速利器:Fastboot模式下的eMMC高效燒錄方案
文章出處:【微信號:瑞薩嵌入式小百科,微信公眾號:瑞薩嵌入式小百科】歡迎添加關(guān)注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
瑞薩MCU方案:瑞薩RZ/G2L Bootloader單獨編譯方法詳解
基于瑞薩電子RZ/G2L的FET-G2LD-C核心板和OK-G2LD-C開發(fā)板評測
基于瑞薩RZ/G2L微處理器的Ubuntu系統(tǒng)移植指南
基于瑞薩RZ/G2L微處理器的eMMC雙階段混合燒錄方案
評論