[U-Boot] Unable to boot evb-ast2500

Joel Stanley joel at jms.id.au
Mon Aug 6 03:25:03 UTC 2018


Hello,

I am attempting to boot evb-ast2500 in Qemu before flashing it to a
system. It doesn't get past the DRAM step, due to getting stuck
endlessly looping in some libfdt code.

With some debugging turned on, I get this:

OF: translating address: 0040781e
OF: parent translation for: 00000000
OF: one level translation: 0040781e
OF: parent translation for: 00000000
OF: one level translation: 0040781e
OF: translating address: 00206e1e


U-Boot 2018.09-rc1-00096-gbb694d4e898b-dirty (Aug 06 2018 - 12:27:22 +0930)

Model: Aspeed BMC
DRAM:  OF: translating address: 00006e1e
OF: translating address: 00026e1e
OF: translating address: 0050781e
OF: parent translation for: 00000000
OF: one level translation: 0050781e
OF: parent translation for: 00000000
OF: one level translation: 0050781e
Watchdog timer expired.

And then the watchdog causes the system to reboot. The build is master
as of gbb694d4e898b, with the addition of some #define DEBUG.

I don't think this is a qemu issue. If it is, I can work on fixing
qemu, but I need some help on understanding what u-boot is doing.

There's a big pause before the U-Boot banner, and again after showing
'DRAM: 'before getting any of the OF messages. If I get gdb to show me
a backtrace at this point:

#0  0x0001e858 in __fswab32 (x=<optimised out>) at
include/linux/byteorder/swab.h:114
#1  fdt_offset_ptr (fdt=fdt at entry=0x39370, offset=offset at entry=6444,
len=len at entry=4)
    at lib/libfdt/../../scripts/dtc/libfdt/fdt.c:86
#2  0x0001e9b4 in fdt_next_tag (fdt=fdt at entry=0x39370,
startoffset=startoffset at entry=6440,
    nextoffset=0x1e726d44, nextoffset at entry=0x1e726d3c)
    at lib/libfdt/../../scripts/dtc/libfdt/fdt.c:120
#3  0x0001eae4 in fdt_next_node (fdt=fdt at entry=0x39370, offset=6440,
depth=0x1e726d5c,
    depth at entry=0x1e726d54) at lib/libfdt/../../scripts/dtc/libfdt/fdt.c:176
#4  0x000205cc in fdt_supernode_atdepth_offset (fdt=0x39370,
nodeoffset=14748, supernodedepth=0,
    nodedepth=0x0 <_start>) at lib/libfdt/fdt_ro.c:443
#5  0x00011608 in ofnode_get_parent (node=..., node at entry=...) at
include/dm/ofnode.h:94
#6  0x000113dc in regmap_init_mem (node=..., mapp=0x0 <_start>,
mapp at entry=0x1e726dbc)
    at drivers/core/regmap.c:63
#7  0x000014e0 in ast2500_sdrammc_ofdata_to_platdata (dev=0x1e7273c4)
at include/dm/read.h:38
#8  0x0000fc88 in device_probe (dev=dev at entry=0x1e7273c4) at
drivers/core/device.c:399
#9  0x000108c0 in uclass_get_device_tail (dev=0x1e7273c4,
ret=<optimised out>, devp=0x1e726e0c)
    at drivers/core/uclass.c:397
#10 0x00010900 in uclass_get_device (id=id at entry=UCLASS_RAM,
index=index at entry=0,
    devp=0x1e726e0c, devp at entry=0x1e726e04) at drivers/core/uclass.c:413
#11 0x00001ab0 in dram_init () at arch/arm/mach-aspeed/ast2500-board.c:69
#12 0x0001b834 in initcall_run_list
(init_sequence=init_sequence at entry=0x29344 <init_sequence_f>)
    at lib/initcall.c:30
#13 0x0000854c in board_init_f (boot_flags=<optimised out>) at
common/board_f.c:900
#14 0x00000664 in _main () at arch/arm/lib/crt0.S:86

Cheers,

Joel

--

To reproduce in qemu, build qemu master for ARM:

git://git.qemu-project.org/qemu && cd qemu
./configure --target-list=arm-softmmu
make

build a 32MB image from u-boot.bin:

dd if=/dev/zero of=test.img bs=1M count=32
dd if=u-boot.bin of=test.img conv=notrunc

boot it:

arm-softmmu/qemu-system-arm -M ast2500-evb -m 512 -nographic -drive
file=test.img,format=raw,if=mtd -serial stdio -monitor pty


More information about the U-Boot mailing list