[U-Boot] about ## Unknown FLASH on Bank 0

My U-boot 1.2.0 works fine before. but I want to add some memory test actions before u-boot start Linux. I use the "mtest" command to test the memory. But the "mtest" command will test the memory infinitely. So, I change the /common/cmd_mem.c, and do the following change:
#if defined(CFG_ALT_MEMTEST) printf(.....); PRINTF(...); for(;iterations == 1;) /* for(;;) { */ ....
Which I think will make the memory test only once.
But after I cross-compile the u-boot, the "Unknown FLASH" happens:
FLASH: ## Unknown FLASH on Bank 0 ## Unknown FLASH on Bank 0 - Siz= 0x00000000 = 0 MB *** failed *** ### ERROR ### Please RESET the board ###
But after I add these in my board flash.c file, the u-boot works well again:
for(i = 0; i < 100; i++) printf("");
the above lines is added in flash_get_size function, after I get the 4 codes of the flash, and before I start to compare the codes with S29GL_ID0.
Anybody get any idea?

Dear Peter Pan,
In message 48abf2c20910251922o7251d876hebfedc6aed5b8c03@mail.gmail.com you wrote:
My U-boot 1.2.0 works fine before. but I want to add some memory test actions before u-boot start Linux. I use the "mtest" command to test the memory. But the "mtest" command will test the memory infinitely. So, I change the /common/cmd_mem.c, and do the following change:
Instead of hacking ancient code in incompatible ways I recommend you to update and use curent code. Ther the "mtest" command takes an optional 4th argument which defines the number of iterations.
Also please note that "mtest" is not really optimal for a memory test unless you #define CONFIG_SYS_ALT_MEMTEST.
And finally it might be worth to look into the memory test facilities that are part of the POST implementation instead.
But after I cross-compile the u-boot, the "Unknown FLASH" happens:
FLASH: ## Unknown FLASH on Bank 0 ## Unknown FLASH on Bank 0 - Siz= 0x00000000 = 0 MB *** failed *** ### ERROR ### Please RESET the board ###
Well, this is obviouly completely unrelated to the changes you describe, so you must have changed other things, too, if the code was working before,
Anybody get any idea?
Ancient, completely unsupported code. Please update.
Best regards,
Wolfgang Denk
participants (2)
-
Peter Pan
-
Wolfgang Denk