The ins and outs of booting Linux from SD card

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

The ins and outs of booting Linux from SD card

4,351件の閲覧回数
ChrisWood
Contributor I
I thought I would share this little pearl with all you avid i.MX233 developers out there. Getting the i.MX233 to boot from SD card had us running around for a bit. After some effort confirming that the hardware signals were all ok on our target board, Freescale tech support filled us in on the information we needed to get this to happen (which was buried in an errata sheet).

1. There is a bug in the i.MX233 ROM code that causes it to timeout waiting for SD cards that take longer than 4 ms to start up. So under advisement we bought a handful off different SD cards from various vendors and tested each one till we found one that worked. In case you're wondering we found that the SanDisk Qmicro 2GB cards work.

2. By default the fuse bit in the i.MX233 that allows it to boot from an SD card is disabled. So you need to blow this bit.

Once you have the above sorted, things will work just fine.

Hope this helps.
CW
ラベル(1)
0 件の賞賛
返信
12 返答(返信)

3,970件の閲覧回数
BennyKukoy
Contributor I
Ok Chris, thanks. I'll see what Freescale's reply to this issue is.

Chris Wood said:

Hi Benny,


We did not try the I2C boot method as 2GB cards were ok for our application. I think I saw on the forum that the Kingston 4GB cards work and that Chumby uses these. Not sure about the brick wall, I think contacting Freescale support is your best bet re timeouts.


Regards,

Chris

 

Benny Kukoy said:

Geee, thanks, Chris.

 

But have you actually tried the I2C boot method to get around the problem? Or did you just test cards using the direct SD/MMC boot.

 

Unfortunately, my application requires a 4GB card or possibly higher. In your opinion, if we modify the boot code of FSL's patch (extend the timeout further) in the EEPROM, could it solve the problem? or have I hit a brick wall?

 

Another question would be, what brands of 4GB cards have you found to work?

 

Thanks for the help!

 

Chris Wood said:

Hello Benny, we encountered the same problem and contacted Freescale support. The issue is that the timeout you are encountering is set by a value in the on chip boot loader being too short to accommodate all cards. We bought 4GB cards from 5-6 different vendors and found that most did not boot. We settled for 2 GB cards as a result.

Benny Kukoy said:

Has anyone tried 4GB cards or higher? I somehow can not make it work even with the EEPROM patch suggested in the errata doc. I keep on getting a 0x8020a012 (ERROR_DDI_SD_DETECTION_TIME_OUT) error code.

 

2GB cards and less work just fine.

0 件の賞賛
返信

3,970件の閲覧回数
ChrisWood
Contributor I

Hi Benny,


We did not try the I2C boot method as 2GB cards were ok for our application. I think I saw on the forum that the Kingston 4GB cards work and that Chumby uses these. Not sure about the brick wall, I think contacting Freescale support is your best bet re timeouts.


Regards,

Chris

 

Benny Kukoy said:

Geee, thanks, Chris.

 

But have you actually tried the I2C boot method to get around the problem? Or did you just test cards using the direct SD/MMC boot.

 

Unfortunately, my application requires a 4GB card or possibly higher. In your opinion, if we modify the boot code of FSL's patch (extend the timeout further) in the EEPROM, could it solve the problem? or have I hit a brick wall?

 

Another question would be, what brands of 4GB cards have you found to work?

 

Thanks for the help!

 

Chris Wood said:

Hello Benny, we encountered the same problem and contacted Freescale support. The issue is that the timeout you are encountering is set by a value in the on chip boot loader being too short to accommodate all cards. We bought 4GB cards from 5-6 different vendors and found that most did not boot. We settled for 2 GB cards as a result.

Benny Kukoy said:

Has anyone tried 4GB cards or higher? I somehow can not make it work even with the EEPROM patch suggested in the errata doc. I keep on getting a 0x8020a012 (ERROR_DDI_SD_DETECTION_TIME_OUT) error code.

 

2GB cards and less work just fine.

0 件の賞賛
返信

3,970件の閲覧回数
BennyKukoy
Contributor I

Geee, thanks, Chris.

 

But have you actually tried the I2C boot method to get around the problem? Or did you just test cards using the direct SD/MMC boot.

 

Unfortunately, my application requires a 4GB card or possibly higher. In your opinion, if we modify the boot code of FSL's patch (extend the timeout further) in the EEPROM, could it solve the problem? or have I hit a brick wall?

 

