How to debug HW startup?

Stefan Roese sr at denx.de
Fri Jan 10 07:31:07 CET 2020


Hi Mauro,

On 09.01.20 18:28, Mauro Condarelli wrote:
> I managed to brick my target.
> 
> Situation:
> I have a board with a paleolithic (1.1.3) version of u-boot.
> I had been testing by loading in ram from USB:
>      usb reset; fatload usb 0 80010000 u-boot.bin; go 80010000
> and everything was ok.
> I changed a few settings (both defconfigs are attached below)
> and tried "the real thing"
> Unfortunately reflashing the actual boot produced a brick.
> It does not utter a single byte.

Ugh. Too bad.
  
> I will have to reflash the original using an external apparatus
> (which I don't have here, so I'll have to take target to another
> location, probably tomorrow morning), but question is:
> how do I debug such a situation?

To debug very early problems, I suggest to use the DEBUG_UART interface
in U-Boot. I also used it quite a lot before - also on this platform.

Please see:

include/debug_uart.h:

	debug_uart_init();
	printhex8(0x01);
	...

When using UART2 on the MT7628 please make sure to configure the pin
mux before using the debug uart. Otherwise nothing will get printed.

BTW: This might also be a problem on your board, if you use UART2 and
the muxing is not done no output will occur.

> What could I have done so wrong?
> 
> As You can see I changed only a few settings:
> 
> --- configs/vocore_vocore2-ram_defconfig    2020-01-09
> 16:11:12.568096050 +0100
> +++ configs/vocore_vocore2_defconfig    2020-01-09 16:07:10.528267378 +0100
> @@ -1,9 +1,12 @@
>   CONFIG_MIPS=y
> -CONFIG_SYS_TEXT_BASE=0x80010000
> +CONFIG_SYS_TEXT_BASE=0x9c000000
>   CONFIG_ENV_SIZE=0x00001000
>   CONFIG_NR_DRAM_BANKS=1
>   CONFIG_ARCH_MTMIPS=y
>   CONFIG_BOARD_VOCORE2=y
> +CONFIG_BOOT_ROM=y
> +CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y
> +CONFIG_ONBOARD_DDR2_CHIP_WIDTH_16BIT=y
>   CONFIG_MIPS_BOOT_FDT=y
>   CONFIG_ENV_VARS_UBOOT_CONFIG=y
>   CONFIG_SYS_BOOT_GET_CMDLINE=y
> ... in a way that's very similar to boards based on the same SoC
> (linkit-smart-7688 and gardena-smart-gateway-mt7688).
> 
> In the ancient u-boot I had to remove a header from the RAM
> version, but this was not needed with current u-boot.
> 
> Did I forget some step?

Did you never program U-Boot into SPI NOR before on your VoCore2? Which
binary did you program? How do the fist line look like? Here my output:

$ hexdump -n 256 u-boot.bin
0000000 013f 1000 4800 4080 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000100

Thanks,
Stefan


More information about the U-Boot mailing list