Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    求教,D1s uboot烧写问题。

    D1系列-RISC-V
    3
    17
    207
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      siguadao LV 4 last edited by

      【芯片】D1s
      【需求】在uboot中增加屏幕驱动。
      【问题】uboot烧写失败,准确地说是没起作用。
      【描述】
      1、进入~/lichee/brandy-2.0/u-boot-2018,修改所需代码。为了验证uboot已经更新,特意修改了一句打印。
      2、编译uboot。尝试使用了两种方式来编译:在uboot目录下使用muboot;在SDK根目录下使用make。两种方式下,编译完成之后在~/lichee/brandy-2.0/u-boot-2018查看u-boot.bin,时间是有更新的。
      3、打包,根目录下使用pack命令打包。
      4、烧写。尝试使用了两种方式来烧写,全盘擦除烧写和单独分区烧写,如图:
      a2040311-dbe9-4b8d-855c-86706cca2595-image.png
      ea0d79a9-03be-4431-81e5-4cd2d893bb04-image.png
      烧写成功之后,设备上电,查看开机打印过程,发现并没有所加的打印信息,uboot没有成功更新。

      求教各位,这个uboot应该怎么烧写?谢谢。

      W 1 Reply Last reply Reply Quote Share 0
      • W
        whycan晕哥 LV 9 @siguadao last edited by

        @siguadao
        只烧 uboot 对吧?

        S 1 Reply Last reply Reply Quote Share 0
        • S
          siguadao LV 4 @whycan last edited by

          @whycan
          是的,请晕哥指教🙏

          W 1 Reply Last reply Reply Quote Share 0
          • W
            whycan晕哥 LV 9 @siguadao last edited by

            @siguadao
            如果全部烧录,uboot有更新吗?

            S 1 Reply Last reply Reply Quote Share 0
            • S
              siguadao LV 4 @whycan last edited by

              @whycan
              没有,不管是全盘擦除烧写还是分区烧写都没有更新。

              1 Reply Last reply Reply Quote Share 0
              • W
                whycan晕哥 LV 9 last edited by

                @siguadao
                看下修改过的 .c文件有没有生成 .o 文件。

                S 1 Reply Last reply Reply Quote Share 0
                • S
                  siguadao LV 4 @whycan last edited by

                  @whycan
                  有的。
                  在~/lichee/brandy-2.0/u-boot-2018/drivers/mtd/awnand/spinand/physic目录下,我修改了id.c文件里的一条打印来做验证,如下:

                  static int aw_spinand_info_init(struct aw_spinand_chip *chip,
                  		struct aw_spinand_phy_info *pinfo)
                  {
                          ......
                  	pr_info("========== arch info 123 ==========\n");
                  

                  编译完之后.o文件有更新(昨天修改的):
                  937898d4-c4c3-43d3-96d1-2b0a83890236-image.png
                  但是烧写完成后,查看串口输出信息,打印的仍然是:

                  sunxi-spinand-phy: ========== arch info ==========
                  
                  W 1 Reply Last reply Reply Quote Share 0
                  • W
                    whycan晕哥 LV 9 @siguadao last edited by

                    @siguadao
                    确认一下打包有没有成功,确认烧录的镜像文件是否是本次打包的文件。

                    S 1 Reply Last reply Reply Quote Share 0
                    • S
                      siguadao LV 4 @whycan last edited by

                      @whycan
                      执行pack命令之后是没有报错的,且烧录的镜像文件确定没问题。
                      有什么办法可以确定镜像文件中包含的uboot就是我刚刚编译出来的uboot吗?

                      W 1 Reply Last reply Reply Quote Share 0
                      • xiaowenge
                        DOT小文哥 LV 8 last edited by

                        编出来的uboot好像要手动复制到打包固件的目录下

                        S 1 Reply Last reply Reply Quote Share 0
                        • W
                          whycan晕哥 LV 9 @siguadao last edited by

                          @siguadao

                          out/d1-nezha/image/u-boot.fex
                          lichee/brandy-2.0/u-boot-2018/u-boot-dtb.bin
                          lichee/brandy-2.0/u-boot-2018/u-boot.bin
                          lichee/brandy-2.0/u-boot-2018/u-boot-sun20iw1p1.bin
                          lichee/brandy-2.0/u-boot-2018/u-boot-nodtb.bin
                          
                          S 1 Reply Last reply Reply Quote Share 0
                          • S
                            siguadao LV 4 @xiaowenge last edited by

                            @xiaowenge
                            请问是手动拷贝到哪里呢?
                            我查看了下uboot编译过程,貌似是自动会拷贝到如下目录:

                            'u-boot.bin' -> 'u-boot-sun20iw1p1.bin'
                            'u-boot-sun20iw1p1.bin' -> './../../../device/config/chips/d1s/bin/u-boot-sun20iw1p1.bin'
                            
                            1 Reply Last reply Reply Quote Share 0
                            • S
                              siguadao LV 4 @whycan last edited by

                              @whycan
                              今天中午整个out目录删除掉,重新编译、打包、升级了一遍,问题依旧。

                              ysc@harvey-ubuntu:~/tina_d1_open_v2_0602/out/d1s-nezha/image$ ll u-boot.fex 
                              -rwxr--r-- 1 ysc ysc 933888  3月  2 14:35 u-boot.fex*
                              

                              直接打开u-boot.fex文件查看其内容,发现内容是已经修改过了的(1234那个打印):

                                  sunxi-spinand-phy: detect spinand id: %x %x
                                  sunxi-spinand-phy: ========== arch info 1234 ==========
                                      sunxi-spinand-phy: Model:               %s
                              

                              有没有可能是我的烧写工具的问题?当前使用的工具是这个版本:
                              8f6b283e-d0a1-4a62-a371-19a971527a5c-image.png

                              1 Reply Last reply Reply Quote Share 0
                              • W
                                whycan晕哥 LV 9 last edited by

                                @siguadao
                                板子是不是有卡, 还有flash?

                                S 1 Reply Last reply Reply Quote Share 0
                                • S
                                  siguadao LV 4 @whycan last edited by

                                  @whycan
                                  没有外插内存卡,只是板子还贴了一片512MB的flash。

                                  1 Reply Last reply Reply Quote Share 0
                                  • W
                                    whycan晕哥 LV 9 last edited by

                                    @siguadao
                                    那换一张TF卡吧

                                    S 1 Reply Last reply Reply Quote Share 0
                                    • S
                                      siguadao LV 4 @whycan last edited by

                                      @whycan
                                      感觉和内存卡应该没关系。
                                      直接打开最后打包好的img文件,查找修改的那行打印,发现竟然有三行:

                                      行7465:========== arch info 1234 ==========
                                      行19154:========== arch info 1234 ==========
                                      行78268:========== arch info ==========
                                      

                                      这个pack流程有详细介绍的么?为什么一个升级包里面会含有三个uboot的代码部分?

                                      1 Reply Last reply Reply Quote Share 0
                                      • 1 / 1
                                      • First post
                                        Last post

                                      Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                                      行为准则 | 用户协议 | 隐私权政策