[U-Boot] BeagleboneBlack vboot from SPI flash difficulties

Simon Glass sjg at chromium.org
Thu Aug 11 01:30:21 CEST 2016


Hi Joe,

On 10 August 2016 at 10:43, Joe Desbonnet <jdesbonnet at gmail.com> wrote:
>
> I've been trying to implement vboot from SPI flash on the BeagleBone Black
> with only limited success. I'm working with u-boot 2016.07 and using the
> instructions in beaglebone_vboot.txt (in doc directory).
>
> So far: I've had no problem booting regular u-boot from SPI flash. I build
> with  am335x_boneblack_defconfig with minor modifications: added SPI_BOOT
> to the list of items on CONFIG_SYS_EXTRA_OPTIONS and added
> CONFIG_SPI_FLASH_STMICRO=y to enable support for my SPI flash chip
> (M25P16). The I use the following command sequence from the u-boot command
> line to program the flash:
>
> sf probe 0
> sf erase 0 +80000
> mmc rescan
> fatload mmc 0 ${loadaddr} MLO.byteswap
> sf write ${loadaddr} 0 ${filesize}
> fatload mmc 0 ${loadaddr} u-boot.img
> sf write ${loadaddr} 0x20000 ${filesize}
>
> And this works nicely.
>
> I also have had success with vboot enabled u-boot using
> the beaglebone_vboot.txt instructions and booting from SD card.
>
> *BUT*
>
> when I copy MLO(.byteswap) and u-boot.img that works successfully on SD
> card to SPI flash it fails to get past the Second Phase Loader:
>
> U-Boot SPL 2016.07 (Aug 10 2016 - 16:06:39)
> Trying to boot from SPI
>
> U-Boot SPL 2016.07 (Aug 10 2016 - 16:06:39)
> Trying to boot from SPI
>
> ... etc for ever
>
> On an oscilloscope I can see what I'm sure is the SPL trying to loading
> u-boot.img on the SPI bus. But it never gets as far as executing it.
>
> So in summary, I've got SPI boot working and vboot working but I cannot
> seem to combine both.
>
> Any ideas what I'm doing wrong?

Not really, but if you look at spl_spi_load_image() you could add some
debugging or #define DEBUG at the top of the file.

Regards,
Simon


More information about the U-Boot mailing list