Kernel mounting SD card

R

richthofen1113

Guest
So SD card. Cute little thingy while gets really evil when you could not mount them correctly on you device. I was originally working on an error called "mmc0: error -110 whilst initialising SD card". Almost spent two weeks on it, separated mmc modules from the kernel, have tried all kinds of patches but no good. Yesterday, my supervisor changed one of the boot arguments and suddenly the error was gone. After hundreds of power cycling the device, we came to an conclusion that the system is now stable. The reason that the error was gone might lie in the fact that the U-Boot is initializing the SD card instead of kernel itself. So I am wondering which one will be the good practice, to let U-Boot handle the SD card which eliminates the bug, or to just toss the ball to kernel which has mmc modules to mount the card. The device is using Linux-2.6.39.2 (pretty old) and pxa 270 processor. The U-Boot is the only boot loader. The SD card is not for booting purposes (e.g booting from the SD card); it is used to store customer data. So the question is just about the best way to mount the SD card correctly for future use.
 


If it is working now......

I think allowing U-Boot to continue setting up the card would be best.
 
If it is working now......

I think allowing U-Boot to continue setting up the card would be best.
You should be right...So a stupid question, do you know what is the normal procedure to mount SD card in a linux-based device?
 
Depends on how you want it to happen. For example, on my laptop the SD card is automatically mounted via KDEs auto mount. Normally SD cards are treated just like any other block device.
 
You can do any of several ways. We use udev rules to mount it. You can add entries to fstab to make it mount at boot time. You could just add a section at the end of your boot scripts to mount it if it's there.
 
You can do any of several ways. We use udev rules to mount it. You can add entries to fstab to make it mount at boot time. You could just add a section at the end of your boot scripts to mount it if it's there.
You are certainly right. The only concern for me to mount the SD card at boot time is that the card will be initialized again after kernel loads. It is not clear to me if this will have any potential drawback. Any ideas?
 
What, exactly, do you mean by initializing?
Sorry for the ambiguity. I just meant that kernel mmc modules will mount the SD card again. The error is gone because U-Boot has already taken care of it instead of mmc modules in kernel. Not sure if this method of mounting the SD card twice has any potential problems
 
Sorry for the ambiguity. I just meant that kernel mmc modules will mount the SD card again. The error is gone because U-Boot has already taken care of it instead of mmc modules in kernel. Not sure if this method of mounting the SD card twice has any potential problems
I doubt that this will cause issues.
 
I agree that it's probably not going to be an issue.

Does android do the same thing when running of of SD cards? Mount the card (probably r/o) to load the kernel and any necessary components of boot, then reset and remount (r/w) once the kenel's loaded and running?
 

Staff online

Members online


Latest posts

Top