Development/Developers

From LinutopWiki

Contents

Printer Administration

1. Open a browser window.
2. Type the URL: http://localhost:631
3. Follow the instructions in the CUPS administration menu.
4. Commit the changes as 'root'.

Pre-Production Linutop configuration

Configuring the keyboard map (X.org)

1. Open a terminal.
2. Become root using the 'su' command.
3. Type: dpkg-reconfigure xserver-xorg.
4. Follow all questions until the one about the 2-letter code for the keyboard language.
5. Continue until the last question.
6. Reboot the Linutop.

Configuring the Time Zone

1. Open a terminal.
2. Become root using the 'su' command. 
3. Type: tzconfig.
4. Follow the instructions in the menu and select the nearest capital corresponding to your time zone.
5. Reboot the Linutop.

Upgrading to LinuxBIOS

This operation must be performed only once and it only concerns early development prototypes. Standard Linutop units already come with LinuxBIOS pre-installed.

It requires booting from an LPC dongle that contains a General BIOS image configured for booting from USB. After connecting the dongle and rebooting the Linutop, perform the following steps:

1. Close all applications.
2. Open a terminal.
3. Become root using the 'su' command.
4. Type: cd
5. Type: ./flashkernel.sh
6. Type: cd /lib/modules/2.6.18-lx/kernel/drivers/mtd
7. Type: ./flashrom lb_dbe61b_10_222.rom
8. Disconnect the LPC dongle.
9. Type: exec reboot.

Building a JFFS2 fileystem image for NAND

This operation requires connecting the USB stick containing the prototype OS filesystem into a workstation running Linux. The current version of mtd-tools must be installed on the workstation.

cmdline arguments

The FILO bootloader (a component inside LinuxBIOS) uses an MTD partition map, passed as arguments via bootloader options, to determine the topology of the NAND device. A command line might appear as:

mtdparts=dbe61_nand:4m@0m(kernel),500m@5m(os)

Prior to copying the final product's JFFS2 image to the NAND, similar options must be passed to GRUB when booting via the LPC dongle.

Generating the kernel image

Once we are satisfied with our prototype OS, we must write the Linux kernel and its initrd.img to the first partition of the NAND, identified as /dev/mtd0, followed by the OS root filesystem to /dev/mtd1.

Writing the kernel is performed using 'imagewrite' via a convenience script called flashkernel.sh that is located in the development filesystem's /root directory.

The cmdline options must be adapter to reflect the content of the NAND and the fact that we are using a JFFS2 root, thus the complete cmdline.txt used by imagewrite might appear as:

mtdparts=dbe61_nand:4m@0m(kernel),500@5m(os) root=/dev/mtdblock1 rootfstype=jffs2

Generating the root filesystem iamge

Producing the root filesystem requires connecting the development USB fielsystem prototype into a workstation running Linux and utilizing mtd-tools. A typical utilization might appear as:

sudo mkfs.jffs2 -p -n -s 2048 -e 128KiB -r /media/usbkey/ -o linutop512_mtd1.jffs2

Once the image file has been generated, it must be copied to a spare USB stick. Then, rebooting the Linutop using the LPC dongle, that stick shall be inserted at the end of the boot process and mounted manually to e.g. /mnt for further manipulation. The same flashkernel.sh script includes a call to 'nandwrite' that copies the image to /dev/mtd1 using a syntax such as:

nandwrite -q -p /dev/mtd1 /mnt/linutop512_mtd1.jffs2

Note that the content of /etc/fstab must be adjusted on the target NAND filesystem present at /dev/mtdblock1, following the image writing process.