您尚未登录。

楼主 # 2022-07-17 23:37:24

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

SPL的地址:https://github.com/liefyuan/t113-s3-spl
主线uboot:https://gitee.com/weiwei382-163-com/t113-s3-u-boot
主线kernel:https://gitee.com/weiwei382-163-com/linux-t113-5.4
交叉编译器下载地址:http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/
开发环境:ubuntu20.04
硬件是:MQ-R
存储是spinand: 128M

SPL部分:
编译spl
重新装了一个交叉编译器:gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi

下载源码:

git clone -b main https://github.com/liefyuan/t113-s3-spl.git

编译命令:

编译mmc/SD:make CROSS_COMPILE=arm-linux-gnueabi- p=sun8iw20p1 mmc
编译nand flash:make CROSS_COMPILE=arm-linux-gnueabi- p=sun8iw20p1 nand
编译spinor flash:make CROSS_COMPILE=arm-linux-gnueabi- p=sun8iw20p1 spinor
编译fes:make CROSS_COMPILE=arm-linux-gnueabi- p=sun8iw20p1 fes

烧录文件:t113-s3-spl/nboot/boot0_nand_sun8iw20p1.bin
使用xfel烧录进spi nand flash里面去

让板子上电的时候进入FEL模式,检查一下有没有识别出来:

$ xfel spinand
Found spi nand flash 'W25N01GV' with 134217728 bytes

全片擦除一下:

$ xfel spinand erase 0x00000000 0x8000000
100% [================================================] 128.000 MB, 63.026 MB/s

烧录

$ xfel spinand write 0x00000000 boot0_nand_sun8iw20p1.bin

上电信息,SPL(boot0)跑起来了!

[30]HELLO! BOOT0 is starting!
[33]BOOT0 commit : aedc18e
[35]set pll start
[37]periph0 has been enabled
[40]set pll end
[42]board init ok
[43]ZQ value = 0x2f
[45]ddr_efuse_type: 0xa
[48]mark_id: 0x60
[50]trefi:7.8ms
[52][AUTO DEBUG] single rank and full DQ!
[56]ddr_efuse_type: 0xa
[58]mark_id: 0x60
[60]trefi:7.8ms
[63][AUTO DEBUG] rank 0 row = 13
[66][AUTO DEBUG] rank 0 bank = 8
[69][AUTO DEBUG] rank 0 page size = 2 KB
[73]DRAM BOOT DRIVE INFO: V0.24
[76]DRAM CLK = 792 MHz
[78]DRAM Type = 3 (2:DDR2,3:DDR3)
[82]DRAMC read ODT  off.
[84]DRAM ODT value: 0x42.
[87]ddr_efuse_type: 0xa
[89]mark_id: 0x60
[92]DRAM SIZE = 128M
[98]DRAM simple test OK.
[101]dram size =128
[103]spinand UBOOT_START_BLK_NUM 1 UBOOT_LAST_BLK_NUM 1
[108]block from 1 to 1
[111]oob_buf[0] = 0
[112]spi nand block 1 is bad
[115]Can't find a good Boot1 copy in spi nand.
[119]dma 0x29010 int is not used yet
[122]dma 0x29010 int is free, you do not need to free it again

U-Boot部分:

make t113_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 u-boot.bin

烧录u-boot

liefyuan@ubuntu:~/t113/t113-s3-u-boot$ xfel spinand write 0x100000 u-boot.bin
100% [================================================] 463.646 KB, 433.945 KB/s 

 

上电信息,SPL(boot0)跑起来了,但是U-Boot还是没有启动!

[30]HELLO! BOOT0 is starting!
[33]BOOT0 commit : aedc18e
[35]set pll start
[37]periph0 has been enabled
[40]set pll end
[42]board init ok
[43]ZQ value = 0x2f
[45]ddr_efuse_type: 0xa
[48]mark_id: 0x60
[50]trefi:7.8ms
[52][AUTO DEBUG] single rank and full DQ!
[56]ddr_efuse_type: 0xa
[58]mark_id: 0x60
[60]trefi:7.8ms
[63][AUTO DEBUG] rank 0 row = 13
[66][AUTO DEBUG] rank 0 bank = 8
[69][AUTO DEBUG] rank 0 page size = 2 KB
[73]DRAM BOOT DRIVE INFO: V0.24
[76]DRAM CLK = 792 MHz
[78]DRAM Type = 3 (2:DDR2,3:DDR3)
[82]DRAMC read ODT  off.
[84]DRAM ODT value: 0x42.
[87]ddr_efuse_type: 0xa
[89]mark_id: 0x60
[92]DRAM SIZE = 128M
[98]DRAM simple test OK.
[101]dram size =128
[103]spinand UBOOT_START_BLK_NUM 1 UBOOT_LAST_BLK_NUM 1
[108]block from 1 to 1
[111]oob_buf[0] = 0
[112]spi nand block 1 is bad
[115]Can't find a good Boot1 copy in spi nand.
[119]dma 0x29010 int is not used yet
[122]dma 0x29010 int is free, you do not need to free it again

boot0启动后,U-Boot一点反应的都没有
请问有谁知道是怎么回事吗?

离线

#1 2022-07-18 16:02:51

