@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'
@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'
上述问题找到了
'/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文件替换配置的文件就行
有了新的问题
在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就没问题
请问有可能是哪的问题
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 !
@mangogeek opensbi的串口不知道在哪改, 只改了device/configs/chips/d1s/configs/$BOARD_NAME/的uboot-board.dts 和 sys_config.fex中的关于串口和sd卡的部分
sdk2.0 , 板子是麻雀, 修改了sys_config.fex以及uboot.dts
boot0, uboot, 内核都能正常启动, 唯独opensbi没有打印
我看opensbi中关于console的部分只有查找port_num
[339]Entry_name = opensbi
[342]Entry_name = u-boot
[346]Entry_name = dtb
[348]mmc not para
[350]Jump to second Boot.
[352]opensbi_base is 1107034112, uboot_base is 110729625
U-Boot 2018.05-g24521d6-config-dirty (Mar 14 2022 - 21:55:34 +0800) Allwinner Technology
[00.366]DRAM: 64 MiB
[00.368]Relocation Offset is: 01ee7000
[00.373]secure enable bit: 0
[00.375]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.381]flash init start
[00.384]workmode = 0,storage type = 1
[00.387][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.392][mmc]: get sdc_type fail and use default host:tm1.
[00.399][mmc]: can't find node "mmc0",will add new node
[00.404][mmc]: fdt err returned <no error>
[00.407][mmc]: Using default timing para
[00.411][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.437][mmc]: card_caps:0x3000000a
[00.440][mmc]: host_caps:0x3000003f
[00.445]sunxi flash init ok
[00.448]line:703 init_clocks
[00.451]drv_disp_init
fdt_getprop_u32 s_pwm.pwm-base fail
[00.467]drv_disp_init finish
[00.469]boot_gui_init:start
[00.472]set disp.dev2_output_type fail. using defval=0
[00.478]boot_gui_init:finish
partno erro : can't find partition bootloader
54 bytes read in 1 ms (52.7 KiB/s)
[00.501]bmp_name=bootlogo.bmp size 38454
38454 bytes read in 3 ms (12.2 MiB/s)
[00.521]Loading Environment from SUNXI_FLASH... OK
[00.541]out of usb burn from boot: not need burn key
[00.569]Item0 (Map) magic is bad
[00.572]the secure storage item0 copy0 magic is bad
[00.600]Item0 (Map) magic is bad
[00.603]the secure storage item0 copy1 magic is bad
[00.607]Item0 (Map) magic is bad
partno erro : can't find partition private
root_partition is rootfs
set root to /dev/mmcblk0p5
[00.622]update part info
[00.625]update bootcmd
[00.628]change working_fdt 0x42aa6da0 to 0x42a86da0
disable nand error: FDT_ERR_BADPATH
No reserved memory region found in source FDT
[00.658]LCD open finish
[00.660]update dts
noncached_alloc(): addr = 0x42c8a080
noncached_alloc(): addr = 0x42c8a0c0
noncached_alloc(): addr = 0x42c8a100
noncached_alloc(): addr = 0x42c8a940
geth_sys_init:634: get node 'gmac0' error
geth_sys_init fail!
[00.681]Board Net Initialization Failed
[00.684]No ethernet found.
Hit any key to stop autoboot: 0
[01.986]no vendor_boot partition is found
Android's image name: d1s-bloath
Detect comp none
[02.003]
Starting kernel ...
[02.005][mmc]: MMC Device 2 not found
[02.009][mmc]: mmc 2 not find, so not exit
Linux version 5.4.61 (bloath@ubuntu) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #4 PREEMPT Sat Mar 12 03:46:26 UTC 2022
Zone ranges:
DMA32 [mem 0x0000000040000000-0x0000000043ffffff]
Normal empty
请问如何调试, 第一次接触risc-v