Secure Digital card: Difference between revisions
(→Implementation: responding to a comment) |
(move fake product links to list of references, as it isn't important enough to preceed instructions on how to use a card) |
||
(34 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
{{RightTOC}} |
|||
The XO laptop has |
The XO laptop has a slot for an SD card. Once inserted, the contents are shown by the [[Journal Activity]] or the GNOME file browser. See [[Journal]] for how to use an SD card in Sugar; you can move files to and from the card by dragging and dropping the file in the Journal view to the card icon at the bottom of the screen. |
||
== Using == |
|||
You can move files to and from the storage media by dragging and dropping the file in the Journal view to the USB stick icon at the bottom of the screen or by command line in the [[Terminal Activity]]. See discussion [[Talk:Secure_Digital_card]] to talk about your situation. |
|||
*Insert card into the slot at the bottom of the screen. See below for more detailed instructions. |
|||
*In [[Sugar]], a card icon will appear at the lower left of the [[Journal]], and you can begin to use it. |
|||
==Use == |
|||
*In Gnome, an icon for the card will appear on the desktop, and a window will open showing the files on the card, and you can begin to use it. |
|||
#insert card (noted below) |
|||
*When finished with the card, you ''must'' tell the computer before removing it, either; |
|||
#device will show up in journal if correctly mounted. an error message may briefly flash when booting if it didn't work, but other than that you can do a "df" or "cat /etc/mtab" or "cat /etc/fstab" to see what's up |
|||
:*click on it in the Journal and choose unmount, |
|||
: |
:*click on it in the frame and choose unmount, |
||
:*click the eject button in the GNOME file browser window, or; |
|||
:*right-click on the GNOME desktop icon and choose ''Eject''. |
|||
:If you remove the card without this step, pending changes to the card may not be written and some files may be left in a corrupted state. |
|||
*Eject the card; push it in slightly until you feel a click, then release it. |
|||
== Supported cards == |
== Supported cards == |
||
* Most cards work, |
|||
* FAT16, FAT32 formatted |
|||
* Some cards don't work, |
|||
* Most filesystems work; such as FAT16, FAT32, ext2, ext3, ext4, |
|||
* Some filesystems won't work, such as HFS+, |
|||
* Most card sizes should work; but we have not tested them all, |
|||
* Some cards work for file storage, but not for booting. |
|||
For deployments, carefully test a sample of the card being used. |
|||
* 8-gigabyte SD memory cards work. As larger cards are created, they will also be tested. 16GB cards [http://olpc.osuosl.org/forum/viewtopic.php?t=964&sid=748b62158cc7196a4dbb9ba0b95b52c7 have been reported to work]. |
|||
== Insertion == |
|||
* No word on straight old MMC cards—even though they should work, some other hardware doesn't let it work. |
|||
To properly insert the card the gold fingers on the card should be facing up and towards the front of the display. Insert the card until it is flush with the bottom of the screen, you will hear or feel a click when the card is fully seated. It is a "Push to Click in and Push to Click out (Eject)" mechanism. When ejecting, push the card in again and release. It should come out far enough to grab with fingers, Try small tweezers if you have a hard time getting the card to come out again. While not required, you can also attach a little piece of adhesive tape to the card to give an easy handle to pull on the card if it sticks. |
|||
== Implementation == |
|||
XO uses a custom microchip for SD card access, Camera and Flash Enabler, or CaFE. CaFE includes SDHC support. SDHC is compatible at a hardware level with SD. (it can't be, HC has got extra pins!!! [[User:AaronPeterson|AaronPeterson]] 02:39, 3 January 2008 (EST))(SDHC have more pins, but the extras do not interfere with the usage of a lesser SD card. I have used a SD card in the OLPC -Jay Markello) Pierre Ossman wrote the Linux driver support for SDHC. SD cards up to something like 256 GB should be supported. cafe is driven by the sdhci driver. cafe follows the standard host controller interface for SD controllers. |
|||
== SD standard == |
|||
Here is how SD block addressing works: The address is 32 bits. In the CaFe chip, which is compatible with the standard "SDHCI" spec, the address goes in the 32-bit chip register at offset 8. For old SD cards (not the new SDHC - High Capacity cards), the address is a byte address, so the maximum size is 4 Gbytes. For the newer SDHC cards, the address is a block number, assuming 512 byte blocks, so the maximum size is 2 TBytes. None of this is CaFe-specific, BTW. It is standard SD. In other words, SDHC just shifts the addresses by nine bits, allowing an effective 40 bit address. The other limit that's often written about, 32GB, is an artificial limit in Window's FAT formatter; Windows will use the generally incompatible NTFS instead. Linux can format FAT up to the ~300GB real limit just fine, after that we'll need to use a linux specific fs. |
|||
==Exceptions== |
|||
=== When they don't mount === |
|||
I Installed (2) different USB sticks on my new XO and also a miniSD(with SD adapter) and none of these (3) items are showing up in the Journal. I'm unable to access any of these and don't understand what I'm doing wrong. The USBs are both U3 Launchpad enable (only one is password protected). How can I make these Items work? |
|||
A: Make sure both cards have different Volume labels, as that's how they're assigned a mount point. See [http://ubuntuforums.org/showthread.php?t=365661] |
|||
: There's a hidden folder the OLPC puts onto all mounted media, ".olpc.store/". Try removing that, a broken database there may keep the journal from working properly. You should always be able to see the device mounted using "df" in Terminal. |
|||
: Also, make sure they are FAT-formatted (most new USB sticks come FAT-formatted)—I think both FAT16 and FAT32 work. Also, I think the sticks/cards need to be writable for Sugar to index them correctly, so if your stick or card comes with a read-only switch, make sure it is in the read/write position and not the read-only position. I don't know much about the U3 system, but you might want to try non-U3, non-password-protected sticks to eliminate the possibility that your hardware is defective. If regular, brand-new sticks are not working, it is possible there is something wrong with the hardware of your machine, in which case you may want to [[Support_FAQ#What_is_the_warranty_info.3F_RMA_process.3F | contact the support line]] to see if it needs to be replaced (within the 30 day warranty period, if possible). —[[User:Leejc|Joe]] 02:29, 29 December 2007 (EST) |
|||
---- |
|||
Another thing to try is a quick reboot of the OLPC. I've had some difficulty with hot-swapping cards, but booting with them already attached seems to work much, much better. |
|||
== Insertion== |
|||
'''Note:''' The SD/MMC/SDHC memory card will only mount when inserted properly into the XO laptop. The slot will allow you to insert the card in either direction however. (It did not let me do that [[User:AaronPeterson|AaronPeterson]] 02:39, 3 January 2008 (EST)) |
|||
To properly insert the SD/MMC/SDHC card the brass fingers on the card should be facing up and towards the front of the LCD screen. Insert the card until it is flush with the bottom of the screen, you will hear a click when the card is fully seated. [I had a hard time getting the card come out again. Using small tweezers I finally succeeded. Next time I attach a little piece of scotch tape to the SD card; this will give me an easy handle to pull the card out when it gets stuck. Geert December 28, 2007] |
|||
Not required, it is a Push to Click in and Push to Click out (Eject) mechanism. Once inserted push and release and the card will pop-out enough to comfortably remove - No sticky tape required. Ram (Boston, MA) January 8th 2008. |
|||
The picture below shows the proper way to insert the SD/MMC/SDHC card: |
|||
The picture shows the proper way to insert the card; your card might not have this many contacts, but it should be the same size and shape: |
|||
[[Image:Proper_SD_Card_Insertion.jpg]] |
[[Image:Proper_SD_Card_Insertion.jpg]] |
||
Line 54: | Line 34: | ||
--[[User:KenXo|KenXo]] 11:28, 24 December 2007 (EST) |
--[[User:KenXo|KenXo]] 11:28, 24 December 2007 (EST) |
||
== Troubleshooting == |
|||
==Error Messages== |
|||
I get an error about not being able to read block 0 of mmc1 when I turn on my XO. I've tried two cards, and those worked on another person's XO. I can't do anything to mount them [[User:AaronPeterson|AaronPeterson]] 02:39, 3 January 2008 (EST) |
|||
* Try the same card in another device. |
|||
Some reports of issues, (currently in Ship.2 or pre Update.1 ?) |
|||
* USB memory stick is removed after the Journal sees it; after that, the |
|||
Journal won't show the stick again until it is rebooted. |
|||
* Suspend causes the SD card to come back with a device name one higher than before. |
|||
* Try the same card in another XO laptop, |
|||
The best way to reboot is to go to the Home screen (with the XO in the |
|||
middle and a donut of activities around it), hover the mouse over the |
|||
XO, and click on Reboot. |
|||
* Try a new card; if new cards don't work, there may be a fault with the laptop. |
|||
== Formatting == |
|||
(Adapted from support help answers) |
|||
* Try rebooting; some cards have been found to work differently after a reboot. |
|||
SD cards are pre-formatted by their manufacturers to work best for the |
|||
device; Recommend not reformatting unless it really stops working |
|||
(e.g. if a freshly booted Linux refuses to mount it). |
|||
* Check which way round the card is; the card will only work when inserted the right way around, and broken slots may allow you to insert the card in either direction. |
|||
Instructions only for command line in Terminal. |
|||
* Further diagnosis can be done using "dmesg | grep mmc" from the terminal shell. |
|||
The laptop doesn't come with the tools to format the SD card, so you will need to install them. |
|||
With access to the Internet, you can install them as ''root'' by typing: |
|||
== Booting == |
|||
$ yum install dosfstools |
|||
The XO laptop can boot from an SD card. OLPC OS can be installed onto a card. See [[Firmware/Storage#How_to_install_to_SD_card How to install to SD card]]. |
|||
This may take 5 to 10 minutes, then ask you if it's OK to download 71k of stuff, |
|||
type "y" to download and install the "mkdosfs" command. |
|||
== Formatting == |
|||
Insert your SD disk, check for current mount point, look for devices mounted in /media or /dev |
|||
SD cards are pre-formatted by their manufacturers to work best for the device. It is not recommended that you reformat unless it really stops working; for example, if a freshly booted Linux refuses to mount it. |
|||
$ df |
|||
To reformat as FAT, see [[/Reformatting/Fat]]. May impact card performance. |
|||
or |
|||
To reformat as ext2, see [[/Reformatting/Ext2]]. May impact card performance, and will certainly reduce portability with other devices. |
|||
$ mount |
|||
== Implementation == |
|||
Look for similar devices as "/dev/mmcblk0p1" (meaning the first ("zeroth") MMC/SD card, and the first partition of that card. ) |
|||
[[Hardware#XO-1_Laptop|XO-1]] uses a custom microchip for SD card access: the Camera and Flash Enabler (CaFE). CaFE includes SDHC support, which is hardware level compatible with SD. Pierre Ossman wrote the Linux driver support for SDHC and CaFE is driven by the sdhci driver. SD cards up to about 256 GB should be supported. CaFE follows the standard host controller interface for SD controllers. |
|||
Then unmount any file system from the card, so that "df" doesn't show the card any more. |
|||
$ mount /dev/mmcblk0p1 |
|||
Then "mkdosfs -F 32 /dev/mmcblk0p1" should reformat it as a FAT32 file system. (Use -F for FAT16/FAT file system, however 2 GB size limit) |
|||
[[XO-1.5]], [[XO-1.75]] and [[XO-4]] also support SD/MMC cards, but they don't use the CaFE ASIC. |
|||
== |
== Standards == |
||
See Wikipedia for a basic overview. SD block addressing works with a 32 bit address. In the CaFe chip, which is compatible with the standard "SDHCI" spec, the address goes in the 32-bit chip register at offset 8. For old SD cards (not the new SDHC cards), the address is a byte address, so the maximum size is 4 Gbytes. For the newer SDHC cards, the address is a block number, assuming 512 byte blocks, so the maximum size is 2 TBytes. In other words, SDHC just shifts the addresses by nine bits, allowing an effective 40 bit address. The 32 GB limit that's often written about is an artificial limit in Window's FAT formatter; Windows will use the generally incompatible NTFS file system instead. Linux can format FAT up to the ~300GB real limit just fine, after that the card will need to use a linux specific filesystem. None of this is CaFe-specific. |
|||
* [http://en.wikipedia.org/wiki/Secure_Digital_card Secure Digital card] |
|||
== See also == |
|||
* [[wikipedia:Secure Digital card]] is a good overview of the standard. |
|||
* [http://fakememorysentinel.wordpress.com/ fake flash products]. |
|||
* [http://www.kingston.com/en/support/product_verification Kingston product verification]. |
|||
* [[USB drive]] - the XO also has slots for USB drives such as USB flash drives. |
|||
* [[Swap]] explains how to use an SD card as swap to allow running more instances of more complicated applications than can fit in memory. |
|||
* [[SD and USB FLASH Drive Performance]] |
|||
* [[NAND Testing]] |
|||
[[Category:Hardware]] |
[[Category:Hardware]] |
Latest revision as of 23:22, 8 October 2013
The XO laptop has a slot for an SD card. Once inserted, the contents are shown by the Journal Activity or the GNOME file browser. See Journal for how to use an SD card in Sugar; you can move files to and from the card by dragging and dropping the file in the Journal view to the card icon at the bottom of the screen.
Using
- Insert card into the slot at the bottom of the screen. See below for more detailed instructions.
- In Sugar, a card icon will appear at the lower left of the Journal, and you can begin to use it.
- In Gnome, an icon for the card will appear on the desktop, and a window will open showing the files on the card, and you can begin to use it.
- When finished with the card, you must tell the computer before removing it, either;
- click on it in the Journal and choose unmount,
- click on it in the frame and choose unmount,
- click the eject button in the GNOME file browser window, or;
- right-click on the GNOME desktop icon and choose Eject.
- If you remove the card without this step, pending changes to the card may not be written and some files may be left in a corrupted state.
- Eject the card; push it in slightly until you feel a click, then release it.
Supported cards
- Most cards work,
- Some cards don't work,
- Most filesystems work; such as FAT16, FAT32, ext2, ext3, ext4,
- Some filesystems won't work, such as HFS+,
- Most card sizes should work; but we have not tested them all,
- Some cards work for file storage, but not for booting.
For deployments, carefully test a sample of the card being used.
Insertion
To properly insert the card the gold fingers on the card should be facing up and towards the front of the display. Insert the card until it is flush with the bottom of the screen, you will hear or feel a click when the card is fully seated. It is a "Push to Click in and Push to Click out (Eject)" mechanism. When ejecting, push the card in again and release. It should come out far enough to grab with fingers, Try small tweezers if you have a hard time getting the card to come out again. While not required, you can also attach a little piece of adhesive tape to the card to give an easy handle to pull on the card if it sticks.
The picture shows the proper way to insert the card; your card might not have this many contacts, but it should be the same size and shape:
--KenXo 11:28, 24 December 2007 (EST)
Troubleshooting
- Try the same card in another device.
- Try the same card in another XO laptop,
- Try a new card; if new cards don't work, there may be a fault with the laptop.
- Try rebooting; some cards have been found to work differently after a reboot.
- Check which way round the card is; the card will only work when inserted the right way around, and broken slots may allow you to insert the card in either direction.
- Further diagnosis can be done using "dmesg | grep mmc" from the terminal shell.
Booting
The XO laptop can boot from an SD card. OLPC OS can be installed onto a card. See Firmware/Storage#How_to_install_to_SD_card How to install to SD card.
Formatting
SD cards are pre-formatted by their manufacturers to work best for the device. It is not recommended that you reformat unless it really stops working; for example, if a freshly booted Linux refuses to mount it.
To reformat as FAT, see /Reformatting/Fat. May impact card performance.
To reformat as ext2, see /Reformatting/Ext2. May impact card performance, and will certainly reduce portability with other devices.
Implementation
XO-1 uses a custom microchip for SD card access: the Camera and Flash Enabler (CaFE). CaFE includes SDHC support, which is hardware level compatible with SD. Pierre Ossman wrote the Linux driver support for SDHC and CaFE is driven by the sdhci driver. SD cards up to about 256 GB should be supported. CaFE follows the standard host controller interface for SD controllers.
XO-1.5, XO-1.75 and XO-4 also support SD/MMC cards, but they don't use the CaFE ASIC.
Standards
See Wikipedia for a basic overview. SD block addressing works with a 32 bit address. In the CaFe chip, which is compatible with the standard "SDHCI" spec, the address goes in the 32-bit chip register at offset 8. For old SD cards (not the new SDHC cards), the address is a byte address, so the maximum size is 4 Gbytes. For the newer SDHC cards, the address is a block number, assuming 512 byte blocks, so the maximum size is 2 TBytes. In other words, SDHC just shifts the addresses by nine bits, allowing an effective 40 bit address. The 32 GB limit that's often written about is an artificial limit in Window's FAT formatter; Windows will use the generally incompatible NTFS file system instead. Linux can format FAT up to the ~300GB real limit just fine, after that the card will need to use a linux specific filesystem. None of this is CaFe-specific.
See also
- wikipedia:Secure Digital card is a good overview of the standard.
- fake flash products.
- Kingston product verification.
- USB drive - the XO also has slots for USB drives such as USB flash drives.
- Swap explains how to use an SD card as swap to allow running more instances of more complicated applications than can fit in memory.
- SD and USB FLASH Drive Performance
- NAND Testing