Navigation

    全志在线开发者论坛

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

    如何在uboot阶段加载R核

    T Series
    1
    3
    786
    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.
    • B
      bloath LV 3 last edited by

      1. 在lunch_rtos并且mrtos后, 再如何通过./build.sh pack打包到镜像中
      2. 根据文档, 加入riscv的分区, 但是在打包时好像没生效

      AddPartion boot-resource.fex BOOT-RESOURCE_FEX
      AddPartion very boot-resource.fex BOOT-RESOURCE_FEX
      FilePath: boot-resource.fex
      FileLength=98d400
      AddPartion env.fex ENV_FEX000000000
      AddPartion very env.fex ENV_FEX000000000
      FilePath: env.fex
      FileLength=20000
      AddPartion boot.fex BOOT_FEX00000000
      AddPartion very boot.fex BOOT_FEX00000000
      FilePath: boot.fex
      FileLength=171c000
      AddPartion rootfs.fex ROOTFS_FEX000000
      AddPartion very rootfs.fex ROOTFS_FEX000000
      FilePath: rootfs.fex
      FileLength=21a0ee44
      BuildImg0
      Dragon execute image.cfg SUCCESS !

      B 1 Reply Last reply Reply Quote Share 0
      • B
        bloath LV 3 @bloath last edited by

        上述问题找到了

        1. ./build.sh pack打包的时候有
        '/home/t527/bsp/V1.0_AIOT/device/config/chips/t527/configs/demo_linux_aiot/bin/amp_rv0.bin' -> '/home/t527/bsp/V1.0_AIOT/out/t527/demo_linux_aiot/pack_out/amp_rv0.fex'
        

        bin文件替换配置的文件就行

        1. 文档上说是修改linux-5.15下面的sys_partition.fex, 应该修改buildroot下面的sys_partition.fex

        有了新的问题
        在linux端加载的好用的r核, 把他下面的bin拷贝到device/config/chips/t527/configs/demo_linux_aiot/bin/amp_rv0.bin, 在uboot中

        sunxi_flash read 45000000 riscv0
        bootrv 45000000 0 0 
        

        报错

        temporary mem: 0x45000000+0x0
        data abort
        pc : [<bfee7298>]          lr : [<bfee71bb>]
        reloc pc : [<4a04f298>]    lr : [<4a04f1bb>]
        sp : bbe14b40  ip : 00000085     fp : 00000000
        r10: 00000002  r9 : bbe77e50     r8 : bff7a408
        r7 : 00000040  r6 : 00000013     r5 : c6930005  r4 : 45000000
        r3 : c69445c5  r2 : bff1b002     r1 : bff7a408  r0 : 45000000
        Flags: nzCv  IRQs on  FIQs off  Mode SVC_32
        Code: 0500eb02 2303fb07 44034a14 691bbf0c (2e01699b)
        

        使用bsp自带的amp_rv0就没问题
        请问有可能是哪的问题

        B 1 Reply Last reply Reply Quote Share 1
        • B
          bloath LV 3 @bloath last edited by

          @bloath 上述问题找到了

          需要在板级配置里, 设置LICHEE_RTOS_PROJECT_NAME, 使用build.sh rtos就可以编译了, 关键的一步在

          '$BSP/rtos/lichee/rtos/build/$BOARD/img/rt_system.elf' -> '$BSP/device/config/chips/t527/configs/$BOARD/bin/amp_rv0.bin'
          
          1 Reply Last reply Reply Quote Share 1
          • 1 / 1
          • First post
            Last post

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

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