您尚未登录。

楼主 #1 2018-09-06 22:16:11

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

@assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

QQ20180906221431.png

地址: svn://oslife.top/f1c100s/release/bootloader/u-boot
地址: svn://release.lenrek.cn/f1c100s/release/bootloader/u-boot
账号: user
密码: userpasswd


svn命令下载:

svn checkout svn://oslife.top/f1c100s/release/bootloader/u-boot --username user
svn checkout svn://release.lenrek.cn/f1c100s/release/bootloader/u-boot --username user

然后输入密码: userpasswd 即可!









2019-06-08 修改:
--------------------------------------------
域名改为: release.lenrek.cn




2019-06-13 更新:
--------------------------------------
源码本站打包下载: u-boot-lenrek.tgz





离线

#2 2018-11-02 13:40:31

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

这个uboot支持spi nand flash吗?16MB的太小了,想换128MB的,内核啥的是不是不用变呀?
现在泽畔的linux支持nand吗??

最近编辑记录 迪卡 (2018-11-02 13:42:12)

离线

楼主 #3 2018-11-02 13:47:27

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

这个u-boot 支持 spi nand

这个目录下面 svn://oslife.top/f1c100s/release  有一个sunxi-fel 二进制可执行文件支持spi nand

linux4.19 直接支持 spi nand: https://whycan.cn/t_1672.html#p10579





离线

楼主 #4 2018-11-02 17:43:17

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

你可以先用 tf 卡启动 linux4.19, 把spi nand 先跑起来,看能否读写 nand 分区,文件系统是否正常。





离线

#5 2018-11-08 11:06:12

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

晕哥,尝试编译完的,烧录到tf卡进去未果......

首先将百度网盘Nano_pub_V4/image里的Nano_tf_800480.dd烧进tf卡,测试可以启动。
然后将我编译好的u-boot-sunxi-with-spl.bin 

sudo dd if=/dev/zero of=/dev/sdb bs=1024 seek=8 count=512
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 
sync


插上TF卡,启动效果如下:只有三行..就停住了

U-Boot SPL 2018.01-svn89 (Nov 06 2018 - 21:25:01)
DRAM: 32 MiB
Trying to boot from sunxi SPI

不会上传图片....用文字吧



还有使用sunxi-fel直接ram中运行uboot。
sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin

串口信息如下

U-Boot SPL 2018.01-svn89 (Nov 06 2018 - 21:25:01)
DRAM: 32 MiB
Trying to boot from FEL