Another question would be, what brands of 4GB cards have you found to work?

 

Thanks for the help!

 

Chris Wood said:

Hello Benny, we encountered the same problem and contacted Freescale support. The issue is that the timeout you are encountering is set by a value in the on chip boot loader being too short to accommodate all cards. We bought 4GB cards from 5-6 different vendors and found that most did not boot. We settled for 2 GB cards as a result.

Benny Kukoy said:

Has anyone tried 4GB cards or higher? I somehow can not make it work even with the EEPROM patch suggested in the errata doc. I keep on getting a 0x8020a012 (ERROR_DDI_SD_DETECTION_TIME_OUT) error code.

 

2GB cards and less work just fine.

0 件の賞賛
返信

3,970件の閲覧回数
ChrisWood
Contributor I
Hello Benny, we encountered the same problem and contacted Freescale support. The issue is that the timeout you are encountering is set by a value in the on chip boot loader being too short to accommodate all cards. We bought 4GB cards from 5-6 different vendors and found that most did not boot. We settled for 2 GB cards as a result.

Benny Kukoy said:

Has anyone tried 4GB cards or higher? I somehow can not make it work even with the EEPROM patch suggested in the errata doc. I keep on getting a 0x8020a012 (ERROR_DDI_SD_DETECTION_TIME_OUT) error code.

 

2GB cards and less work just fine.

0 件の賞賛
返信

3,970件の閲覧回数
BennyKukoy
Contributor I

Has anyone tried 4GB cards or higher? I somehow can not make it work even with the EEPROM patch suggested in the errata doc. I keep on getting a 0x8020a012 (ERROR_DDI_SD_DETECTION_TIME_OUT) error code.

 

2GB cards and less work just fine.

0 件の賞賛
返信

3,970件の閲覧回数
StanleyNg
Contributor I

Hi Chris,

I'm also working on i.mx233 u-boot on SD card.

But I found the offical u-boot released by Freescale "L2.6.31_10.05.02_ER" didn't include mmc driver.

Now, my board can boot to u-boot prompt, but it has no way to run uImage.

Do you have any suggestion on that? Thanks.

Stan



Chris Wood said:

Hi Alex, we are using uboot here with the i.mx233 which is read from the SD card to setup the system and then boot Linux also on the SD card so the problem is actually in the i.mx233's pre-bootloader which is in the internal ROM. Is the i.mx37 different to this?
CW

alexyu said:
We also see similar issue in MX37 platform. However, it could be fixed by changing the delay time in the sd_voltage_validation() in the redboot. Hope this can help.
0 件の賞賛
返信

3,970件の閲覧回数
alexyu
Contributor I
Hi Chris, I don't have chance to work on i.mx233 bit I guess the bootstrap codes may be similar. If your are talking about the very beginning of the bootup stage. Bootstrap loading codes (U-boot or whatever bootloader) from the sd card, then it will be no way to debug it unless freescale willing to provide support. If the control is already passed to the U-boot, then you still have chance to fix it. Hope this can clarify. AlexYu
0 件の賞賛
返信

3,970件の閲覧回数
ChrisWood
Contributor I
Hi Alex, we are using uboot here with the i.mx233 which is read from the SD card to setup the system and then boot Linux also on the SD card so the problem is actually in the i.mx233's pre-bootloader which is in the internal ROM. Is the i.mx37 different to this? CW alexyu said:
We also see similar issue in MX37 platform. However, it could be fixed by changing the delay time in the sd_voltage_validation() in the redboot. Hope this can help.
0 件の賞賛
返信

3,970件の閲覧回数
alexyu
Contributor I
We also see similar issue in MX37 platform. However, it could be fixed by changing the delay time in the sd_voltage_validation() in the redboot. Hope this can help.
0 件の賞賛
返信

3,970件の閲覧回数
TerryLv
Contributor II
Actually, I use only sandisk sd card in mx25 development.
0 件の賞賛
返信

3,970件の閲覧回数
ChrisWood
Contributor I
Ernie, thanks for your contribution and welcome to the group. Ernie Aguilar said:
Also, the attached "SD Card Operations" may help with flashing an SD card with firmware for i.MX233.
0 件の賞賛
返信

3,970件の閲覧回数
ErnieAguilar
Contributor I
Also, the attached "SD Card Operations" may help with flashing an SD card with firmware for i.MX233.
0 件の賞賛
返信