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一点反应的都没有
请问有谁知道是怎么回事吗?
离线
为何不用全志提供的T113_Longan_Linux_SDK呢?最近自己画了块板子,用了Longan可以跑,不过用的SD卡。不过看Longan是支持NAND的,还未测试。
离线
看你之前发的帖子,还以为搞定了主线uboot和kernel呢
离线
没有搞定,收集了些资料:
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还是死活跑不起来!
离线
[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开始读的
离线
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.
离线
[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?
离线
对于这个Uboot
https://gitee.com/weiwei382-163-com/t113-s3-u-boot
对于 arch/arm/mach-sunxi/board.c 中默认配置串口好像是PE2\PE3,对于后面的6 是什么意思,如何确定PE这个组呢
主要是想加uart3 作为输出
最近编辑记录 twzy (2022-08-29 17:09:39)
离线
@twzy
作为function
但是我改了,貌似不行。
离线
https://gitee.com/weiwei382-163-com/t113-s3-u-boot
该u-boot打印输出强制指定了串口,需要做如下修改,才能更换串口
离线
问一下,对于TF卡, boot0 和Uboot 分别写到哪个地方啊?
貌似仅支持nand
离线
你这就没跑起来吧,应该是烧录方法的问题,网上一大堆文章都是抄来抄去的,spl是不能用dd写的,我也不知道为什么,好像必须要sunxi_fel写的才行。
离线