This time the serial port print out of the information flash and NAND size are 0K, which means that u-boot now does not support the mini2440 on the Norflash and Nandflash, then you need to modify it
At start. s in the "BL _main" Such a sentence, _main function in arch\arm\cet0.c This function is the main function of the Board of some initialization, relocation and guidance of the second part of the code, the main call Board_init_f (initialization), Relocate_ Code (relocation), Board_init_r (boot the second part of the code) we went into the Board_init_r function to see, there is a init_sequence_r array in a initr_flash, we go in, there is a flash_init , point it in, there's such a judgment
The function in the if is the old way to identify the Norflash, which is the new one, which means that if the old method is not recognized, then the new method is used, since we are not aware of it, then we go directly into this function of the new method.
When we get in there, we see a lot of debug functions that print a lot of debugging information.
Then we'll turn on debug and write in this C file
#define _DEBUG 1
#define DEBUG 1
We'll be able to see a lot of print information when we compile and burn.
ID number of intermediate print 1 2249
And then we go back to see the flash_detect_legacy function and see why it can't be read, the function
Here is the place to print out the ID, we enter the Jedec_flash_match function into the jedec_table array, in this array we can see here is the place to write Norflash model, after looking here there is no this board of Norflash, So we need to add it ourselves manually, the Norflash model of this board is s29al016j, and we write the code on the side of the data sheet of this model.
At the end of this array, add
This paragraph is OK, so recompile can support Norflash, do not forget to put debug debugging information off, but burn write in to see print information there is such a line "Flash:ERROR:too many Flash sectors" said we have too much sector, So we'll search for it in source insight,
Found here there is a macro, we point to see in the smdk2440.h definition, it is only 19, and we have long exceeded this number, so we have to change it to a larger than the number of our sector is done, then the U-boot fully support the MINI2440 board Norflash