登云钓月
会员
注册时间: 2021-06-02
已发帖子: 6
积分: 6

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

为何不用全志提供的T113_Longan_Linux_SDK呢?最近自己画了块板子,用了Longan可以跑,不过用的SD卡。不过看Longan是支持NAND的,还未测试。

离线

#2 2022-07-18 17:56:23

阿黄
会员
注册时间: 2018-10-03
已发帖子: 298
积分: 133

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

看你之前发的帖子,还以为搞定了主线uboot和kernel呢

离线

楼主 #3 2022-07-18 18:24:02

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

没有搞定,收集了些资料:

gitee上的大佬:https://whycan.com/t_8123.html
spl(只能编译nand版本):https://gitee.com/weiwei382-163-com/nand_spl
Uboot:https://gitee.com/weiwei382-163-com/t113-s3-u-boot
linux:https://gitee.com/weiwei382-163-com/linux-t113-5.4

结果:spl跑起来了,Uboot死活跑不起来!

github上资料(只找到了spl没有找到主线的Uboot和Linux):
spl(nand,mmc,spinor都可以正常编译出来):https://github.com/szemzoa/sun8iw20_spl

结果:spl跑起来了,Uboot还是死活跑不起来!

离线

#4 2022-07-19 08:43:19

Cadence
会员
注册时间: 2022-04-01
已发帖子: 71
积分: 85

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

[103]spinand UBOOT_START_BLK_NUM 1 UBOOT_LAST_BLK_NUM 1
[108]block from 1 to 1
[111]oob_buf[0] = 0
[112]spi nand block 1 is bad
[115]Can't find a good Boot1 copy in spi nand.

你把 U-boot 写到哪儿了?
这可是从第一个block开始读的

离线

#5 2022-07-19 15:12:42

szemzoa
会员
注册时间: 2022-06-20
已发帖子: 2
积分: 7

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

This SPL (https://github.com/szemzoa/sun8iw20_spl) is for mainline u-boot, you cannot use this for the Allwinner u-boot. As currently there are no mainline u-boot support for T113 yet, that one not very useful at the moment, except the DDR setup from C code. Your best bet currently is to use the Allwinner SPL, u-boot, OP-TEE, kernel.

离线

#6 2022-08-18 19:25:30

as86455011
会员
注册时间: 2018-11-20
已发帖子: 32
积分: 3

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

Cadence 说:
[103]spinand UBOOT_START_BLK_NUM 1 UBOOT_LAST_BLK_NUM 1
[108]block from 1 to 1
[111]oob_buf[0] = 0
[112]spi nand block 1 is bad
[115]Can't find a good Boot1 copy in spi nand.

你把 U-boot 写到哪儿了?
这可是从第一个block开始读的


老哥,转换uboot 如何修改uart debug?

离线

#7 2022-08-29 17:09:21

twzy
会员
注册时间: 2021-04-16
已发帖子: 198
积分: 345.5
个人网站

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

对于这个Uboot
https://gitee.com/weiwei382-163-com/t113-s3-u-boot
对于 arch/arm/mach-sunxi/board.c 中默认配置串口好像是PE2\PE3,对于后面的6 是什么意思,如何确定PE这个组呢
QQ截图20220829170556.png

主要是想加uart3 作为输出

最近编辑记录 twzy (2022-08-29 17:09:39)

离线

#8 2022-08-29 18:16:28

as86455011
会员
注册时间: 2018-11-20
已发帖子: 32
积分: 3

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

@twzy
作为function
但是我改了,貌似不行。

离线

#9 2022-08-29 18:48:57

twzy
会员
注册时间: 2021-04-16
已发帖子: 198
积分: 345.5
个人网站

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

as86455011 说:

@twzy
作为function
但是我改了,貌似不行。

板子过两天到,到时候慢慢调吧,没有资料只能一点点试

离线

#10 2022-08-31 17:34:40

richard.zhou
会员
注册时间: 2022-08-31
已发帖子: 5
积分: 25

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

https://gitee.com/weiwei382-163-com/t113-s3-u-boot
该u-boot打印输出强制指定了串口,需要做如下修改,才能更换串口

2022-08-31_17-33.png

离线

#11 2022-09-06 10:06:12

twzy
会员
注册时间: 2021-04-16
已发帖子: 198
积分: 345.5
个人网站

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

问一下,对于TF卡, boot0 和Uboot 分别写到哪个地方啊?

离线

#12 2022-09-07 08:39:35

as86455011
会员
注册时间: 2018-11-20
已发帖子: 32
积分: 3

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

twzy 说:

问一下,对于TF卡, boot0 和Uboot 分别写到哪个地方啊?

貌似仅支持nand

离线

#13 2022-09-07 09:43:29

twzy
会员
注册时间: 2021-04-16
已发帖子: 198
积分: 345.5
个人网站

Re: T113-S3使用主线为啥就这么难呢?SPL跑起来了死活进不去uboot

as86455011 说:
twzy 说:

问一下,对于TF卡, boot0 和Uboot 分别写到哪个地方啊?

貌似仅支持nand

我看说明文档中有TF卡的,就编译了,因为我用的UART3,就改了一下代码,也不确定启动起来没,反正没输出

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn