Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Getting Started
Hints and Tips
ST Logo
Previous   Contents   Next

This page contains a few small tips which may come in useful, and which don't really fit in anywhere else. Most of them relate to post install configuraton which you may want to do.

CTRL-C on default console

One of the problems you may find is that CTRL-C doesn't work when using a serial console. This is because by default the console is started using the device /dev/console, and attempting to set the process group of this device always fails. The easiest way to overcome this is to edit /etc/inittab and search for lines which contain /sbin/getty. Comment out the line which starts getty on /dev/console, and add a new line:

S0:2345:respawn:/sbin/getty -L ttySC0 115200 vt102

replace ttySC0 with the appropriate serial device, and follow this by the baud rate and default terminal type (which is what the TERM environment variable will be set to).

BusyBox

BusyBox version of init can run quite happily without an /etc/inittab, but in this case it will suffer from the same problem, that the shell will be running on /dev/console.

In this case you can perform the same change, which may involve creating a new /etc/inittab if there wasn't one present before. Note that the syntax for /etc/inittab when using the BusyBox version of init is slightly different. So an example /etc/inittab would be:

::sysinit:/etc/init.d/rcS
ttyAS1::askfirst:/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
::restart:/sbin/init

Here the second line is starting a shell on the specified console, in this case /dev/ttyAS1.

Setting the timezone

When the system is first installed, the target doesn't know what timezone it is in, so will display all times as UTC. To set the correct timezone, simply put in a symbolic link to the correct timezone file, for example for GB:

ln -s /usr/share/zoneinfo/GB /etc/localtime

Checking the root filesystem at boot time

If your root file system is one which need to be checked (for example ext2), then a simple change will allow it to be checked automatically at boot time. In the file /etc/fstab, the final column (marked "pass") indicates whether the file system should be checked. Change this from a 0 to 1 for all file systems you want checked.

Network name services

There are two services you may want to configure for accessing network name services:

  • Domain Name System (DNS) is used primarily for converting machine names into IP addresses. It will be required if you want to contact other machines on the Internet directly, and may also be used for local network address resolution.

    To use this you need to set up the file /etc/resolv.conf (note there is no "e" on the end). Usually a few lines:

    domain bri.st.com
    nameserver 164.129.8.1
    nameserver 164.129.8.2
    
    specifying your domain name and the IP address of your name servers will be sufficient.
  • The Network Information Service (NIS) - previously known as Yellow Pages (YP) - allows many of the information files which are traditionally used in Unix systems to be replaced by accesses to remote databases.

    Lots of configuration is possible, so you may like to have a look at the Linux NIS HOWTO. However usually only two things need to be done: in /etc/defaultdomain put your NIS domain name, for example:

    inmos.co.uk
    
    and in /etc/yp.conf add a line which describes how to find your NIS server, for example:
    domain inmos.co.uk broadcast
    

Hostname

The hostname can be set in several ways:

  • Assuming you are using IP autoconfiguration, it can be specified on the kernel command line using the fifth argument to the ip= option.
  • Alternativly it can be set by putting the name into the /etc/hostname file.

Serial ports on the STm8000

The STm8000 doesn't use the standard SuperH serial ports (ttySCn), instead it uses the asynchronsous serial controllers (ASC's) which are part of the comms block. These use a different device driver, and so have different device names and major/minor numbers:

Device Major Minor Callout device Major Minor
/dev/ttyAS0 204 40 /dev/cuas0 205 40
/dev/ttyAS1 204 41 /dev/cuas1 205 41

Note that these numbers have not been officially recognised, and so may have to change at some point in the future.

Previous   Contents   Next
Valid HTML 4.01! Last updated: 2004/09/23 11:09:16
© Copyright STMicroelectronics Limited, 2005
Printer