(盈鹏飞嵌入式SBC-T113全志T113-i主板)-使用u-boot中的fastboot更新固件

本文详细介绍了SBC-T113单板电脑的硬件配置,包括处理器、视频处理能力、内存支持以及丰富的I/O接口。同时,文章着重讲解了如何在u-boot环境下使用fastboot工具进行固件更新,包括USB连接方式、命令行操作和实际案例演示。
摘要由CSDN通过智能技术生成

SBC-T113产品特性:

  • 采用Allwinner公司Cortex-A7双核T113-i处理器,运行最高速度为1.2GHZ;
  • 内置64位玄铁C906 RISC-V CPU和 DSP,提供高效的计算能力; 
  • 支持1080P 视频编码,多格式1080P 60fps视频解码 (H.265,H.264, MPEG-1/2/4)
  • 支持LVDS/MIPI-DSI,分辨率最高1920x1080;
  • 支持512-1G  Bytes DDR3 SDRAM;
  • 支持SPI NAND启动和存储(256MB默认;512MB可选);可选EMMC启动和存储( 4G默认;8GB可选);
  • 支持4路USB2.0 HOST和1路OTG,1路I2C,6路UART(RS232), 1路PWM(应用于背光)
  • 支持双路CAN BUS通信
  • 支持双路以太网,一路10/100M;一路10/100/1000M;
  • 标准3.5寸主板, 尺寸为:146*102MM

SBC-T113功能评估图:

使用u-boot中的fastboot更新固件:

fastboot简要介绍:

fastboot是PC与Bootloader的USB通信的命令行工具,通过向BootLoader传送刷机文件(.img)实现Linux系统分区重烧。fastboot需要BootLoader支持,且需要使用USB数据线连接,因此常称为线刷模式。Fastboot工具可以在linux下运行,也可以在windows下运行。

在SBC-T113的主板上,Bootloader使用的是u-boot。在u-boot下输入fastboot命令,就可以让uboot进入fastboot模式,刷机就是在fastboot模式下进行刷机。刷机时,我们把主板的USB OTG接口直接通过usb线和主机的usb接口连接,硬件连接如下(具体可参考第四章-固件的烧写):

当我们在uboot下输入fastboot命令时,主机就会识别到一个usb设备,并等待开发主机发来的指令,主板终端串口显示如下:

=> fastboot

sunxi_fastboot_init

recv addr 0x41000000

send addr 0x4c8ede38

start to display fastbootlogo.bmp

partno erro : can't find partition bootloader

54 bytes read in 0 ms

[103.899]bmp_name=fastbootlogo.bmp size 189966

189966 bytes read in 10 ms (18.1 MiB/s)

delay time 0

weak:otg_phy_config

usb init ok

sunxi_usb_fastboot_status=0

set address 0xc

set address 0xc ok

同时,在开发主机上(目前使用的WINDOWS平台),准备好fastboot相关工具,我们暂时把工具放到D:/ platform-tools目录下。

D:\platform-tools>dir

 驱动器 D 中的卷是 Data

 卷的序列号是 BCB9-1068

 D:\platform-tools 的目录

2024/03/28  10:12    <DIR>          .

2024/03/28  10:12    <DIR>          ..

2024/03/20  16:42         5,857,056 adb.exe

2024/03/20  16:42           108,320 AdbWinApi.dll

2024/03/20  16:42            73,504 AdbWinUsbApi.dll

2024/03/20  16:42           439,072 etc1tool.exe

2024/03/20  16:42         1,807,136 fastboot.exe

2024/03/20  16:42            54,560 hprof-conv.exe

2024/03/20  16:42           242,128 libwinpthread-1.dll

2024/03/20  16:42           477,472 make_f2fs.exe

2024/03/20  16:42           477,472 make_f2fs_casefold.exe

2024/03/20  16:42             1,157 mke2fs.conf

2024/03/20  16:42           754,464 mke2fs.exe

