M a r k   C r o s b i e

You are in: Linux on Omnibook 5700  Home  Resume  Linux  LEGO  Electronics  Movies  Mac OS X 


Linux on Omnibook 5700


These pages are not maintained!!

My Omnibook 5700 pages are not being actively maintained. I have moved on from my trusty 8 pound brick and so will not be updating the page in the future. I've lugged that monster all over the world... Australia, Ireland, England, France, Germany, all over the US... (you should see my left shoulder muscles!)




Basic Install

I downloaded the Mandrake 7.1 install image and wrote a boot floppy. I backed up my data from a previous RedHat installation and reinstalled.

PCMCIA Support

PCMCIA cards provide a wide variety of extra functionality for laptops that are usually found on ISA or PCI cards in desktop systems. For example, I have PCMCIA modems, ethernet cards, wireless network cards and SCSI controllers.

PCMCIA support comes packaged with the Mandrake 7.1 installation by default. You can find the source code for it in /usr/src/ linux/pcmcia-cs-3.x.xx after installation (the digits marked as x may be different for you installation). Alternatively, you can obtain the software from ftp://projects.sourceforge.net/pub/pcmcia-cs.

The /etc/sysconfig/pcmcia file controls the PCMCIA controller setup:
PCMCIA=yes
PCIC=i82365
PCIC_OPTS=
CORE_OPTS=
			


That tells it to use the Intel PCI controller that the Omnibook uses. You don't need any options. settings. You should be able to reboot and it will pick up the controller fine. Alternatively, you can just re-run the rc script that starts the PCMCIA controller and you will avoid having to reboot (thanks for the tip, Werner!):
 /etc/rc.d/init.d/pcmcia restart 


After you do an install, make sure that the /etc/sysconfig/pcmcia file is set as above, and that the /etc/pcmcia/config.opts file has the correct value on the second line, it should be 0xd0000 not 0xc0000.

Type dmesg to see what kernel messages the PCMCIA package gave you. It should read something like (sample output for my Linksys ethernet card):
Linux PCMCIA Card Services 2.9.12
  Kernel build: 2.0.32 #1 Tue Feb 17 13:57:17 PST 1998
Intel PCIC probe: 
  TI 1131 CardBus at 0x3e0 ofs 0x00, mem 0x68000000, 2 sockets
    host opts:  [serial irq]
    irq list (scanned) = 3,4,7,10,11,15 status change on irq 15
cs: IO port probe 0x0100-0x03ff: excluding 0x200-0x207 0x220-0x22f 
0x330-0x337 0x388-0x38f
cs: IO port probe 0x0a20-0x0a27: clean.
cs: memory probe 0x0d0000-0x0fffff: excluding 0xe0000-0xfffff
loading device 'eth0'...
eth0: NE2000 Compatible: port 0x300, irq 3, hw_addr 00:E0:98:00:9B:41
eth0: transceiver selection not implemented
			
eth0 is the interface that is created automagically by the cardctl PCMCIA loader. Don't worry about the last line in the above report, it still works fine.

TCP/IP Networking

Once you have PCMCIA support working, the ethernet driver will be loaded by default. Most Ethernet devices are created when the Ethernet card is installed. For example, /dev/le0, dev/lan0 or /dev/eth0 are common names for the Ethernet device. However, unlike regular Ethernet cards (e.g. ISA cards), PCMCIA cards have the device created dynamically when the card is inserted. So you won't find any of the above devices present in the /dev directory.

Once the Ethernet card is inserted, the eth0 pseudo-device is created. To check whether it is there, use the ifconfig(8) command. It will show you the current interfaces that are active, and the IP addresses assigned to them. Even if you have no Ethernet card installed, you should still see the "loopback" device: lo0. For example, here is the output when I run ifconfig:
localhost ~ (2) ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0
          TX packets:68 errors:0 dropped:0 overruns:0

eth0      Link encap:Ethernet  HWaddr 00:E0:98:00:9B:41
          inet addr:15.0.111.202  Bcast:15.0.111.255 
Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0
          Interrupt:3 Base address:0x300 
		        
The lo0 device always has the address 127.0.0.1. As you can see, the interface is active (RUNNING) and enabled (UP).

The eth0 device is also present, and has the address 15.0.111.202. This is the IP address assigned to my laptop when it is at home. See the section on Multiple IP addresses for information on how I maintain an IP address for both home and work.

The best information on setting up networking is contained in the networking HOWTO.

X Windows Support

X Windows is not difficult to get working on an OmniBook 5500 or 5700. XFree86 has support for the Chips and Technologies 655xx chipset which drives the video system on the OmniBook. The tricky part is getting the X video timing configuration correct.

X windows is a client-server protocol: a server controls the screen of your computer, and a client connects to it to draw windows on the screen, use the mouse or accept keyboard input. Without getting into the details of how this all works, all we need to do is configure the X server to understand the layout of your laptop's screen and what resolution to use.

In the Mandrake distribution there are a number of X servers, each written for a specific graphics cards. You can find them in the /usr/X11R6/bin directory.. In addition, there are two generic X servers: XF86_SVGA and XF86_VGA for generic Super VGA and regular VGA support.

The key configuration file for starting X windows is the /etc/X11/XF86Config file. Here you will find the definition of different monitor and video card types, the frequency settings for various different display settings and the paths to various files. If you are exceptionally lucky, your XF86Config file will contain everything you need to get X Windows started on your Omnibook. If you are like me, and not so lucky, you've a little typing to do (but only a little).

What can go wrong?

WARNING: I have ruined the display on one laptop by using incorrect settings in the /etc/X11/XF86Config file. Think before you commit any changes!!

Ok, a little explanation is required here. You need to specify the scan and refresh rates for your monitor in the XF86Config file. But a laptop display generally does not conform to any standard monitor setting. I incorrectly set the timing values for a Super VGA display, and the screen on my laptop promptly whited out. It was toasted so bad I had to send it back to be repaired. Lesson learnt.

At any time you can hit CTRL-ALT-BACKSPACE to quit the X server and return to a text-mode prompt.

The Magic of Modelines

The ModeLine section of the XF86Config file is where the main magic happens. This is where to put the timing declarations for the laptop screen. For my OmniBook 5700, the settings are as follows:

Modeline "1024x768"     65.00   1024 1032 1176 1336    768  771  777  806 
-hsync -vsync
			
This lines sets the DotClock frequency to 65Mhz, the Horizontal timings to 1024 1032 1176 1336 and the Vertical timings to 768 771 777 806.

How did I obtain these values (safely)? Help is at hand - the xvidtune program will test your display and give the correct readings for a given solution. Xvidtune usually lives in /usr/X11R6/bin/xvidtune. It displays the settings for the horizontal and vertical timings. You use the "Wider", "Narrower", "Shorter" and "Taller" buttons to adjust the desired width of your display. Xvidtune will determine if that resolution is possible on your display. When you are happy with the settings, click the "Show" button to see the correct line to put in you XF86Config file.

There's no need to comment out the other ModeLine entries - the X Server will try them each in turn and use the first one that fits. So put your ModeLine entry first and it will be used before the others.

A Few Final Settings

Nearly there! The last two settings needed are the HorizSync and VertRefresh settings. These two values are output from xvidtune when you click the "Show" button. For my laptop, the output of xvidtune reads as follows:
Vendor: HP, Model: Unknown
Num hsync: 1, Num vsync: 1
hsync range 0:  48.36 -  48.36
vsync range 0:  60.00 -  60.00
"1024x768"     65.00   1024 1032 1176 1344    768  771  777  806
-hsync -vsync
			
I use the line that reads hsync range for my HorizSync setting, and the line that reads vsync range for my VertRefresh setting. So these lines appear in my XF86Config file:
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
 HorizSync   48.36

# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
  VertRefresh 60

			

Mousing Around

Now that the graphical settings are taken care of, we need to get that pesky internal pointer working. On an Omnibook, this is a PS/2 type mouse. You need to specify this in the XF86Config file in the Pointer section as follows:
Section "Pointer"
    Protocol    "PS/2"
    Device      "/dev/mouse"
			
This sets the X Server up to expect the device /dev/mouse to behave like a PS/2 mouse. NOTE: if you connect an external mouse see below. External mice will generally behave like a Microsoft serial mouse.

The pointer on an Omnibook is equivalent to a 2 button mouse. But what about cases where you need the middle mouse button? There is a feature called Emulate3Buttons that will generate a middle button press if you quickly press the two real mouse buttons together. In other words, if you press the two mouse buttons on the Omnibook it will generate an X event equivalent to a middle button press.

To enable middle-button emulation, uncomment the line as follows:
# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
    Emulate3Buttons
    Emulate3Timeout    50
			
You may need to adjust the Emulate3Timeout so you can reliable press the two Omnibook pointer buttons and generate the middle button event.

Finally, you need to create the /dev/mouse file if it does not already exist. As root, look in the /dev directory. I create a symbolic link from /dev/mouse to /dev/psaux as follows: ln -s /dev/psax /dev/mouse

You should now be able to start up your X server by typing startx at the command line when logged in. Very little will probably happen, unless you have already configured your window manager. To exit the X server press: CTRL-ALT-BACKSPACE and the X server will exit.

Power Management

The OmniBook has an Advanced Power Management compliant BIOS, meaning that you can put it to sleep, and it will wake up cleanly as if nothing had happened. Linux needs a little extra help in this regard - you must compile the kernel with the APM support enabled.

Kernel Configuration Settings

I have put my kernel configuration file online so you can work from it. It is optimised for my 5700, but you can work on selectively disabling stuff until things boot. Put it in /usr/src/linux/.config and run your compile.

Multiple IP addresses

The whole point of a laptop is to be portable. But most computers have only one network address assigned to them, so how can they move around and plug into different networks? While it is true that at any one time a computer can only have one IP address, that address can change at any point! This is the key to supporting multiple IP addresses with the PCMCIA package on your Omnibook.

The PCMCIA package uses the file /var/run/pcmcia.scheme to determine the current scheme. The scheme is a name for your current PCMCIA settings. So you can have a home scheme, a work scheme, or as many different schemes as you please. You just give them each a unique name, and when that name is in the /var/run/pcmcia.scheme file, that scheme will be activated.

The cardctl command can be used to start and stop schemes, and to switch schemes. However, I prefer to completely shut down networking, make the change by hand, and then restart networking again. I'll discuss this in a moment.

To determine how to set up your network address, the PCMCIA package uses the file /etc/pcmcia/network.opts. This file contains a number of entries that specify network settings. The entries are indexed on the scheme setting in the /var/run/pcmcia.scheme file. Let's examine what my network.opts file looks like (these aren't my real IP addresses or machines names):
case "" in
work,*,*,*)
    HOSTNAME="linuxwork"
    IF_PORT="10baseT"
    BOOTP="n"
    # IP address
    IPADDR="1.2.3.4"
    # Netmask
    NETMASK="255.255.248.0"
    # Network address
    NETWORK="1.2.3.0"
    # Broadcast address
    BROADCAST="1.2.3.255"
    # Gateway address
    GATEWAY="5.6.4.7"
    # Domain name
    DOMAIN="hp.com"
    # Nameserver #1
    DNS_1="1.2.3.5"
    ;;
home,*,*,*)
    HOSTNAME="linuxhome"
    IF_PORT="10baseT"
    BOOTP="n"
    # IP address
    IPADDR="1.2.10.1"
    # Netmask
    NETMASK="255.255.255.248"
    # Network address
    NETWORK="1.2.10.0"
    # Broadcast address
    BROADCAST="1.2.10.255"
    # Gateway address
    GATEWAY="1.2.10.97"
    # Domain name
    DOMAIN="hp.com"
    # Nameserver #1
    DNS_1="1.2.7.11"
    DNS_2="1.2.8.3"
    ;;
esac
			
Each entry is index by its scheme name, so the first entry is for the work scheme, and the second entry is for the home scheme. The various network settings are then defined. The most important ones are obviously your IP address (IPADDR) and netmask (NETMASK). Without these the network interface will not run.

Then the network address (NETWORK) for your machine is defined. It is the bitwise AND of the IPADDR entry and the NETMASK. The BROADCAST address is how to send a packet to all the machines on your local subnet. The GATEWAY identifies your main gateway off your local subnet to the outside world. If all the machines you need to access are on the same subnet, you will ot need a GATEWAY setting.

