Myth BOX
The home of guides for Myth TV, IPTables, and other linux based phenomena.
 
HD version
Preamble
Home
News
Spec
General guides
Partitioning
Installation
Firewall
Channel setup
Home automation
Product overview
Other
Useful links
SD version
Preamble
Functionality
Hardware
Software
Screenshots
Gallery
General guides
DVB Card
Myth TV
Broadband modem
Wireless network
Firewall
Network shares
Network IDS
Extra security
Streaming
Gensplash
EPIA specific guides
TV-Out cables
Audio/USB cables
Backplate
Wireless network
EPIA Kernel
Openchrome drivers
Surround sound
VPN
Online store
Prebuilt mythbox
Other
Useful links

Ads
Cable components




Compiling a customised EPIA kernel

To access the functionality provided by your EPIA board, you need to compile in support for it. Below are listed the kernel modules that need to be included, and the respective functionality that they provide:

Kernel option Functionality
Processor type and features -->
    Processor family -->
        VIA C3-2 (Nehemiah)
Basic optimisation for our processor
Device Drivers -->
    ATA/ATAPI/MFM/RLL support -->
        VIA82CXXX chipset support
IDE driver
Device Drivers -->
    Character devices -->
        Intel/AMD/VIA HW Random Number Generator support
Cryptographic options -->
    Cryptographic API
    Hardware crypto devices -->
        Support for VIA PadLock ACE
        Support for AES in VIA PadLock
VIA ACE security driver
Device Drivers -->
    Character devices -->
        /dev/agpgart (AGP Support)
        VIA chipset support
        Direct Rendering Manager (XFree86 4.1.0 and higher...
        Via unichrome video cards (as module)
Basic AGP video and TV-Out driver, and DRI driver
Device Drivers -->
    Sound -->
        Sound card support
        Advanced Linux Sound Architecture -->
            Advanced Linux Sound Architecture
            Sequencer support
            Sequencer dummy client
            OSS Mixer API
            OSS PCM (digital audio) API
            OSS Sequencer API
            PCI devices -->
                VIA 82C686A/B, 8233/8235 AC97 Controller (as module)
        [Ensure Open Sound System is NOT compiled]
ALSA sound driver
Device Drivers -->
    I2C support
    Hardware Monitoring support -->
        Hardware Monitoring support
        Via VT1211
Temperature sensor (patch required)

TV-Out

To get TV-Out to work, you will need to edit /etc/X11/xorg.conf and add the relevant lines (or just take a copy of mine found here). As soon as you are able to see a picture, I suggest continuing on with the guide and installing the unichrome driver without tweaking this config file. The reason for this is that the unichrome driver seems to behave differently to the basic kernel driver - why waste the effort if you are going to change it? :)

I would recommend getting S-Video to work first before making any custom RGB leads which potentially may not work. Remember to select S-Video in your BIOS and config file, and disconnect your monitor while you have TV-Out connected so that the correct refresh rate is detected.
Troubleshooting:
  • I can't see a picture on my TV!
    Obviously there could be a number of reasons for this. First off, check that your lead is going to the right pins in the plug. I purchased an S-Video to SCART plug and it was wired to the SCART's output pins rather than input. Next, check that you have the correct BIOS / xorg.conf settings commented out (i.e. S-Video). Failing that, you should first check that the driver is working with the monitor before going any further. Then investigate any errors that may occur in /var/log/Xorg.0.log.

Sound

To get the alsa sound working, do the following:
  1. Add alsa to you USE flags.
  2. Now emerge alsa-utils, a set of utilities for alsa.
  3. Edit the file /etc/modules.d/alsa and ensure that the following are uncommented:
    alias snd-card-0 snd-via82xx
    alias sound-slot-0 snd-via82xx
    alias /dev/mixer snd-mixer-oss
    alias /dev/dsp snd-pcm-oss
    alias /dev/midi snd-seq-oss
    
  4. Run modules-update to make the changes take effect.
  5. Make alsa start on boot (and start it now) using rc-update add alsasound boot ; /etc/init.d/alsasound start.
  6. Now unmute the volume by running the following:
    amixer set Master 100% unmute
    amixer set PCM 100% unmute
    
  7. Test it by doing emerge aplay and using aplay to play a WAV file on your system.

Temperature sensor

To get the temperature sensor into action, we need to:
  1. Download the patch from here, and copy it into /usr/src/linux.
  2. Go into /usr/src/linux and execute: patch -p1 < <patch_filename>.
  3. Select and compile the module into the kernel (see above table for details).
  4. Do an emerge lm_sensors to get the package that reads the sensors.
  5. Execute sensors to get a reading of the current CPU temperature.
  6. If you also emerge hddtemp, you can use the following script to monitor both hdd and cpu temperature every 60 seconds (thanks to the creator of this site for the original). This will allow you to get an average temperature for your system. Add the following to a script file:
    #!/bin/bash
    
    t=0
    echo "Time,  CPU Temp,  HD Temp"
    while [ "true" = "true" ] ; do
    
        cputemp=`sensors | grep Proc | sed 's/.*: +\(.*\) C .*/\1/'`
        hdtemp=`hddtemp /dev/hda | sed 's/.*: \(.*\) C.*/\1/'`
        printf "%4i" $t
        echo ",      "$cputemp",       "$hdtemp
        sleep 60
        t=`expr $t + 1`
    
    done
    

Compiler flags

To optimise all of the packages and kernels you compile, you should set your CFLAGS variable in /etc/make.conf to something like the following:
CFLAGS="-O3 -march=i686 -fomit-frame-pointer -msse -mmmx -mfpmath=sse -pipe"