From: Kyle Edwards Date: Sun, 9 Apr 2017 14:19:57 -0400 Subject: [U-Boot] qemu_mips - CONFIG_SYS_MONITOR_LEN is too small Message-ID: <22a0a787-0c4e-312d-354f-14029a87cdbb@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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