[U-Boot] qemu_mips - CONFIG_SYS_MONITOR_LEN is too small
Kyle Edwards
kyleedwardsny at gmail.com
Sun Apr 9 18:19:57 UTC 2017
Hi all,
I recently tried to use u-boot on the qemu_mips platform, and running
the saveenv command causes u-boot to not boot after a reset. I followed
these steps:
$ git clone git://git.denx.de/u-boot.git
$ cd u-boot
$ git checkout v2017.05-rc1
$ export CROSS_COMPILE=mips-linux-gnu-
$ make qemu_mips_defconfig
$ make
$ dd if=/dev/zero of=../flash.bin bs=1k count=4k
$ dd if=u-boot.bin of=../flash.bin bs=1k conv=notrunc
$ qemu-system-mips -nographic -M mips -pflash ../flash.bin
At this point I stopped autoboot, ran "saveenv" inside U-Boot, and reset
qemu. After reset, U-Boot did not print any messages, and is stuck.
I tracked this down to an invalid CONFIG_SYS_MONITOR_LEN. It's currently
configured for 196608 (192 << 10), but running "ls -l u-boot.bin" shows
a size of 232296. When the environment is being saved, it overwrites
part of the U-Boot code.
I am willing to write a patch for this bug, but I thought I would report
it here first.
Kyle
More information about the U-Boot
mailing list