Hello,
I've been trying to create an x-loader image which will allow me to boot my beagleboard from UART, NAND and MMC. I've encountered some difficulties. With some, I've managed to cope, with others, not so much.
Booting from NAND and MMC is pretty straightforward. However, wherever I looked, I saw that in order to boot from a UART, I had to compile my x-loader in the labrador-download configuration, as described here http://elinux.org/BeagleBoardRecovery#UART_recovery. I find this a bit bizarre - why compile to a different board configuration only to boot from UART? And from old and somewhat unmaintained git repositories?
Whenever I tired boot from UART using my own-compiled x-loader, the board would get stuck. (And not flash the leds, as it is written in the appropriate hang() function in the x-loader). (The x-loader was compiled from the Sakoman x-loader git repository, without any changes made in the code according to the omap3530beagle configuration).
I've encountered this message (http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/29688/103210.aspx) which directed me to the TEXT_BASE definition. After looking at the code, I concluded that the labrador-download configuration disables the MMC and NAND support, and immediately runs the UART initialization, and changes the TEXT_BASE definition to 0x40208800 (as opposed to the 0x40200800 in the Sakoman git repository).
Editing the x-loader source, after disabling the MMC and NAND initialization (under start_armboot() in lib\board.c) and changing the TEXT_BASE (under board/omap3530beagle/config.mk) to comply with the labrador-download configuration, I've managed to load the x-loader an u-boot via UART using the u-boot utils (http://github.com/nmenon/omap-u-boot-utils/). Great success!. However, whenever I try to enable the MMC initialization, I get stuck at the mmc_init() function.
Booting from MMC with the TEXT_BASE set to 0x40208800 fails (as opposed to booting with the same x-loader image from UART which works just fine).
Memory wise: I've looked at the SRAM, and saw that the x-loader is indeed loaded to the given address. I don't know how it got there.
To narrow it down, I think There are several things I don't understand:
* Why does the MMC init get stuck when I boot from UART? Could it be that the ROM bootloader initializes the MMC differently when it boots from UART than when it boots from NAND/MMC?
* How is the x-loader loaded to the right address? What is the ROM bootloader (first stage bootloader) doing there? Why doesn't it work when I use the default address, but it works when I use 0x40208800?
* How does the ROM bootloader know where to start running? There are no NOPs before the x-loader. According to the TRM, the image is loaded to 0x40200000.
* Is there a good reason not to be able to boot from UART, NAND and MMC from the same x-loader image? I don't think space is an issue, as opposed to the comments in the labrador-download configuration.
Thank you for reading, any response would be very much appreciated.
Dan.