The DOMAIN setting specified which DNS domain you below to. For example, in the first setting, the machine is named linuxwork and the domain is hp.com, so your fully qualfied machine name is linuxwork.hp.com.

Finally, the Domain Name Server entries are specified. You can specify two entries; the second one is used if the first one is unreachable. You do not have to specify any DNS server. You can identify machines solely by their IP address, or Linux will use the /etc/hosts file to map machine names to IP addresses.

Having set up this file, you now need a way to tell Linux to switch network settings. This isn't Windows, so we don't want to reboot between every change. And that is possible, using a simple script like the following:
#!/bin/sh
#
# Switch to home configuration

echo "Switching to home configuration..."
umask 22
cp /var/run/pcmcia-scheme.home /var/run/pcmcia-scheme
cp /etc/resolv.conf.hp /etc/resolv.conf
cp /etc/sysconfig/network.home /etc/sysconfig/network

/etc/rc.d/rc2.d/S45pcmcia restart
sleep 2
chmod a+r /etc/resolv.conf
cp /etc/X11/XF86Config.internalmouse /etc/X11/XF86Config

hostname linuxhome

cp /home/mcrosbie/.netscape/preferences-hp 
/home/mcrosbie/.netscape/preferences

# Stop some network daemons
/etc/rc.d/init.d/cfsfs stop
/etc/rc.d/init.d/portmap stop
/etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/httpd stop

# Start the network daemons
/etc/rc.d/init.d/portmap start
/etc/rc.d/init.d/nfs start
/etc/rc.d/init.d/httpd start
/etc/rc.d/init.d/cfsfs start

umask 77
			
The script may seem complex, but in essence it is very simple: we change the contents of the /var/run/pcmcia.scheme file, we restart the PCMCIA daemons, and then we change the hostname. However, there are some network daemons already running which are affected by a hostname and IP address change. The RPC daemons that handle NFS traffic get very unhappy if you change IP address while they are running.

To prevent trouble, we stop some network daemons, and restart them again. They will restart and use the new machine name and IP address.

Notice that I keep multiple copies of the /var/run/pcmcia.scheme file. Each copy just has one word in it: work or home. Alternatively, you could just overwrite the pcmcia.scheme file by using echo in this script. Notice too that I keep copies of the /etc/resolv.conf file. This file specifies which DNS server to use to resolve names. When I switch to my ISP I need to change this file. For some reason, the DNS setting in the /etc/pcmcia/network.opts file does not work.

Remapping your keyboard

One problem with a laptop keyboard is that it never seems to have the keys in the right place. I found that the Control and Caps Lock key were in the wrong place, so they needed to be swapped. Luckily the xmodmap (1) program can re-map your keyboard so that when you press one key, the code for another is generated.

To re-map the Caps Lock key so it generates the code for Control, and vice versa:
!
!Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
			
Place this text in a file called (say) keymap, and then run /usr/X11R6/bin/xmodmap keymap. Now your Control key will activate the Caps Lock, and Caps Lock will generate a Control key code.

Put the above text into a file named .Xmodmap in your home directory and then the keyboard re-mappings will be loaded when you start X Windows.

For a much more detailed look at remapping your keyboard, see the (very aptly named) The BackSpace and Delete Configuration page.

Dual Booting with Windows

Linux can boot many operating systems: all you have to do is tell it where they exist on your disks. The LInux LOader (LILO) controls what OS is booted. Here is my /etc/lilo.conf file that specifies a variety of OSes to load:
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
timeout=300
append="mem=127M"

image=/boot/bzImage.222
	label=linux222
	root=/dev/sda1
	read-only

image=/boot/bzImage.220
	label=linux220
	root=/dev/sda1
	read-only

image=/boot/vmlinuz-2.0.34.stable
	label=linux-stable
	root=/dev/sda1
	read-only
	initrd=/boot/initrd-2.0.34-0.6.img

image=/boot/vmlinuz-2.0.36
	label=linux-2.0.36
	root=/dev/sda1
	read-only
	initrd=/boot/initrd-2.0.34-0.6.img



© 2002-2004 Mark Crosbie   shareright © 2002 Phlash