Customizing NAND images: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(93 intermediate revisions by 28 users not shown)
Line 1: Line 1:
{{OLPC}}
{{Translations}}
{{TOCright}}
{{TOCright}}
{{Developers}}

This document describes how to create a jffs2 image from a laptop's internal NAND, producing an image that can be flashed onto a different XO. The laptop that is being backed up is the "host" laptop, and the laptop receiving the contents of the host laptop is the "target" laptop.
This document describes how to create a jffs2 image from a laptop's internal NAND, producing an image that can be flashed onto a different XO. The laptop that is being backed up is the "host" laptop, and the laptop receiving the contents of the host laptop is the "target" laptop.


If you instead want to create a new image from scratch, see [[Building custom images]].
=Basic Procedure=
Steps:


== Basic Procedure ==
* 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, you can <tt>rm /home/olpc/.sugar/default/config</tt>.


<font color="red">'''THESE INSTRUCTIONS ARE NO LONGER SUFFICIENT TO PRODUCE PRISTINE IMAGES SUITABLE FOR MASS-INSTALLATION.'''</font>
* Insert a Windows-formatted (VFAT) USB disk into the host laptop, and reboot.


Please consider using a [[customization key]], [[Building custom images|building a custom image]], using the alternate method described below, or [[Mounting jffs2 images|modifing a jffs2 image]], in this order. What ever you do, please be careful to diff the resulting build against the pristine version with commands like <tt>diff -NurP <from> <to></tt>, <tt>colordiff -NurP <from> <to></tt>, or <tt>xxdiff -r <from> <to></tt>.
* 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" prompt will return when the copy has finished, and you can then power the laptop off with the power button.


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


On recent Joyride (developer) builds, the [[Sugar_Control_Panel|sugar-control-panel]] can be use to change many setting, such as language. This may be sufficient for some customizations. For older builds, please follow the steps outlined below:
=Example Customizations=


* 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 <tt>/.olpc-configured</tt>. This will force the system to run the olpc-configure script in the next boot.
==Language==
Sometimes you may want to define the default language for the system, either for use or while localizing.


* IMPORTANT: Make sure you delete these files in <tt>/etc/ssh</tt>:
The ''/etc/sysconfig/i18n'' file defines the '''LANG''' variable that Sugar will use.
ssh_host_dsa_key
ssh_host_dsa_key.pub
ssh_host_key
ssh_host_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub


* Insert a Windows-formatted (VFAT) USB disk into the host laptop, and turn off.
==Keyboard==
If something went wrong in the software installation, or the manufacturing data does not match the actual keyboard in the system, you could conceivably have to set the keyboard type or change the language toggling to suite your needs.


* To restart hold the 'X' game pad key while pressing the power button. Type the "Esc" key at the "Type the Esc key to interrupt automatic startup"
No English language input is possible on the default image targeted at non-Latin-based languages (e.g. Arabic and Thai). To enable English input on those machines, follow the following steps:
# After the system has booted, press <tt>ctrl+alt+f1</tt>
# Login in as root (no password required)
# Open the file /etc/X11/xorg.conf for editing (use vi or any editor you are comfortable with)
# In the first InputDevice section do the following modifications:
#* Modify XkbLayout setting from "us" to "us,ara" (for Arabic&mdash;use other symbol files for other languages)
#* Add an XkbOptions option with the value "grp:ctrl_shift_toggle"
# Save and close the file
# Either reboot the machine or restart X by issueing a "/sbin/telinit 3" command and then "/sbin/telinit 5"


* At the "ok" prompt, type "<tt>save-nand disk:\nand.img</tt>" and press return. The contents of the NAND will be backed up to the <tt>nand.img</tt> file on the USB disk. The "ok" prompt will return when the copy has finished, and you can then power the laptop off with the power button.
After you make the modifications, the two lines in xorg.conf should be similar to the following