U-Boot 2018.01-svn89 (Nov 06 2018 - 21:25:01 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SPI-NAND type mfr_id: ef, dev_id: aa is not in id table.
SPI-NAND: W25N01GV is found.
*** Warning - spi_flash_read() failed, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SPI-NAND type mfr_id: ef, dev_id: aa is not in id table.
SPI-NAND: W25N01GV is found.
SPI-NAND: 2490368 bytes @ 0x80000 Read: ERROR
Unknown command 'sf' - try 'help'
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>

离线

楼主 #6 2018-11-08 11:26:24

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

mfr_id: ef, dev_id: aa is not in id table.

上面这个 id 没有在 flash id 数组里面,  你添加一下,重新编译看下效果.


发图片的方法: https://whycan.cn/t_588.html





离线

#7 2018-11-08 13:38:53

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

晕哥 说:

mfr_id: ef, dev_id: aa is not in id table.

上面这个 id 没有在 flash id 数组里面,  你添加一下,重新编译看下效果.

晕哥,如何添加id呀.....百度了一圈...搜到了说是要改uboot/driver/mtd/jedec_flash.c
不知道对不对....改完以后,重新编译没啥反应....
有相关参考的资料吗???

离线

楼主 #8 2018-11-08 14:04:06

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

打开 u-boot/drivers/mtd/spi-nand/spi-nand-base.c

static struct spi_nand_flash spi_nand_table[] = {
    SPI_NAND_INFO("GD5F1GQ4UAYIG", 0xC8, 0xF1, 2048, 64, 64, 1024,
            1, 1, 0 | SPINAND_USED_GIGADEVICE),
    SPI_NAND_INFO("GD5F1GQ4UBYIG", 0xC8, 0xD1, 2048, 64, 64, 1024,
            1, 1, 0 | SPINAND_USED_GIGADEVICE),
    SPI_NAND_INFO("MT29F2G01AAAED", 0x2C, 0x22, 2048, 64, 64, 2048,
            1, 1, SPINAND_NEED_PLANE_SELECT),
    SPI_NAND_INFO("MT29F4G01AAADD", 0x2C, 0x32, 2048, 64, 64, 4096,
            1, 1, SPINAND_NEED_PLANE_SELECT),
    SPI_NAND_INFO("MT29F4G01ABAGD", 0x2C, 0x36, 2048, 128, 64, 2048,
            2, 8, SPINAND_NEED_PLANE_SELECT | SPINAND_NEED_DIE_SELECT),
    SPI_NAND_INFO("MT29F2G01ABAGD", 0x2C, 0x24, 2048, 128, 64, 2048,
            1, 8, SPINAND_NEED_PLANE_SELECT),
    {.name = NULL},
};

在这里修改.





离线

#9 2018-11-08 15:13:17

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

填写完毕:效果如下:
1.png
重新将编译好的uboot使用sunxi-fel在ram中运行
sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin
效果如下,可以识别到了,但CRC错误...
2.png

离线

楼主 #10 2018-11-08 15:15:03

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

是环境变量(bootcmd, bootargs ...)CRC错误, 可以不用管.





离线

#11 2018-11-08 15:18:22

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

迪卡 说:

填写完毕:效果如下:
https://whycan.cn/files/members/1228/1.png
重新将编译好的uboot使用sunxi-fel在ram中运行
sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin
效果如下,可以识别到了,但CRC错误...
https://whycan.cn/files/members/1228/2.png

将uboot烧到spi nand里或tf卡里,和上面是一样的

离线

楼主 #12 2018-11-08 15:20:22

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

迪卡 说:
迪卡 说:

填写完毕:效果如下:
https://whycan.cn/files/members/1228/1.png
重新将编译好的uboot使用sunxi-fel在ram中运行
sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin
效果如下,可以识别到了,但CRC错误...
https://whycan.cn/files/members/1228/2.png

将uboot烧到spi nand里或tf卡里,和上面是一样的

是的, 你还没有去写环境变量(u-boot执行saveenv命令),
所以u-boot读不到数据和CRC校验值,
所以显示一个警告而已。
就当没看到好了。





离线

#13 2018-11-08 15:42:26

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

3.png
把生成的u-boot-sunxi-with-spl.bin烧写进tf卡
sudo dd if=/dev/zero of=/dev/sdb bs=1024 seek=8 count=512
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
sync

上电效果如上图,还有用sunxi-fel烧进spi nand也是如此,可以说明...brom刚开始的校验没过.....
这.....

离线

楼主 #14 2018-11-08 16:02:07

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

迪卡 说:

https://whycan.cn/files/members/1228/3.png
把生成的u-boot-sunxi-with-spl.bin烧写进tf卡
sudo dd if=/dev/zero of=/dev/sdb bs=1024 seek=8 count=512
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
sync

上电效果如上图,还有用sunxi-fel烧进spi nand也是如此,可以说明...brom刚开始的校验没过.....
这.....

对比一下  W25N 和 GD 的区别改下源码,
建议先买 GD 的spi nand flash先测试.





离线

#15 2019-01-11 04:43:45

micro
会员
注册时间: 2019-01-11
已发帖子: 1
积分: 1

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

Hello,

How can I download frc100s uboot and linux bsp. svn link gives error for me. Is there any alternatif download link ?

Thanks,

Regards..

离线

#16 2019-01-11 14:37:26

monosail
会员
注册时间: 2019-01-06
已发帖子: 12
积分: 12

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

这个svn似乎连不上啊,好像域名过期了 @晕哥

离线

楼主 #17 2019-01-11 15:39:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

release.lenrek.cn

把域名替换一下,其他操作一样, @assert 断言哥的回复,我还没来得及测试





离线

#18 2019-01-11 17:59:42

monosail
会员
注册时间: 2019-01-06
已发帖子: 12
积分: 12

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

我试了,可以用

晕哥 说:

release.lenrek.cn

把域名替换一下,其他操作一样, @assert 断言哥的回复,我还没来得及测试

离线

#19 2019-01-14 19:34:26

qinxiongxu
会员
注册时间: 2018-12-13
已发帖子: 88
积分: 80.5

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

晕哥 说:

release.lenrek.cn

把域名替换一下,其他操作一样, @assert 断言哥的回复,我还没来得及测试

晕哥,这个uboot可以启动官方bsp linux是吧?

使用SPI Flash Boot是否还需要改写?

是否将编译出来的u-boot-sunxi-with-spl.bin文件直接替换掉BSP Linux这个路径下面的C600_Linux\tools\pack\chips\sunivw1p1\bin\u-boot-spinor-sunivw1p1.bin?

谢谢!

离线

楼主 #20 2019-01-14 19:38:20

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

使用方法在这里:  https://whycan.cn/t_1008.html





离线

#21 2019-01-14 19:42:09

qinxiongxu
会员
注册时间: 2018-12-13
已发帖子: 88
积分: 80.5

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

我试了编译出来的u-boot-sunxi-with-spl.bin替换掉BSP Linux这个路径下面的C600_Linux\tools\pack\chips\sunivw1p1\bin\u-boot-spinor-sunivw1p1.bin后u-boot没有起来。

离线

楼主 #22 2019-06-08 22:46:52

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

2019-06-08 修改:
--------------------------------------------
域名改为: release.lenrek.cn





离线

#23 2019-06-09 17:07:56

oayzw
会员
注册时间: 2019-04-08
已发帖子: 23
积分: 8

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

thanks.

离线

楼主 #24 2019-06-13 08:36:59

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

2019-06-13 更新:
--------------------------------------
源码本站打包下载: u-boot-lenrek.tgz





离线

#25 2019-12-11 18:43:40

hclydao
会员
注册时间: 2019-12-11
已发帖子: 2
积分: 2

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

晕哥 你修改过的sunxi-tool支持GD spi nand flash的源码能否提供参考一下,谢谢.

离线

#26 2019-12-11 19:37:15

达克罗德
会员
注册时间: 2018-04-10
已发帖子: 1,133
积分: 1085.5

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

这个uboot和主线uboot有什么区别?

离线

#27 2019-12-11 19:47:10

nuvoton
会员
注册时间: 2019-06-17
已发帖子: 59
积分: 59

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

达克罗德 说:

这个uboot和主线uboot有什么区别?

就是从主线u-boot改的, 支持spi nand启动.

离线

#28 2019-12-17 16:34:46

hclydao
会员
注册时间: 2019-12-11
已发帖子: 2
积分: 2

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

感觉各位大佬的分享,虽然还无法通过sunxi-fel直接写入spi nand但可以通过内存写入,目前W25N01G 128MB spi nandflash uboot启动成功
源码及记录分享链接: https://github.com/hcly/f1c100s

离线

#29 2019-12-17 16:38:37

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

hclydao 说:

感觉各位大佬的分享,虽然还无法通过sunxi-fel直接写入spi nand但可以通过内存写入,目前W25N01G 128MB spi nandflash uboot启动成功
源码及记录分享链接: https://github.com/hcly/f1c100s

这个更吊,围观

离线

#30 2020-03-18 13:07:58

zhouyu2019
会员
注册时间: 2019-11-07
已发帖子: 42
积分: 42

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

@晕哥,请问这个uboot能引导主线linux吗?我试了会卡在"Starting kernel...",不知道是要改uboot还是改kernel,能指点一下吗?谢谢!

离线

楼主 #31 2020-03-18 14:08:51

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

zhouyu2019 说:

@晕哥,请问这个uboot能引导主线linux吗?我试了会卡在"Starting kernel...",不知道是要改uboot还是改kernel,能指点一下吗?谢谢!

主线的你进置顶的精华帖里面找,有很多帖子





离线

#32 2020-03-18 14:19:26

zhouyu2019
会员
注册时间: 2019-11-07
已发帖子: 42
积分: 42

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

晕哥,在spi-flash上用主线uboot+主线linux是没问题的,我现在用的是spi-nand,所以只能用这个改版的uboot,内核就起不来了。

离线

楼主 #33 2020-03-18 14:28:03

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

zhouyu2019 说:

晕哥,在spi-flash上用主线uboot+主线linux是没问题的,我现在用的是spi-nand,所以只能用这个改版的uboot,内核就起不来了。

那你参考这个V3s openwrt @spi nand帖子: https://whycan.cn/t_3123.html

代码在这里: https://github.com/bhorn/openwrt/tree/dolphinpi-spinand





离线

#34 2020-03-29 09:33:22

zhouyu2019
会员
注册时间: 2019-11-07
已发帖子: 42
积分: 42

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

谢谢晕哥,总算启动成功了,对比了spi-flash的uboot,发现uboot在把设备树传给kernel之前会添加memory的节点(我自己生成的dtb里面没有memory节点),而spi-nand的uboot不会给设备树添加这个节点,于是我在dtb里面添加上去就好了。虽然不知道为什么会有这个区别,折腾了好久,一直以为是kernel的问题。

离线

楼主 #35 2020-03-29 09:49:21

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

@zhouyu2019 挺好, 方便分享一下修改部分吗?





离线

#36 2020-03-29 10:22:48

zhouyu2019
会员
注册时间: 2019-11-07
已发帖子: 42
积分: 42

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

我是在28楼的基础上进行调试的,也没修改太多东西:
1.设备树、内核、rootfs根据spi-nand的块大小对齐存放,也就是128K对齐;
2.设备树里面根据芯片容量和存放地址修改flash分区,并添加memory节点;
3.我用的是W25N01GV,发现uboot驱动中的“spi_nand_read_pages_fast”,接口读数据会出错,改用“spi_nand_read_pages”;

大概就这些,最重要的是想办法把数据写到spi nand里面,毕竟sunxi-fel是开源的,可以把uboot中的spi nand驱动及坏块管理移植上去。

离线

楼主 #37 2020-03-29 12:42:03

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

@zhouyu2019 感谢分享,有你真好。





离线

#38 2020-04-22 18:57:02

wammaw1314
会员
注册时间: 2020-04-22
已发帖子: 7
积分: 7

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

收藏本帖,目前正在新增使用spi nand flash,启动引导主线Linux 4.19,各种学习中。。。

离线

楼主 #39 2020-04-22 19:10:28

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

wammaw1314 说:

收藏本帖,目前正在新增使用spi nand flash,启动引导主线Linux 4.19,各种学习中。。。

这个帖子更有参考价值: https://whycan.cn/t_3123.html





离线

#40 2020-06-15 09:29:39

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

@hcly f1c100s 128MB W25N01G spi nand: https://github.com/hcly/f1c100s





离线

#41 2023-04-26 18:04:08

rocklee
会员
注册时间: 2023-04-25
已发帖子: 4
积分: 4

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

请问Trying to boot from sunxi SPI,这个问题解决了吗?

离线

#42 2023-04-27 09:39:03

rocklee
会员
注册时间: 2023-04-25
已发帖子: 4
积分: 4

Re: @assert 修改后的 f1c100s u-boot 开源了, 可以引导bsp linux

rocklee 说:

请问Trying to boot from sunxi SPI,这个问题解决了吗?


使用 https://github.com/hcly/f1c100s
这个可以了,注释GZYS_USBBURN的时候不用//,改用/**/
貌似是这个原因

离线

页脚

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

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