[FPGA开发] 诚心求大侠解惑,关于uboot、preloader、dtb

game_app   2015-10-30 20:50 楼主
linux小白一个,手头有一块arrow sockit的FPGA板子,有些问题一直没有搞明白,拜求大侠解惑,不胜感激!

1、什么情况下需要更新SD卡中uboot、preloader、dtb?
     比如说在HPS-FPGA桥上新增了一个信号处理的定制外设,是否需要更新uboot、preloader、dtb?

2、uboot、preloader和dtb是不是针对不同的开发板定制的还是针对不同SoC芯片定制的?
     上述三个文件针对terrasic、altera及heli等板子是不是不同的?

3、什么情况下需要编写设备驱动?
     比如在FPGA端通过ADC进行数据采集,然后通过FPGA-HPS桥写入HPS中,这个过程需不需要写驱动程序?
     为什么点亮LED的程序只需要使用内存映射就可以了,而不用写驱动程序?

4、参考相关教程,本文重新编译了preloader,但是一直没有调通,麻烦哪位大侠给看一下!
    (1)软件版本是13.1,操作系统是win7
    (2)Qsys 添加led_pio,点击generate;
    (3)quartus 综合,生成sof和rbf文件;
    (4)bsp-editor新建BSP,生成settings.bsp;
    (5)进入目录spl_bsp, make出u-boot-spl.bin;
    (6)通过 mkpimage -o preloader_with_header.img u-boot-spl.bin生成preloader.img
    (7)在linux下通过dd命令写入SD卡
    (8)putty结果如下:
         
U-Boot 2012.10 (Mar 29 2013 - 12:54:06)
CPU   : Altera SOCFPGA Platform
BOARD : Altera SOCFPGA Cyclone 5 Board
DRAM:  1 GiB
MMC:   DESIGNWARE SD/MMC: 0
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
MMC init failed
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address
Hit any key to stop autoboot:  0
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
** Bad device mmc 0 **
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
ERROR: dw_pull: stat 0x200
request failed. status: 0x00000200
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
SOCFPGA_CYCLONE5 # CPU   : Altera SOCFPGA Platform
Unknown command 'CPU' - try 'help'
SOCFPGA_CYCLONE5 # BOARD : Altera SOCFPGA Cyclone 5 Board
Unknown command 'BOARD' - try 'help'
SOCFPGA_CYCLONE5 # DRAM:  1 GiB
Unknown command 'DRAM:' - try 'help'
SOCFPGA_CYCLONE5 # MMC:   DESIGNWARE SD/MMC: 0
Unknown command 'MMC:' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # MMC init failed
Unknown command 'MMC' - try 'help'
SOCFPGA_CYCLONE5 # Using default environment
Unknown command 'Using' - try 'help'
SOCFPGA_CYCLONE5 #
Unknown command 'Using' - try 'help'
SOCFPGA_CYCLONE5 # In:    serial
Unknown command 'In:' - try 'help'
SOCFPGA_CYCLONE5 # Out:   serial
Unknown command 'Out:' - try 'help'
SOCFPGA_CYCLONE5 # Err:   serial
Unknown command 'Err:' - try 'help'
SOCFPGA_CYCLONE5 # Net:   mii0
Unknown command 'Net:' - try 'help'
SOCFPGA_CYCLONE5 # Warning: failed to set MAC address
Unknown command 'Warning:' - try 'help'
SOCFPGA_CYCLONE5 #
Unknown command 'Warning:' - try 'help'
SOCFPGA_CYCLONE5 # Hit any key to stop autoboot:  0
Unknown command 'Hit' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ** Bad device mmc 0 **
Unknown command '**' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: dw_pull: stat 0x200
Unknown command 'ERROR:' - try 'help'
SOCFPGA_CYCLONE5 # request failed. status: 0x00000200
Unknown command 'request' - try 'help'
SOCFPGA_CYCLONE5 # ** Bad device mmc 0 **
Unknown command '**' - try 'help'
SOCFPGA_CYCLONE5 # Wrong Image Format for bootm command
Unknown command 'Wrong' - try 'help'
SOCFPGA_CYCLONE5 # ERROR: can't get kernel image!
> SOCFPGA_CYCLONE5 #
  

拜托拜托了,这段时间快被折腾死了!

回复评论 (8)

不懂帮顶
分享铸就美好未来。。。
点赞  2015-10-31 13:50
帮顶
<IMG src="http://ip.happybobby.com/sign.png" >
点赞  2015-11-1 14:14
多谢帮顶的朋友们!
点赞  2015-11-1 23:34
我也很想知道这些问题
点赞  2015-11-2 09:52
不懂帮顶,最近准备研究一下楼主说的几个问题,依稀记得去年被这个问题虐的死去活来,后来没办法直接用的官网现成的Linux系统。哎,,,,
点赞  2015-11-2 11:02
我也刚开始弄,很想知道。请陈版主出来解疑答惑吧@chenzhufly
点赞  2015-11-2 15:33
1、uboot、preloader、dtb这些是做什么的你要搞清楚。
     uboot:是引导操作系统的,一般的开发板都已经有编译好了的镜像,不需要改变,就算改变有可能是改变环境变量。
     preloader:是确定最开始启动的,可以把它理解为引导uboot。
     dtb:是linux系统运行后,确定有哪些外设在系统上的,配置文件。
2、肯定不同,同一块板子,你选的启动方式不同,这些也不同。我建议你uboot、preloader用开发板提供的,dtb用自己的。
3、启动方式的不同,这也有些不同;
假设你是hps先 启动,然后用uboot(假设在nand中) 去启动FPGA,那么你将外设编译好的XX.rbf文件放到对应的nand中,然后在linux下开发对应的驱动程序。
另外一种就是HPS和FPGA同时启动,你把FPGA(主动串行)配置放到EPS中就OK。然后就和ARM开发一样的。
4、首先你确定的硬件的启动配置,在来更改preloader。

估计你是刚开始接触,先不要想着一步一步的来,首先让系统运行起来(参考开发板的资料),在增加FPGA,编写对应的linux驱动。
点赞  2016-2-23 13:15
1、socFPGA系统结构里,增加了设备,通信端口的改变,等都要更新uboot,preloader,dtb,
2、uboot,preloader,dtb是由FPGA工程师生存的,同软件工程师没关系。
3、自定义的设备要写驱动
流媒体后视镜fpga方案    
点赞  2016-2-23 16:42
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复