How do I put u-boot in the SPI flash and boot from it?
I have a logic-PD zoom board. All the switches set to OFF as the documentation claims is the config for booting from SPI.
Currently the only way to get the board to boot is to insert an SD card with u-boot on it, and then use that u-boot to load the kernel from SPI or TFTP or whatever.
If I remove the SD card, all I get at startup over the serial console is:
Booting with TI UBL Device OPP (300MHz, 1.2V)SD/MMC Boot failed.
I also, just for the heck of it, tried all 16 combinations of the last 4 dip switches, but only the "all off" setting actually gets it to do anything at all.
I suspect that u-boot was erased from the SPI flash, or that the UBL is somehow "hardwired" to go look for an SD card instead. What do I have to do to get this thing to boot (with u-boot, I can take it from there) from the SPI flash?
I have a ubuntu Linux machine here, so I very very strongly prefer to use tools that run on that system.
BTW, I also tried writing u-boot to the SPI flash at address 0x10000 and at 0x20000 using uboot "sf erase/write" commands, but to no effect. I can write and load a kernel from SPI flash, as well as a rootfs, so the flash itself is okay.
Because UBL needs to fit in a very small amount of internal RAM, it's necessary to build it to support the specific boot mode needed. So in your case it sounds like the UBL currently in SPI flash is built to grab u-boot from SD card. If you wish to have UBL grab u-boot from SPI flash then you would need to rebuild the UBL for SPI boot:
http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138
Once you've rebuilt UBL you will then need to write both UBL and u-boot into your SPI flash (I'd recommend using the UART utility) and then you will be able to boot.
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Thanks, got it to work by flashing the UBL again.
Is there a less "windows oriented" way to do this? Looks kinda wasteful to install mono just to send a few kB on the serial port.
Also could not get the UBL to build, probably because I have a 64-bit machine. Looks like I have to create a 32-bit VM just to run the TI tools.
Mike LooijmansIs there a less "windows oriented" way to do this? Looks kinda wasteful to install mono just to send a few kB on the serial port.
Sorry, no. Newer devices have moved away from UBL and .NET. For example, the latest SDKs for AM3358 are using u-boot-spl (secondary program loader) as a replacement for UBL. There are a lot of advantages to SPL:
We have also changed our boot ROM code to use standardized protocols, e.g. x-modem client for UART, BOOTP for ethernet, etc.
So I apologize that you will need to go through some of these extra steps with OMAP-L138 though hopefully the extra info gives you the confidence to choose TI again for your next project.
I switched to the "general" u-boot code base, and managed to get SPL working for the omap l138. Much easier than getting UBL to compile, and I suspect it boots faster too.