Option "XkbLayout" "us,ara"
* Since build 406, you need a checksum file to successfully upgrade the system. To create the CRC file see the Section [[#Creating CRC file]].
Option "XkbOptions" "grp:ctrl_shift_toggle"

* Move to the "target" laptop, and insert the USB disk. Again, interrupt at the prompt, and at the ok prompt type "<tt>copy-nand disk:\nand.img</tt>". This will copy from <tt>nand.img</tt> 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.

=== Alternative method ===

* Download the tarball of a development image, for example: http://download.laptop.org/xo-1/os/official/767/jffs2/os767.tar.bz2
* Create a temporary directory, and change into it.

mkdir /tmp/img
cd /tmp/img

* Unpack the tarball while preserving numeric ownership. You will need to be root to do this.

tar -C /tmp/img --numeric-owner -xjf os-*.tar.bz2

* Make any modifications you wish to make. If you want to install an RPM, you can do it by chrooting:

cp xxx.rpm /tmp/img/versions/pristine/*
chroot /tmp/img/versions/pristine/*
rpm -U /xxx.rpm
rm /xxx.rpm
exit

* Create a filesystem image. You will need the "crcimg" program from the [http://dev.laptop.org/git?p=users/cscott/pilgrim;a=summary pilgrim repository].

mkfs.jffs2 -n -e128KiB -r /tmp/img/ -o os123.pre
sumtool -n -p -e 128KiB -i os123.pre -o os123.img
crcimg os123.img
rm os123.pre

* Put the .img and .crc files on a USB key, as described in [http://wiki.laptop.org/go/Autoreinstallation_image#Preparing_the_autoupdate_image Preparing the autoupdate image].

== Example Customizations ==

=== Language ===
{{Merge|Checking_the_Layout_configuration}}

Sometimes you may want to define the default language for the system, either for use or while localizing. This can be changed using the [[Sugar Control Panel]]. The complete list of languages is in ''<tt>/usr/share/sugar/shell/controlpanel/control.py</tt>'' and also listed on the [[Sugar Control Panel]] page.

For example, the command to change to the Thai language:
sugar-control-panel -s language Thai

To Spanish (Mexico):
sugar-control-panel -s language Spanish/Mexico

To Brazilian Portuguese:
sugar-control-panel -s language Portuguese/Brasil

And back to English:
sugar-control-panel -s language English/USA

Note that you invoke these commands from the Terminal Activity; you must use Ctrl+Alt+Erase to restart Sugar in order to apply your changes.

'''Changing the language (of Sugar) is not the same as changing the keyboard configuration. To do the latter, see the following section.'''

<small>Note: Previously, we used ''<tt>/etc/sysconfig/i18n</tt>'' to define the '''<tt>LANG</tt>''' variable that Sugar will use. In recent (Joyride) builds, this file has been ''<tt>~/.i18n</tt>'' in order to move user-writable files to /home/olpc (See [[Olpc-utils]]).</small>

=== Keyboard ===
<div style="font-face:small;">
{{l10n-nav}}
</div>

{{Merge|Checking_the_Layout_configuration}}

''Note: There's currently no UI for customizing the keyboard. You have to
use a text editor (like nano) and be very careful not to make
mistakes: on security enabled laptops, it could be hard to recover
from a bad keyboard configuration.''

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

==== Since Ship.2 / Build 650 ====
Since Ship.2, the keyboard layout configuration lives in /etc/sysconfig/keyboard:

Simple example:
XKB_MODEL="olpc"
XKB_LAYOUT="us"
XKB_VARIANT="olpc"
KEYTABLE="us"

The definitive list of OLPC keyboard layouts and variants can be found in the [http://wiki.laptop.org/go/Manufacturing_data#Keyboards Manufacturing Data]. Examples for the XKB_LAYOUT include "es" for the Argentina keyboard layout, and "br" for the Brazil layout.

Complex example (showing X's ability to support multiple layouts on a keyboard that can be switched during use):
XKB_MODEL="olpc"
XKB_LAYOUT="us,ru,kz"
XKB_VARIANT="olpc2,olpc,olpc"
KEYTABLE="us"

These XKB (X Keyboard Extension) national layouts are standardized roughly
across countries: for example, a Portuguese layout for Portugal can and is
very different than the commonly used Portuguese layout found in Brazil. The
names of layouts are therefore more commonly related to countries than
language. You can find the database of layouts (many more than OLPC currently has keyboards designed for) in <tt>/usr/share/X11/xkb/symbols</tt>. More information on creating new XKB layouts can be found via Google.

These settings can be overridden on a per-user basis by creating a file called /home/olpc/.xkb containing the same variables.

==== Updating the xkbmap ====
To change the symbol mapping of the keyboard, follow the following steps:
# After the system has booted, switch to a [[Console]];
# Login in as root (no password required);
# Open the file <tt>/etc/X11/xorg.conf</tt> for editing (use <tt>vi</tt>, <tt>nano</tt> or any editor you are comfortable with);

You can view your current settings using the setxkbmap command:
setxkbmap -v

==== Before Build 623 ====
Until build 623, these parameters used to be in /etc/X11/xorg.conf. Look for lines like these:

Option "XkbModel" "olpc"
Option "XkbLayout" "us,ru,kz"
Option "XkbVariant "olpc2,olpc,olpc"

=== Timezone ===

Timezone information is stored in the file ''<tt>/etc/timezone</tt>''. For example, the east coast of the US is "<tt>America/New_York</tt>". This name references files found in ''<tt>/usr/share/zoneinfo</tt>'', that control the system's timezone and daylight savings time behavior.

NOTE: if there is no 'timezone' file, then create one. If there is no file, the default is GMT.

Now you can use the [[Sugar Control Panel|sugar-control-panel]] to set the timezone. Get the list of available timezones:

sugar-control-panel -h timezone

Get the current timezone:

sugar-control-panel -g timezone

Set the timezone (you must be root):

sugar-control-panel -s timezone [timezone]

e.g.

sugar-control-panel -s timezone Europe/Berlin

====Time====
You can set the time on your XO (if you are on line) using ntpdate:
ntpdate pool.ntp.org

This will also set the system clock, but not save the time in the hardware clock.

Use hwclock to set the hardware clock from the system time:
hwclock --systohc

=== Installing TrueType or OpenType Fonts ===

Either install as root prepackaged font package(s) from the Fedora repository as outlined below, or install the fonts in a subdirectory of ''<tt>/usr/share/fonts/ttf</tt>'' and run the ''<tt>fc-cache -f</tt>'' command afterwards.
: XXX: fonts should be installed in /home/olpc/.fonts if they are to persist across upgrades. [[User:CScott|CScott]] 16:11, 27 September 2007 (EDT)

=== Activities ===

To remove an activity from the build, delete the desired directory from: ''<tt>/usr/share/activities</tt>'':<br>
''<tt>rm -r TamTam.activity</tt>'' (for example)

To add an activity, install it in this same directory. Just <tt>unzip</tt> the .xo file to create <tt>/usr/share/activities/WhateverTheNameIs.activity/</tt> .

(Note that individuals can download activities (.xo files) into <tt>/home/olpc/Activities</tt> from the web browser. This will load an activity onto the clipboard (and into the Journal) from which it can be installed and run.)

=== Installing packages from the Fedora repositories using yum ===


After X is restarted, the default language will be english (that can be changed by swapping ''us'' and ''ara'' above), and you will be able to switch between languages using the <tt>ctrl+shift</tt> key combination.
==Installing packages from the Fedora repositories using 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:
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'''
'''<tt>init 3</tt>'''


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:
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>'''
'''<tt>yum upgrade <package name></tt>'''


To search for available packages you can use this command:
To search for available packages you can use this command:


'''yum search <keyword>'''
'''<tt>yum search <keyword></tt>'''

More information about using yum with fedora [http://docs.fedoraproject.org/yum/ can be found here].

<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">=== Installing Flash, Java, MP3 codecs, MPEG4, patented codecs === These [[RestrictedFormats|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.)</span> === Instalación de Flash, Java, codecs MP3, MPEG4, codecs patentados Estos === [[RestrictedFormats | Restringido Formatos]] tienen problemas que hace difícil o imposible para la OLPC para preinstalar, pero usted puede ser capaz y estar interesados en la implementación de sistemas de con estos preinstalado. (Tenga en cuenta que el plugin de Flash 9.0.31.0 Adobe es conocida por el trabajo y 9.0.60.120 no sea conocido por el trabajo.)</span>

=== Helix (Real) Media Player ===


More information about yum and fedora [http://docs.fedoraproject.org/yum/en/ can be found here].
==Installing Flash, Java, MP3 codecs, MPEG4, Patented Codecs==
These [[RestrictedFormats|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.
==Helix (Real) Media Player==
The [[Helix media activity]] page covers installation of this activity and its associated codecs.
The [[Helix media activity]] page covers installation of this activity and its associated codecs.

=== Forcing Sugar to reprompt for name and colors ===

You can always edit:
/home/olpc/.sugar/default/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 SSH keys in the <tt>./sugar/default</tt> directory.
rm /home/olpc/.sugar/default/config
rm /home/olpc/.sugar/default/owner.key
rm /home/olpc/.sugar/default/owner.key.pub
Note that:
# 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]].
# The above process '''does not''' clean out the Journal data repository&mdash;the additional step of deleting the directory <tt>/home/olpc/.sugar/default/datastore</tt> will empty the Journal;
rm -r /home/olpc/.sugar/default/datastore


Other sugar state can be reset as well.

* The additional step of deleting the contents of the directory <tt>/home/olpc/.sugar/default/nm</tt> will clear the Network Manager database;
rm /home/olpc/.sugar/default/nm/*
* The additional step of deleting <tt>/home/olpc/.sugar/default/friends</tt> will clear the Friends database;
rm /home/olpc/.sugar/default/friends

Or, you can use the [[Sugar Control Panel]].

== Creating CRC file ==

Currently we have 2 easy ways to create the CRC file:

'''OFW''' now creates both an .img and .crc file in save-nand.

Fedora 11 has a '''crcimg''' package containing the crcimg program. Install it and then from the command prompt create the crc from your custumized image:

crcimg myfile.img

Output is in <tt>myfile.crc</tt>

=== Other platforms ===

If crcimg is not pacakged for your version of Linux, you can:

* Use [[Image:Crcimg.sh]] - Linux crcimg executable
* Use [[Image:Crcimg.mm]] - Mac crcimg executable
* Compile the C version yourself -- from the Pilgrim repository
Download and compile pilgrim

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

==See also==
* [[Localization]]
* [[Olpc-utils]] and [[XO_l10n]], which describe various utilities for localization and customization on the XO.


[[Category:Developers]]
[[Category:Developers]]
[[Category:XO localization]]

Latest revision as of 07:56, 22 September 2011

  english | español HowTo [ID# 260616]  +/-  

This document describes how to create a jffs2 image from a laptop's internal NAND, producing an image that can be flashed onto a different XO. The laptop that is being backed up is the "host" laptop, and the laptop receiving the contents of the host laptop is the "target" laptop.

If you instead want to create a new image from scratch, see Building custom images.

Basic Procedure

THESE INSTRUCTIONS ARE NO LONGER SUFFICIENT TO PRODUCE PRISTINE IMAGES SUITABLE FOR MASS-INSTALLATION.

Please consider using a customization key, building a custom image, using the alternate method described below, or modifing a jffs2 image, in this order. What ever you do, please be careful to diff the resulting build against the pristine version with commands like diff -NurP <from> <to>, colordiff -NurP <from> <to>, or xxdiff -r <from> <to>.


On recent Joyride (developer) builds, the sugar-control-panel can be use to change many setting, such as language. This may be sufficient for some customizations. For older builds, please follow the steps outlined below:

  • 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.
  • IMPORTANT: Make sure you delete these files in /etc/ssh:
ssh_host_dsa_key
ssh_host_dsa_key.pub
ssh_host_key
ssh_host_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
  • Insert a Windows-formatted (VFAT) USB disk into the host laptop, and turn off.
  • To restart hold the 'X' game pad key while pressing the power button. Type the "Esc" key at the "Type the Esc key to interrupt automatic startup"
  • 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" prompt 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.

Alternative method

 mkdir /tmp/img
 cd /tmp/img
  • Unpack the tarball while preserving numeric ownership. You will need to be root to do this.
 tar -C /tmp/img --numeric-owner -xjf os-*.tar.bz2
  • Make any modifications you wish to make. If you want to install an RPM, you can do it by chrooting:
 cp xxx.rpm /tmp/img/versions/pristine/*
 chroot /tmp/img/versions/pristine/*
 rpm -U /xxx.rpm
 rm /xxx.rpm
 exit
  • Create a filesystem image. You will need the "crcimg" program from the pilgrim repository.
 mkfs.jffs2 -n -e128KiB -r /tmp/img/ -o os123.pre
 sumtool -n -p -e 128KiB -i os123.pre -o os123.img
 crcimg os123.img
 rm os123.pre

Example Customizations

Language

Merge-arrows.gif
It has been suggested that this article or section be merged with Checking_the_Layout_configuration. (Discuss)


Sometimes you may want to define the default language for the system, either for use or while localizing. This can be changed using the Sugar Control Panel. The complete list of languages is in /usr/share/sugar/shell/controlpanel/control.py and also listed on the Sugar Control Panel page.

For example, the command to change to the Thai language:

sugar-control-panel -s language Thai

To Spanish (Mexico):

sugar-control-panel -s language Spanish/Mexico

To Brazilian Portuguese:

sugar-control-panel -s language Portuguese/Brasil

And back to English:

sugar-control-panel -s language English/USA

Note that you invoke these commands from the Terminal Activity; you must use Ctrl+Alt+Erase to restart Sugar in order to apply your changes.

Changing the language (of Sugar) is not the same as changing the keyboard configuration. To do the latter, see the following section.

Note: Previously, we used /etc/sysconfig/i18n to define the LANG variable that Sugar will use. In recent (Joyride) builds, this file has been ~/.i18n in order to move user-writable files to /home/olpc (See Olpc-utils).

Keyboard

Sugar framework
Python framework
Localizing an XO
Keyboards
Changing language
Translators
Getting started
Website translation
modify 
Merge-arrows.gif
It has been suggested that this article or section be merged with Checking_the_Layout_configuration. (Discuss)


Note: There's currently no UI for customizing the keyboard. You have to use a text editor (like nano) and be very careful not to make mistakes: on security enabled laptops, it could be hard to recover from a bad keyboard configuration.

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

Since Ship.2 / Build 650

Since Ship.2, the keyboard layout configuration lives in /etc/sysconfig/keyboard:

Simple example:

 XKB_MODEL="olpc"
 XKB_LAYOUT="us"
 XKB_VARIANT="olpc"
 KEYTABLE="us"

The definitive list of OLPC keyboard layouts and variants can be found in the Manufacturing Data. Examples for the XKB_LAYOUT include "es" for the Argentina keyboard layout, and "br" for the Brazil layout.

Complex example (showing X's ability to support multiple layouts on a keyboard that can be switched during use):

 XKB_MODEL="olpc"
 XKB_LAYOUT="us,ru,kz"
 XKB_VARIANT="olpc2,olpc,olpc"
 KEYTABLE="us"

These XKB (X Keyboard Extension) national layouts are standardized roughly across countries: for example, a Portuguese layout for Portugal can and is very different than the commonly used Portuguese layout found in Brazil. The names of layouts are therefore more commonly related to countries than language. You can find the database of layouts (many more than OLPC currently has keyboards designed for) in /usr/share/X11/xkb/symbols. More information on creating new XKB layouts can be found via Google.

These settings can be overridden on a per-user basis by creating a file called /home/olpc/.xkb containing the same variables.

Updating the xkbmap

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

  1. After the system has booted, switch to a Console;
  2. Login in as root (no password required);
  3. Open the file /etc/X11/xorg.conf for editing (use vi, nano or any editor you are comfortable with);

You can view your current settings using the setxkbmap command:

setxkbmap -v

Before Build 623

Until build 623, these parameters used to be in /etc/X11/xorg.conf. Look for lines like these:

 Option "XkbModel"  "olpc"
 Option "XkbLayout" "us,ru,kz"
 Option "XkbVariant "olpc2,olpc,olpc"

Timezone

Timezone information is stored in the file /etc/timezone. For example, the east coast of the US is "America/New_York". This name references files found in /usr/share/zoneinfo, that control the system's timezone and daylight savings time behavior.

NOTE: if there is no 'timezone' file, then create one. If there is no file, the default is GMT.

Now you can use the sugar-control-panel to set the timezone. Get the list of available timezones:

sugar-control-panel -h timezone

Get the current timezone:

sugar-control-panel -g timezone

Set the timezone (you must be root):

sugar-control-panel -s timezone [timezone]

e.g.

sugar-control-panel -s timezone Europe/Berlin

Time

You can set the time on your XO (if you are on line) using ntpdate:

ntpdate pool.ntp.org

This will also set the system clock, but not save the time in the hardware clock.

Use hwclock to set the hardware clock from the system time:

hwclock --systohc

Installing TrueType or OpenType Fonts

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.

XXX: fonts should be installed in /home/olpc/.fonts if they are to persist across upgrades. CScott 16:11, 27 September 2007 (EDT)

Activities

To remove an activity from the build, delete the desired directory from: /usr/share/activities:
rm -r TamTam.activity (for example)

To add an activity, install it in this same directory. Just unzip the .xo file to create /usr/share/activities/WhateverTheNameIs.activity/ .

(Note that individuals can download activities (.xo files) into /home/olpc/Activities from the web browser. This will load an activity onto the clipboard (and into the Journal) from which it can be installed and run.)

Installing packages from the Fedora repositories using 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.

=== Installing Flash, Java, MP3 codecs, MPEG4, patented codecs === 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.) === Instalación de Flash, Java, codecs MP3, MPEG4, codecs patentados Estos ===  Restringido Formatos tienen problemas que hace difícil o imposible para la OLPC para preinstalar, pero usted puede ser capaz y estar interesados en la implementación de sistemas de con estos preinstalado. (Tenga en cuenta que el plugin de Flash 9.0.31.0 Adobe es conocida por el trabajo y 9.0.60.120 no sea conocido por el trabajo.)

Helix (Real) Media Player

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

Forcing Sugar to reprompt for name and colors

You can always edit:

/home/olpc/.sugar/default/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 SSH keys in the ./sugar/default directory.

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

Note that:

  1. 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.
  2. The above process does not clean out the Journal data repository—the additional step of deleting the directory /home/olpc/.sugar/default/datastore will empty the Journal;
rm -r /home/olpc/.sugar/default/datastore


Other sugar state can be reset as well.

  • The additional step of deleting the contents of the directory /home/olpc/.sugar/default/nm will clear the Network Manager database;
rm /home/olpc/.sugar/default/nm/*
  • The additional step of deleting /home/olpc/.sugar/default/friends will clear the Friends database;
rm /home/olpc/.sugar/default/friends

Or, you can use the Sugar Control Panel.

Creating CRC file

Currently we have 2 easy ways to create the CRC file:

OFW now creates both an .img and .crc file in save-nand.

Fedora 11 has a crcimg package containing the crcimg program. Install it and then from the command prompt create the crc from your custumized image:

crcimg myfile.img

Output is in myfile.crc

Other platforms

If crcimg is not pacakged for your version of Linux, you can:

  • Use File:Crcimg.sh - Linux crcimg executable
  • Use File:Crcimg.mm - Mac crcimg executable
  • Compile the C version yourself -- from the Pilgrim repository

Download and compile pilgrim

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

See also