Customizing NAND images/lang-es

From OLPC
< Customizing NAND images
Revision as of 14:26, 1 September 2007 by RafaelOrtiz (talk | contribs) (draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Este documento describe como crear una imagen jffs2 desde la NAND interna de la laptop, produciendo una imagen que puede ser nsatlada en un XO diferente. El laptop que esta siendo backed up es el laptop "huesped", y el laptop que recibe los contenidos del laptop huesped es el laptop "objetivo".

Procedimiento Basico

Pasos:

  • Make the modifications on the host laptop that you want to be present in the generated image. If you've logged into Sugar and want the user to see the welcome/login prompt again, see the Section #Forcing Sugar to reprompt for name and colors. If you plan to use the image in laptops with different languages and keyboard layouts, you should delete also the file /.olpc-configured. This will force the system to run the olpc-configure script in the next boot.
  • Insert a Windows-formatted (VFAT) USB disk into the host laptop, and reboot.
  • At the "Type any key to interrupt automatic startup" key, press a key. At the "ok" prompt, type "save-nand disk:\nand.img" and press return. The contents of the NAND will be backed up to the nand.img file on the USB disk. The "ok" pThis document describes how to create a rompt will return when the copy has finished, and you can then power the laptop off with the power button.
  • Since build 406, you need a checksum file to successfully upgrade the system. To create the CRC file see the Section #Creating CRC file.
  • Move to the "target" laptop, and insert the USB disk. Again, interrupt at the prompt, and at the ok prompt type "copy-nand disk:\nand.img". This will copy from nand.img to the internal NAND. When back at the ok prompt, power off, remove the USB disk, and power on again to load from the new NAND image.

Adaptaciones de ejemplo

Lenguage

Algunas veces usted puede querer definir el lenguague por defecto del sistema, ya sea por uso o mientras se esta haciendo la localizacion.

  • El archivo /etc/sysconfig/i18n define la variable LANG que sugar usara.

Timezone

La informacion de la zona horaria es guardada en el archivo /etc/timezone. Por ejemplo, la costa este de US es "America/New_York". Este nombre referencia los archivos encontrados en /usr/share/zoneinfo, esto controla la zona horaria y daylight savings time behavior.

Instalando Fuentes TrueType o OpenType

Either install as root prepackaged font package(s) from the Fedora repository as outlined below, or install the fonts in a subdirectory of /usr/share/fonts/ttf and run the fc-cache -f command afterwards.

Teclado

If the manufacturing data does not match the keyboard you need, you can set the keyboard type.

To change the symbol mapping of the keyboard, follow the following steps:

  1. After the system has booted, press ctrl+alt+f1 (f1 is the same as the "mesh-view" key);
  2. Login in as root (no password required);
  3. Open the file /etc/X11/xorg.conf for editing (use vi or any editor you are comfortable with);
  4. In the first InputDevice Section do the following modifications:
    • To change the default language, e.g., from English to Spanish:
      • Modify XkbLayout Setting from "us" to "es" (use "pt" for Portuguese, "ng" for Nigerian language support, etc.);
      • Add an XkbOptions Option with the value "olpc";
    • To add a second language, e.g., English and Arabic:
      • Modify XkbLayout Setting from "us" to "us,ara" (use "ru" for Cyrillic, "ur" for Urdu, "th" for Thai, etc.);
      • Add an XkbOptions Option with the value "olpc2,olpc";
  5. Save and close the file;
  6. Either reboot the machine or restart X by issuing a "/sbin/telinit 3" command, followed by the "/sbin/telinit 5" command.

After you make the modifications, the two lines in xorg.conf should be similar to one of the following:

Option    "XkbLayout"   "es"
Option    "XkbOptions"  "olpc"

After X is restarted, the default language will be Spanish.

Option    "XkbLayout"   "us,ara"
Option    "XkbOptions"  "olpc2,olpc"

After X is restarted, the default language will be English; you will be able to switch to Arabic using the AB/اب key.

Instalando paquetes desde los repositorios de fedora usando yum

Sugar is based off of Fedora and as such has a large amount of packages available to add to the base system. The tool used to do this is called yum. Because of memory constraints it is best to drop into run mode 3 which stops X. To do this log in as root either in the developer console or one of the virtual terminals and type this command:

init 3

X should exit and you should find yourself either at a login prompt or in the same virtual terminal. Log in as root if you are not already. To install or upgrade a package you simply use this command:

yum upgrade <package name>

To search for available packages you can use this command:

yum search <keyword>

More information about using yum with fedora can be found here.

Instalando Flash, Java, MP3 codecs, MPEG4, codecs patentados

These Restricted Formats have problems that makes it difficult or impossible for OLPC to preinstall, but you may be able and interested in deploying systems with these preinstalled.

(Note that the Adobe Flash plugin 9.0.31.0 is known to work and 9.0.60.120 is known not to work.)

Helix (Real) Media Player

The Helix media activity page covers installation of this activity and its associated codecs.

Forzando a Sugar a volver a visualizar el prompt para nombres y colores

You can always edit:

/home/olpc/.sugar/defaults/config

However, there may be times when you may want to force Sugar to prompt for a new name and colors as if with a new machine. You can do this by deleteing the configuration file and the SHH keys in the ./sugar/default directory.

rm /home/olpc/.sugar/defaults/config
rm /home/olpc/.sugar/defaults/owner.key
rm /home/olpc/.sugar/defaults/owner.key.pub

Note that:

  • The above process does not clean out the Journal data repository—the additional step of deleteing the directory /home/olpc/.sugar/defaults/datastore will empty the Journal;
rm -r /home/olpc/.sugar/defaults/datastore
  • This process does force the generation of new keys, which will potentially have (an adverse) impact on access to backup files on the school server.

Creaando el archivo CRC

First, you need to download and compile pilgrim

git clone git://git.fedoraproject.org/git/pilgrim
cd pilgrim/crcimg
make

After, you can from the command prompt create the crc from your custumized image

./crcimg myfile.img

Output is in myfile.crc