2024/03/20  16:42         1,110,529 NOTICE.txt

2024/03/20  16:42                38 source.properties

2024/03/20  16:42         2,838,304 sqlite3.exe

              14 个文件     14,241,212 字节

               2 个目录  1,235,611,648 可用字节

D:\platform-tools>fastboot devices

Android Fastboot         fastboot

当执行fastboot devices执行后,出现如上信息,表示连接正常。此时,我们可以在开发主机上输入一个简单的指令,让主板复位:

D:\platform-tools>fastboot reboot

fastboot烧写板载nand的SBC-T113:

以下是通过fastboot工具将固件写入NAND的指令。

更新u-boot镜像:

fastboot flash u-boot boot_package.fex

或:

fastboot flash bootloader boot_package.fex

更新u-boot环境变量镜像:

fastboot flash env env.fex &&

fastboot flash env-redund env.fex

更新logo镜像:   

fastboot flash boot-resource boot-resource.fex

更新toc镜像:一般不用替换

fastboot flash boot0 镜像名

更新内核和设备树镜像:

fastboot flash boot boot.img

更新文件系统镜像:

fastboot flash rootfs rootfs.ubifs

以下我仅以写入boot.img作为案例,演示下更新的过程:

(1)在开发主机上输入指令(D:/t113_nand_images下保存的是boot.img):

D:\platform-tools>fastboot  flash  boot \t113_nand_images\boot.img

Warning: skip copying boot image avb footer (boot partition size: 0, boot image size: 19996672).

Sending 'boot' (19528 KB)                          OKAY [  0.651s]

Writing 'boot'                                     OKAY [  4.435s]

Finished. Total time: 5.167s

D:\platform-tools>fastboot flash  rootfs \t113_nand_images\rootfs.ubifs

Sending sparse 'rootfs' 1/5 (32764 KB)             OKAY [  1.066s]

Writing 'rootfs'                                   OKAY [  8.818s]

Sending sparse 'rootfs' 2/5 (32764 KB)             OKAY [  1.064s]

Writing 'rootfs'                                   OKAY [  0.088s]

Sending sparse 'rootfs' 3/5 (32764 KB)             OKAY [  1.064s]

Writing 'rootfs'                                   OKAY [  0.089s]

Sending sparse 'rootfs' 4/5 (32764 KB)             OKAY [  1.062s]

Writing 'rootfs'                                   OKAY [  0.088s]

Sending sparse 'rootfs' 5/5 (4940 KB)              OKAY [  0.178s]

Writing 'rootfs'                                   OKAY [  1.029s]

Finished. Total time: 14.719s

(2)在主板的终端上看到的信息如下:

/烧写boot.img的信息

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:has-slot:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:has-slot:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:max-download-size

getvar

response: OKAY0x02000000

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:partition-size:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = download:01312000

download

Starting download of 19996672 BYTES

Starting download of 19 MB

download response: DATA01312000

sunxi_usb_fastboot_status=3

fastboot transfer finish

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastboot command = flash:boot

flash

ready to download bytes 0x1312000

sparse: bad magic

sunxi fastboot: successed in downloading partition 'boot'

fastboot烧写板载EMMC的SBC-T113

以下是通过fastboot工具将固件写入EMMC的指令。

更新u-boot镜像:

fastboot flash u-boot boot_package.fex

或:

fastboot flash bootloader boot_package.fex

更新u-boot环境变量镜像:

fastboot flash env env.fex &&

fastboot flash env-redund env.fex

更新logo镜像:   

fastboot flash boot-resource boot-resource.fex

更新toc镜像:一般不用替换

fastboot flash boot0 镜像名

更新内核和设备树镜像:

fastboot flash boot boot.img

更新文件系统镜像:

fastboot flash rootfs rootfs.ext4

特别说明的是,对于板载SPI NAND的产品,根文件系统的镜像是rootfs.ubifs,而板载EMMC的产品,根文件系统的镜像是rootfs.ext4。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值