This guidance is based on my experiences with installation of Debian (stable) on a mini itx mainboard from Via.
Version: 0.61, 15.12.2003 - English
Contents:
1 Preface
This guidance will help with installing installing a normal desktop computer based on Debian stable (Woody). If you want to set up a video recorder with Linux operating system, It is assumed to install Debian testing (Sarge) instead.
Used hardware
- Main board Epia M10000-n (Nehemiah)
- Non removable disk for notebooks (2.5'')
- CD drive assembly
- USB devices of different kind
- CRT monitor (tube monitor)
This small guidance is extended constantly and I hope that it is useful to the reader.
Jutta Wrage
2 Basic Installation
The basic installation is done with default idepci installation kernel. All modules and programs are included, if installation is done from CD.
When installing the network device the driver must be via-rhine. When I installed over network, this driver already was compiled into the kernel on my installation CD.
When doing the basic installation I selected Xfree86 4.1. As graphics driver there may be choosen vga or vesa. As a result X should be running with bad monitor frequency. This must be corrected later on if the display does support higher frequencies.
Next step is running dselect and installation of other needed software. The system should start up normal after this and be somewhat usable.
To be able to do a system shutdown with "poweroff", APM with have to be activated. This is done by adding an entry apend="apm=on" in Lilo config.
Back to contents
3 System adjustments for Epia boards
3.1 Installing a new kernel
There are two ways to install a more fitting kernel:
- compiling and installing kernel version 2.4.22 from Debian testing
- compiling and installing kernel 2.4.23 specially patched for Epia boards
Back to contents
3.1.1 Kernel version 2.4.22 from Debian testing
The source package for kernel version 2.4.22 may be downloaded from Debian server (testing or unstable). Installation works as usual:
dpkg -i kernel-source-2.4.22_2.4.22-3_all.deb
Location of the source now is /usr/src. You may now unpack und configure the source. Making your own kernel package is done with make-kpkg. Those not familiar with making their own kernel package may find documentation on the Debian projekt web site. We will not explain it here further more
cd /usr/src/ tar xvjf kernel-source-2.4.22.tar.bz2 cd kernel-source-2.4.22 make menuconfig
Some of my changes to the kernel configuration:
x86 processor famliy
Via processor (CONFIG_MVIAC3_2=y)
apm, acpi, i2c, firewire
experimental drivers CONFIG_EXPERIMENTAL
APM
ACPI (off at startup)
support for USB
SCSI dummy
via-rhine als network driver
My kernel configuration may be downloaded:
wget http://witch.westfalen.de/via/config.2.4.22.hexe.10
as an example.
If configuration is done the new kernel can be packed and installed:
make-kpkg --revision=name.version kernel_image modules_image cd .. dpkg -i kernel-image-2.4.22_name.version_i386.deb
where name.version is to be replaced by your own name and version. if there is an additional modules image, it must be installed same way as the kernel.
At this stage of installation usb and - if you follow the addional notices about installing lm-sensors and i2c - and the sensors may be used.
Back to contents
3.1.2 Kernel adapted for Epia boards
To get some better results you will have to do some more steps. As a basis we take again kernel source 2.4.22. In addition we need a kernel patch 2.4.23 and the epia patch.
Fetching the files needed:
wget http://www.de.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2 wget http://www.de.kernel.org/pub/linux/kernel/v2.4/testing/old/patch-2.4.23-pre9.bz2 wget "http://www.alterself.com/~epia/files/epia_kernel/patch-2.4.23-pre9-epia1.gz"
After copying the files to /usr/src (or where your source is located) the must be unpacked:
tar -xvzf linux-2.4.22.tar.gz gunzip patch-2.4.23-pre9-epia1.gz bunzip2 patch-2.4.23-pre9.bz2
Switching into the source directory:
cd /usr/src/linux-2.4.22
To test the patches and what they would do option --dry-run may be used. With this option nothing will be changed inside the kernel tree:
patch -p1 --dry-run < ../patch-2.4.23-pre9 patch -p1 < ../patch-2.4.23-pre9 patch -p1 --dry-run < ../patch-2.4.23-pre9-epia1 patch -p1 < ../patch-2.4.23-pre9-epia1
Next step is adding the modules, if already created (please, have a look to the section about i2c and lm-sensors further down):
cd /usr/src rm -rf modules tar -xvzf ../i2c.tar.gz tar -xvzf ../lm-sensors.tar.gz
To compile the source of lm-sensors from testing on Woody, I had to make some changes to the make file. You may get a diff file which hopfully works at www.witch.westfalen.de:
cd /usr/src wget http://www.witch.westfalen.de/via/patch.lm-sensors-source.hexe.2 patch -p0 --dry-run < patch.lm-sensors-source.hexe.2 patch -p0 < patch.lm-sensors-source.hexe.2
Now an existing kernel configuration may be copied to .config in the root of the kernel source. There are some configurations as an example at http://www.witch.westfalen.de/via/. The first one is without lp support, the others include lp support. In the third one DirectFB CLE266 Support (EXPERIMENTAL) ist activated:
wget http://www.witch.westfalen.de/via/config.2.4.22.hexe.epia.1 oder wget http://www.witch.westfalen.de/via/config.2.4.22.hexe.epia.2 oder wget http://www.witch.westfalen.de/via/config.2.4.22.hexe.epia.3
Now configuration, making the packages and installation follow:
make menuconfig make-kpkg --revision=hexe.epia.1 kernel-image modules-image cd .. dpkg -i kernel-image-2.4.23-pre9-epia1_name.epia.1_i386.deb dpkg -i i2c-2.4.23-pre9-epia1_2.8.0-2+name.epia.1_i386.deb dpkg -i lm-sensors-2.4.23-pre9-epia1_2.8.0-2+name.epia.1_i386.deb
If you have configured ACPI correctly, you should be able to shut down the system using the power off switch. The Computer must be rebooted with the new kernel before.
Here another configuration as an example:
wget http://www.witch.westfalen.de/via/config.2.4.22.hexe.epia.1
Back to contents
3.2 Xfree86
To get a frequency for the display better than 60 Hz from vesa driver, Xfree either has to be replaced by Xfree86 4.3.99 or as a workaround the binaries on the CD coming with the board may be installed.
There is a file named CLEXF40016.tgz` in the linux directory on CD. This will have to be copied and unpacked on hard disk. Then the drivers are to be copied to the module and lib directories from X:
tar -xvzf CLEXF40016.tgz cd CLEXF40016 cp -i RedHat/7.1/pentium/via_drv.o /usr/X11R6/lib/modules/drivers/ cp -i RedHat/7.1/pentium/libddmpeg.so /usr/X11R6/lib/
As for Debian Woody exactly these driver version must be taken. Those in other directories will not fit to Xfree version coming with Woody.
The normal way to change xfree configuration is using dpkg-reconfigure. But you may try to edit the config XF86Config-4 in /etc/X11 directly as root or using sudo:
sudo vi /etc/X11/XF86Config-4
The Device Section for the graphic card should look like this:
Section "Device"
Identifier "Via VT8623 Apollo CLE266"
Driver "via"
VideoRam 4000
# Option "TVOff"
EndSection
To get this activated section Screen must be changed to use it:
Device "Via VT8623 Apollo CLE266"
Editing XF86Config-4 directly is not the Debian way. So you must be warned: Everything may be lost after next time using dpkg-reconfigure to make changes to the config. So it is a good advice to keep a copy of the file.
If the Monitor Section is set up correctly the frequency should be higher as before. You may discover a problem keyboard not working any longer, if starting X with a display manager like xdm, gdm or kdm. The processes causing the problem may be killed using ssh from another computer. To avoid the problem, X may be started using startx. If a normal user is not allowed to start X this way, this may be changed:
dpkg-reconfigure xserver-common
Even using startx, X starts up very slowly on my computer. I get some errors from the Via driver, The problem still is not solved. If there is a resolution found, maybe, X can be started using a display manager again.
This ist what I get in the log:
(EE) via(0): Couldn't open "/dev/video0" (EE) via(0): Can't get through IOCTL to V4L (EE) via(0): Can't set destroy surface flag 0 to V4L ... (EE) via(0): Couldn't open "/dev/video0" (EE) via(0): Can't get through IOCTL to V4L ... waiting for X server to shut down (EE) via(0): Couldn't open "/dev/video0" (EE) via(0): Can't get through IOCTL to V4L
If someone does know how to get rid of theses errors, please feel free to share your resolution with me. As the driver are binaries, I asked Via, but still got no answer.
3.4 USB
As there are several individual usages of usb, here some general hints.
- USB_UHCI must be activated in kernel configuration
- If cameras or other devices are to be mounted as hard disk SCSI, SCSI generic and others must be activated in kernel
- For very old webcams and the Intel QX3 microscope the CPIA driver must be activated
- to get plug and play ther must be something like usbmgr installed
For me I installed usbmgr using apt-get. Replacing it with hotplug was no good idea for me. The microscope was not longer accessible using the CPIA drivers after reboot. The only way to get it working again was purging (instead of removing) hotplug unsing apt-get remove hotplug --purge and reinstalling usbmgr. To get usbmgr working, for some devices the vendor entries must be added.
To get the correct entries for the vendor entries in /etc/usbmgr/usbmgr.conf ther errors coming up, if a device is connected and switched on, may be used. Here as an example the entries added for QX3 and a camera:
# QX3 Mikroskop vendor 0x813 product 0x1 module cpia , cpia_usb # Coolpix 2500 [Nikon] vendor 0x04b0 product 0x0108 module scsi_mod , sd_mod , usb-storage
The modules needed must be activated in kernel or exist as module to be loaded.
If accessing usb devices using usbdeffs, presuming the kernel is configured correctly, the following lines should be added to /etc/mtab automatically:
/proc/bus/usb /proc/bus/usb usbdevfs rw 0 0
To access a camera as scsi hard disk the camera must be set up corrrectly and on the other hand scsi must be configured in the kernel. Here an example for mounting a camera:
mount -t vfat /dev/sda1 /mnt
For me I got only success using a card reader connected to usb.
There may be additions to this sections in the future.
Back to contents
3.5 LM-Sensors and I2C
Using the sensors and i2c ist not possible with kernel version 2.4.22 and i2c and lm-sensors packaged from Debian 3.0 (Woody).
I got the source packages for lm-sensors and i2c from the next Debian release and packported the packages to Woody.
The backports may be downloaded from my web server. The first two are the packages needed for kernel compilation:
wget http://www.witch.westfalen.de/via/i2c-source_2.8.0-2_all.deb wget http://www.witch.westfalen.de/via/lm-sensors-source_2.8.0-2_all.deb wget http://www.witch.westfalen.de/via/modules.epia.diff
These two pakages must be installed and unpacked into the kernel source tree:
sudo dpkg -i i2c-source_2.8.0-2_all.deb sudo dpkg -i lm-sensors-source_2.8.0-2_all.deb cd /usr/src/ rm -rf modules tar -xvzf i2c.tar.gz tar -xvzf lm-sensors.tar.gz patch -p1 < modules.epia.diff
Next step is to configure, make and install the kernel and modules.
If done so, the other packages may be downloaded:
wget http://www.witch.westfalen.de/via/libsensors2_2.8.0-2_i386.deb wget http://www.witch.westfalen.de/via/acpi_0.06-5_i386.deb wget http://www.witch.westfalen.de/via/lm-sensors_2.8.0-2_i386.deb wget http://www.witch.westfalen.de/via/sensord_2.8.0-2_i386.deb wget http://www.witch.westfalen.de/via/sensors.conf
Installation follows as usual with sudo dpkg -i package.deb. After doing so the configuration file distributed with the package may be replaced by one fitting the Epia M mainboards:
sudo mv /etc/sensors.conf /etc/sensors.conf.orig sudo cp sensors.conf /etc/sensors.conf
After the next reboot, sensor values may be read using the command sensors.
The sensors.conf created by me is a result of my studies of all the documentation I was able to get from Via. The conversion constants for voltages and temperature are directly from Via. I proofed the results using the bios values and converting all values from i2c with Via's constants. I did not find any explicit assignment. The configurations found in the web showed up more or less differences to the values shown in bios.
If comparing the values shown by sensors with the values from bios, must consider the consumption of parts accessed in the bios. Temperature values are quite different if some parts of the bios are visited over a long time. Is the temperature eg. much higher than 30 degrees celsius, temperature may drop by 1 to 2 degrees or more, even if you call sensors directly after booting.
Example print-out of sensors:
vt1211-isa-6000 Adapter: ISA adapter Algorithm: ISA algorithm +5V: +4.88 V (min = +4.75 V, max = +5.25 V) VCore1: +1.38 V (min = +1.33 V, max = +1.46 V) +3.3V: +3.26 V (min = +3.12 V, max = +3.45 V) +12V: +11.78 V (min = +11.36 V, max = +12.55 V) System: 0 RPM (min = 3996 RPM, div = 2) CPU: 6425 RPM (min = 3996 RPM, div = 2) CPU: +58.3°C (limit = +65°C, hysteresis = +60°C) vid: +1.85 V
At the time, these print-out was made the computer was quite busy. All the voltages are dropped down a little. Only VCore1 is the same as before. This marks a high power consumption at this time. Obviously the power supply has enough power. All the values are inside the limits. The system fan is not connected, so there is no value from the sensor. If the values are outside the limits an alarm is raised. The second value (hysteresis) for CPU temperature ist that value which erases an alarm, if the temperature drops after raising above 65° C.
Only a few seconds after the busy period, all values are nearly back to normal:
+5V: +4.98 V (min = +4.75 V, max = +5.25 V) VCore1: +1.37 V (min = +1.33 V, max = +1.46 V) +3.3V: +3.28 V (min = +3.12 V, max = +3.45 V) +12V: +11.90 V (min = +11.36 V, max = +12.55 V) System: 0 RPM (min = 3996 RPM, div = 2) CPU: 6488 RPM (min = 3996 RPM, div = 2) CPU: +36.0°C (limit = +65°C, hysteresis = +60°C)
The sensor values my be read directly by another program and used to mail an alarm or trigger other events.
The CPU fan is said to be adjustable. But if setting the rpm is enabled (pwm2, 2) nothing will happen if speed is set to another value. The speed value does not change at all. Maybe, acpi or anything else is needed to manipulate the cpu fan speed.
Setting uhc_config seems not to work. set config 12 does always result in the (correct) value "3" in the register. Setting uhc_config switches registers of vt1211 from temperature to voltage. But in the M chassis these switchable registers are used to represent voltages or even nothing.
Back to contents
3. 6 Sound
There is little sound support with my kernel configuration. Wav files can be played with cat into the audio device. For more elaborate sound settings alsa should be installed.
General advice: To allow the user to play sound, use video or other things, he or she must be added to the related group (audio, video eg.). It is not a good idea to change the devices and make them world wide writable instead.
3.6.1 Sound with KDE
I do not use KDE. But with my settings sounds of KDE itself can be heard (music at KDE startup eg.).
3.6.1 Sound with Gnome
To test Gnome, i installed sawfish. I did not get working Gnome sounds at all. The sound was rather noisy and I deactivated sound.
3.6.2 Sound with WMaker
WMaker together with Windowmaker soundserver worked well for me for one tested game. So here we also have some sound without Alsa and additional kernel settings.
Back to contents
4 Power Management
There are two modules for power management in the kernel: APM and ACPI. Both of them do not work together. APM ist mostly for notebooks, ACPI is newer and supported by desktop boards, too.
With my kernel configuration for standard 2.4.22 kernel, the computer may be switched off using the command poweroff. This forces a normal shutdown with switching power off afterwords.
With the special Epia kernel mentioned above ACPI is available, too. But using it has many restriction. After starting acpid shutting down the computer just by switching it of using the power button works well. It is no longer necessary to use poweroff.
Compined with swsup ACPI is said to support suspend to disk. But latest news say, this will not work with Epia boards. I tried suspend to RAM, but using S3 - echo 3 > /proc/ascpi/sleep - does not succeed. Using S1 which is said to get the CPU to sleep mode freezes the machine.
Latest news about development state of ACPI is available at http://acpi.sourceforge.net.
Back to contents
5 Acknowledgements
Thanks to all those who spent their time to present their knowledge on speial topic in the web, mailing lists and forums. Especial all those hints related to usb and various conflicts. Useful was an article about connecting digital cameras to the computer using linux, too.
There is a list of useful sources for information in the next chapter.
Back to contents
6 Useful Sources
- Debian project - packages und documentation
- The Linux Documetation Projekt - Linux HOWTOs and more
- Epia HOWTO
- Linux USB Project
- QX3 Microscope
- Hardware monitoring with lm_sensors
- EpiaM tips and tricks under debian
Back to contents
letzte Änderung 2005-12-30 20:03:28
