美文网首页
(盈鹏飞嵌入式SBC-T113全志T113-i主板)-使用u-b

(盈鹏飞嵌入式SBC-T113全志T113-i主板)-使用u-b

作者: 盈鹏飞嵌入式 | 来源:发表于2024-04-29 10:44 被阅读0次

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 displayfastbootlogo.bmp

partno erro : can't findpartition bootloader

54 bytes read in 0 ms

[103.899]bmp_name=fastbootlogo.bmpsize 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             .

2024/03/28  10:12             ..

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>fastbootdevices

AndroidFastboot         fastboot

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

D:\platform-tools>fastboot

reboot

fastboot烧写板载nand的SBC-T113:

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

更新u-boot镜像:

fastboot flash u-bootboot_package.fex

或:

fastboot flashbootloader boot_package.fex

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

fastboot flash envenv.fex &&

fastboot flashenv-redund env.fex

更新logo镜像:   

fastboot flashboot-resource boot-resource.fex

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

fastboot flash boot0 镜像名

更新内核和设备树镜像:

fastboot flash bootboot.img

更新文件系统镜像:

fastboot flash rootfsrootfs.ubifs

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

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

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

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

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

Writing 'boot'                                     OKAY[  4.435s]

Finished. Total time: 5.167s

D:\platform-tools>fastbootflash  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

fastbootcommand = getvar:has-slot:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:has-slot:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:max-download-size

getvar

response:OKAY0x02000000

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:partition-size:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = getvar:is-logical:boot

getvar

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = download:01312000

download

Startingdownload of 19996672 BYTES

Startingdownload of 19 MB

downloadresponse: DATA01312000

sunxi_usb_fastboot_status=3

fastboottransfer finish

sunxi_usb_fastboot_status=0

sunxi_usb_fastboot_status=1

SUNXI_USB_FASTBOOT_SETUP

fastbootcommand = flash:boot

flash

ready todownload bytes 0x1312000

sparse: badmagic

sunxi fastboot: successed in downloading partition 'boot'

fastboot烧写板载EMMC的SBC-T113:

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

更新u-boot镜像:

fastboot flash u-bootboot_package.fex

或:

fastboot flashbootloader boot_package.fex

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

fastboot flash envenv.fex &&

fastboot flashenv-redund env.fex

更新logo镜像:   

fastboot flashboot-resource boot-resource.fex

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

fastboot flash boot0 镜像名

更新内核和设备树镜像:

fastboot flash bootboot.img

更新文件系统镜像:

fastboot flash rootfsrootfs.ext4

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

相关文章

网友评论

      本文标题:(盈鹏飞嵌入式SBC-T113全志T113-i主板)-使用u-b

      本文链接:https://www.haomeiwen.com/subject/wbgzxjtx.html