Secure Digital card

From OLPC
(Redirected from SD)
Jump to: navigation, search

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:

Proper SD Card Insertion.jpg

--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