riscv-software-src / riscv-software-src/opensbi

boot error while loading andriod kernel image.

Open
#226 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm trying to boot android kernel from u-boot but stuck with sbi_trap_error: hart1: trap handler failed (error -2), find the following procedure with error.

=> setenv ipaddr 10.168.1.76
=> setenv netmask 255.255.252.0
=> setenv serverip 10.168.1.25
=> setenv gateway 10.168.1.1
=> tftpboot ${kernel_addr_r} vmlinux
ethernet@10090000: PHY present at 0
ethernet@10090000: Starting autonegotiation...
ethernet@10090000: Autonegotiation complete
ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x3800)
Using ethernet@10090000 device
TFTP from server 10.168.1.25; our IP address is 10.168.1.76
Filename 'vmlinux'.
Load address: 0x84000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#########################################=> booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
Moving Image from 0x84000000 to 0x80000000, end=180f30002
sbi_trap_error: hart1: trap handler failed (error -2)
sbi_trap_error: hart1: mcause=0x0000000000000007 mtval=0x0000000080000000
sbi_trap_error: hart1: mepc=0x00000000fff7c818 mstatus=0x8000000a00006800
sbi_trap_error: hart1: ra=0x00000000fff7d8c6 sp=0x00000000ff755970
sbi_trap_error: hart1: gp=0x00000000ff75ae30 tp=0x0000000000000001
sbi_trap_error: hart1: s0=0x0000000084000000 s1=0x0000000000000000
sbi_trap_error: hart1: a0=0x0000000080000000 a1=0x0000000084000000
sbi_trap_error: hart1: a2=0x00010102464c457f a3=0x0000000000000000
sbi_trap_error: hart1: a4=0x0000000100f30002 a5=0xffffffe000000000
sbi_trap_error: hart1: a6=0x0000000000000040 a7=0x00000000010946f8
sbi_trap_error: hart1: s2=0x0000000000000003 s3=0x0000000000000000
sbi_trap_error: hart1: s4=0x0000000000000000 s5=0x00000000fffe5b60
sbi_trap_error: hart1: s6=0x00000000ff771f28 s7=0x00000000ff76e360
sbi_trap_error: hart1: s8=0x0000000000000000 s9=0x0000000000000000
sbi_trap_error: hart1: s10=0x0000000000000000 s11=0x0000000000000000
sbi_trap_error: hart1: t0=0x0000000180f2ff83 t1=0x0038004000000001
sbi_trap_error: hart1: t2=0x001a001b00400004 t3=0x0000000500000001
sbi_trap_error: hart1: t4=0x0000000000001000 t5=0xffffffe000000000
sbi_trap_error: hart1: t6=0x0000000080000000########################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###############
2 MiB/s
done
Bytes transferred = 17386936 (1094db8 hex)
=> tftpboot ${ramdisk_addr_r} ramdisk.img
ethernet@10090000: PHY present at 0
ethernet@10090000: Starting autonegotiation...
ethernet@10090000: Autonegotiation complete
ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x3800)
Using ethernet@10090000 device
TFTP from server 10.168.1.25; our IP address is 10.168.1.76
Filename 'ramdisk.img'.
Load address: 0x88300000
Loading: #
14.6 KiB/s
done
Bytes transferred = 62 (3e hex)
=> tftpboot ${fdt_addr_r} hifive-unleashed-a00.dtb
ethernet@10090000: PHY present at 0
ethernet@10090000: Starting autonegotiation...
ethernet@10090000: Autonegotiation complete
ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x3800)
Using ethernet@10090000 device
TFTP from server 10.168.1.25; our IP address is 10.168.1.76
Filename 'hifive-unleashed-a00.dtb'.
Load address: 0x88000000
Loading: #
844.7 KiB/s
done
Bytes transferred = 6055 (17a7 hex)
=> booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
Moving Image from 0x84000000 to 0x80000000, end=180f30002
sbi_trap_error: hart1: trap handler failed (error -2)
sbi_trap_error: hart1: mcause=0x0000000000000007 mtval=0x0000000080000000
sbi_trap_error: hart1: mepc=0x00000000fff7c818 mstatus=0x8000000a00006800
sbi_trap_error: hart1: ra=0x00000000fff7d8c6 sp=0x00000000ff755970
sbi_trap_error: hart1: gp=0x00000000ff75ae30 tp=0x0000000000000001
sbi_trap_error: hart1: s0=0x0000000084000000 s1=0x0000000000000000
sbi_trap_error: hart1: a0=0x0000000080000000 a1=0x0000000084000000
sbi_trap_error: hart1: a2=0x00010102464c457f a3=0x0000000000000000
sbi_trap_error: hart1: a4=0x0000000100f30002 a5=0xffffffe000000000
sbi_trap_error: hart1: a6=0x0000000000000040 a7=0x00000000010946f8
sbi_trap_error: hart1: s2=0x0000000000000003 s3=0x0000000000000000
sbi_trap_error: hart1: s4=0x0000000000000000 s5=0x00000000fffe5b60
sbi_trap_error: hart1: s6=0x00000000ff771f28 s7=0x00000000ff76e360
sbi_trap_error: hart1: s8=0x0000000000000000 s9=0x0000000000000000
sbi_trap_error: hart1: s10=0x0000000000000000 s11=0x0000000000000000
sbi_trap_error: hart1: t0=0x0000000180f2ff83 t1=0x0038004000000001
sbi_trap_error: hart1: t2=0x001a001b00400004 t3=0x0000000500000001
sbi_trap_error: hart1: t4=0x0000000000001000 t5=0xffffffe000000000
sbi_trap_error: hart1: t6=0x0000000080000000

Thanks & Regards
Ghalib Khan.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified. Start by reproducing the supplied U-Boot booti sequence with the listed kernel, ramdisk, and device-tree addresses, then inspect the OpenSBI trap output and image sizes; done means identifying the boot failure and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.