[mythtv-users] query about others using via mini-itx systems
Jon Whitear
jon at whitear.org
Sat Feb 11 08:02:44 UTC 2006
Michael Fox wrote:
>Did you make any notes of your setup/install?
>
>What distro is the backend and frontend?
>
>
<snip>
>Got any references you used for your setup I can look at, and could
>you quote me the exact VIA model of the system board.
>
Both front- and backend are Gentoo. The board is an EPIA M10000 - does
it get any more exact than that?
Here are the notes I took at the time. This was a year or so ago, so
things are a bit out of date e.g. I don't think you need CVS snapshots
of drm etc. Let me know if you have any questions - I made these notes
for my own use, so they may not be overly clear in places. Note also
that I had a problem with the file-system being read only each time I
got to the stage in the install where you reboot. The solution was to rm
/etc/mtab, but it took a few rebuilds to find it. Hence these notes
cover about three builds!
Cheers,
Jon
Diskless Gentoo EPIA Install Notes
Diskless install using PXE boot
http://www.gentoo.org/doc/en/altinstall.xml#doc_chap5
on the backend..
# mkdir /var/NetBoot/diskless-gentoo
# mkdir /var/NetBoot/diskless-gentoo/epia
# mkdir /var/NetBoot/diskless-gentoo/epia/boot
download, untar, configure, make grub
unpack stage3 tarball
unpack portage snapshot
tar -xvjf portage-20050122.tar.bz2 -C ./usr
mount -t proc /proc /var/NetBoot/diskless-gentoo/epia/proc
cp /etc/resolv.conf /var/NetBoot/diskless-gentoo/epia/etc/resolv.conf
chroot /var/NetBoot/diskless-gentoo/epia/ /bin/bash
env-update
source /etc/profile
get, configure, build kernel
http://epia.kalf.org/portage/sys-kernel/epia-dev-sources/
on the server
# mkdir /var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel/
# mkdir /var/NetBoot/diskless-gentoo/epia/usr/local/portage
# mkdir /var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel
# mkdir
/var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel/epia-dev-sources
wget it
# cp epia-dev-sources-2.6.7.ebuild
/var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel/epia-dev-sources
edit make.conf
USE="X -gtk -gnome alsa qt mysql dvb mmx sse acpi"
CFLAGS="-march=i686 -msse -mmmx -mfpmath=sse -Os -pipe -fomit-frame-pointer"
PORTDIR_OVERLAY=/usr/local/portage
emerge sync
emerge portage (to update it)
Also unmerge linux-headers, emerged linux26-headers.
set the timezone
ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime
build the kernel to install the modules in to the chrooted environment.
dhcp.conf:
option option-150 code 150 = text ;
ddns-update-style none ;
host epia {
hardware ethernet 00:40:63:c9:cc:14;
next-server 192.168.1.100;
fixed-address 192.168.1.103;
option option-150 "/epia/boot/grub.lst";
filename "/epia/boot/pxegrub";
}
}
Code Listing 5.3: in.tftpd
INTFTPD_PATH="/var/NetBoot/diskless-gentoo"
INTFTPD_USER="nobody"
INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
exports:
/var/NetBoot/diskless-gentoo/epia epia(rw,sync,no_root_squash)
hosts file
ended up putting tftp stuff in existing tftp root directory
troubleshooting tftp boot:
http://www.sun.com/products-n-solutions/hardware/docs/html/817-5625-10/Linux_Troubleshooting.html
# nano -w /etc/fstab
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
server epia # touch fastboot
server epia # echo "touch /fastboot" >> etc/conf.d/local.start
Then I can boot, but I ahve a read only filesystem. These errors
QM_MODULES: Function not implemented
unmreged modutils and emrged module-init-tools
On the client
echo epia > etc/hostname
echo home > etc/dnsdomainname
rc-update add domainname default
nano etc/rc.conf
nano -w etc/hosts:
127.0.0.1 localhost
192.168.1.103 epia.home epia
192.168.1.100 server.home server
emerge nfs-utils
emerge syslog-ng
not going to bother with a crond
passwd!
reboot
cool, now we can boot into nfs-rooted gentoo
Setting up sounds
------------------
add ALSA_CARDS="via82xx" to your /etc/make.conf
ACCEPT_KEYWORDS=~x86 emerge alsa-driver
had to put kernel version in package.provided so it wouldn't emerge 2.4.28
failed becuase it's rlready in ther kernel
removed ALSA support formthe kernel, recompiled kernel, emerge
alsa-driver, alsa-utils
bugger, recompiled kernel, now it's read only again.
chrooted back in. modules-update
still no good
fstab - added root on nfs - still no good
------------------------------------------------------------------------------------------------------
Can't boot. Starting again.
mkdir /var/NetBoot/diskless-gentoo
mkdir /var/NetBoot/diskless-gentoo/epia
mkdir /var/NetBoot/diskless-gentoo/epia/boot
cp /var/NetBoot/diskless-gentoo/grub-0.94/stage2/pxegrub
/var/NetBoot/diskless-gentoo/epia/boot/pxegrub
nano -w /var/NetBoot/diskless-gentoo/epia/boot/grub.lst
::::::::
default 0
timeout 30
title=Diskless Gentoo
root (nd)
kernel /epia/bzImage ip=dhcp root=/dev/nfs
nfsroot=192.168.1.100:/var/NetBoot/diskless-gentoo/epia
:::::::
Unpack stage 3 tarball
cd epia
tar -xvjpf ../stage3-i686-2004.3.tar.bz2
Unpack portage snapshot
tar -xvjf ../portage-20050122.tar.bz2 -C ./usr
Copy the kernel config into the new root
cp ../config ./
mkdir /var/NetBoot/diskless-gentoo/epia/usr/local/portage
mkdir /var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel
mkdir
/var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel/epia-dev-sources
wget
http://epia.kalf.org/portage/sys-kernel/epia-dev-sources/epia-dev-sources-2.6.7.ebuild
mv epia-dev-sources-2.6.7.ebuild
/var/NetBoot/diskless-gentoo/epia/usr/local/portage/sys-kernel/epia-dev-sources
mount -t proc /proc /var/NetBoot/diskless-gentoo/epia/proc
cp /etc/resolv.conf /var/NetBoot/diskless-gentoo/epia/etc/resolv.conf
chroot /var/NetBoot/diskless-gentoo/epia/ /bin/bash
env-update
source /etc/profile
emerge sync
edit make.conf
USE="X -gtk -gnome alsa qt mysql dvb mmx sse acpi"
CFLAGS="-march=i686 -msse -mmmx -mfpmath=sse -Os -pipe -fomit-frame-pointer"
PORTDIR_OVERLAY=/usr/local/portage
emerge portage
emerge unmerge -v linux-headers
emerge linux26-headers
set the timezone
ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime
ebuild
/usr/local/portage/sys-kernel/epia-dev-sources/epia-dev-sources-2.6.7.ebuild
digest
ACCEPT_KEYWORDS=~x86 emerge -v
/usr/local/portage/sys-kernel/epia-dev-sources/epia-dev-sources-2.6.7.ebuild
cd /usr/src
ln -s linux-2.6.7-epia linux
mv /config /usr/src/linux/.config
make menconfig
OK, creating a tarball of where we've got to so far, from ./diskless-gentoo
tar -cvjpf epia-010205-base.tar epia
emerge unmerge -v modutils
emerge -v module-init-tools
make && make modules_install
cp arch/i386/boot/bzImage /bzImage
cp System.map /System.map-2.6.7-epia
cp .config /config-2.6.7-epia
On the server
cp /var/NetBoot/diskless-gentoo/epia/bzImage /var/tftp/epia
nano -w /etc/fstab
::::::::::::::::::
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
::::::::::::::::::
touch /fastboot
echo "touch /fastboot" >> /etc/conf.d/local.start
emerge -pv nfs-utils
rebooting.. exit from chroot....
exit
umount /var/NetBoot/diskless-gentoo/epia/proc
mount -a
Hmmmm, grub won't load
chmod a+r grub.lst
boots OK
change passwd
doesn't boot
--------------------------------------------------------------------------------
Start again
rm -r epia
mkdir epia
tar -xvjpf epia-010205-base.tar
mount -t proc /proc /var/NetBoot/diskless-gentoo/epia/proc
cp /etc/resolv.conf /var/NetBoot/diskless-gentoo/epia/etc/resolv.conf
chroot /var/NetBoot/diskless-gentoo/epia/ /bin/bash
env-update
source /etc/profile
emerge unmerge -v modutils
emerge -v module-init-tools
cd /usr/src/linux
make && make modules_install
cp arch/i386/boot/bzImage /bzImage
cp System.map /System.map-2.6.7-epia
cp .config /config-2.6.7-epia
nano -w /etc/fstab
::::::::::::::::::
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
::::::::::::::::::
touch /fastboot
echo "touch /fastboot" >> /etc/conf.d/local.start
emerge -pv nfs-utils
exit
umount /var/NetBoot/diskless-gentoo/epia/proc
mount -a
OK, creating a tarball of where we've got to so far, from ./diskless-gentoo
tar -cvpf epia-010205-ready2boot.tar epia
Hmmmm, grub won't load
chmod a+r epia/boot/grub.lst
restrart nfs
now boots OK
can't log in
reboot
read/write bizo
rm epia/etc/mtab
now I can boot again
chroot into it
passwd
echo epia > etc/hostname
echo home > etc/dnsdomainname
rm /etc/mtab
ln -s /etc/mtab /proc/mounts
now works OK.
====================================================================================
OK, let's get on with building
emerge glibc
emerge syslog-ng
emerge openssh
rc-update add syslog-ng default
rc-update add sshd default
tarring epia-030205-booting.tar
Setting up sounds
------------------
http://www.gentoo.org/doc/en/alsa-guide.xml
add ALSA_CARDS="via82xx" to your /etc/make.conf
ACCEPT_KEYWORDS=~x86 emerge alsa-driver alsa-utils
/etc/modules.d/alsa:
alias snd-card-0 snd-via82xx
# The following is only needed when you want OSS compatibility
alias sound-slot-0 snd-card-0
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
modules-update
check /etc/devfsd.conf:
# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP snd MODLOAD ACTION snd
LOOKUP dsp MODLOAD
LOOKUP mixer MODLOAD
LOOKUP midi MODLOAD
REGISTER sound/.* PERMISSIONS root.audio 660
REGISTER snd/.* PERMISSIONS root.audio 660
rc-update add alsasound boot
/etc/init.d/alsasound start
amixer - should produce a bunch of output
alsamixer - unmute channels
aplay something.wav - bingo
============================================================================
emerge ntp cvs
Now for Xorg Unichrome
epia root # ACCEPT_KEYWORDS=~x86 emerge -pv xorg-x11
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] media-libs/libpng-1.2.8 -debug 0 kB
[ebuild N ] x11-base/opengl-update-2.1_pre4 0 kB
[ebuild N ] media-libs/freetype-2.1.9-r1 -bindist -debug -doc +zlib
0 kB
[ebuild N ] x11-misc/ttmkfdir-3.0.9-r2 -debug 0 kB
[ebuild N ] media-libs/fontconfig-2.2.3 0 kB
[ebuild N ] x11-base/xorg-x11-6.8.1.902 -3dfx -3dnow +bitmap-fonts
-cjk -debug -dlloader -dmx -doc +font-server -hardened -insecure-drivers
+ipv6 -minimal +mmx +nls +opengl +pam -sdk +sse -static +truetype-fonts
+type1-fonts (-uclibc) -xprint +xv 0 kB
[ebuild N ] app-arch/rpm2targz-9.0-r2 0 kB
[ebuild N ] sys-apps/utempter-0.5.5.5-r1 -debug 0 kB
[ebuild N ] x11-terms/xterm-199 -Xaw3d -debug +truetype -unicode 0 kB
startx does
glxgears = 78-87 fps
epia / # useradd -m -G users,wheel,video,audio -s /bin/bash jon
epia / # passwd jon
http://forums.viaarena.com/messageview.cfm?catid=28&threadid=60721&STARTPAGE=2&FTVAR_FORUMVIEWTMP=Linear
login as me....
cp /usr/portage/distfiles/xorg-x11-6.8.1.904.tar.bz2 /usr/local/src
tar -xvjf xorg-x11-6.8.1.904.tar.bz2
cd /usr/local/src/xc/programs/Xserver/hw/xfree86/drivers/
cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/unichrome co
xfree86
rm -rf via
ln -s xfree86 via
cd /usr/local/src/xc
make Makefiles
jon at epia xc $ make Makefiles
make -f xmakefile Makefiles
make[1]: Entering directory `/usr/local/src/xc'
make[1]: xmakefile: No such file or directory
make[1]: *** No rule to make target `xmakefile'. Stop.
make[1]: Leaving directory `/usr/local/src/xc'
make: *** [Makefiles] Error 2
make World
cd /usr/local/src/xc/programs/Xserver/hw/xfree86/drivers/via
make
su
jon at epia via $ su -
Password:
epia root # cd /usr/local/src/xc/programs/Xserver/hw/xfree86/drivers/via
epia via # make install
exit
cd /usr/src/linux/drivers/char/drm
su
epia char # chmod a+w drm
epia char # exit
cvs -z3 -d:pserver:anonymous at dri.freedesktop.org:/cvs/dri co drm
cd drm/linux-2.6
make DRM_MODULES=via
su
mkdir /lib/modules/2.6.7-epia1/kernel/drivers/char/drm/
cp -p via.ko /lib/modules/2.6.7-epia1/kernel/drivers/char/drm/
depmod -a
epia linux-2.6 # modinfo via
author: VIA
description: VIA Unichrome
license: GPL and additional rights
parm: cards_limit:Maximum number of graphics cards
parm: debug:Enable debug output
vermagic: 2.6.7-epia1 preempt VIAC3-2 4KSTACKS gcc-3.3
depends:
nano xorg.conf
XVMC:
cd /usr/local/src/xc/lib/XvMC/hw
cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/unichrome co
libxvmc
ln -s libxvmc via
5. Edit the file XORG-TREE/xc/lib/XvMC/Imakefile so that the line
SUBDIRS = hw/i810
should become:
SUBDIRS = hw/i810 hw/via
cd /usr/local/src/xc
make Makefile
make Makefiles
cd /usr/local/src/xc/lib/XvMC/hw/via
make depend
make
su -
make install
cp vldXvMC.h /usr/include/X11/extensions
ldconfig -v
modprove via-agp
modprboe via
edit /etc/modules.autload.d/kernel-2.6 as above
Getting and installing 3D/MESA.
cd /usr/local/src
cvs -z3 -d:pserver:anonymous at cvs.freedesktop.org:/cvs/mesa co Mesa
2. Edit the configuration file Mesa/configs/linux-dri-x86 if you're
building for x86.
Append these lines [spaces around = are important] to the file:
DRM_SOURCE_PATH = /usr/src/linux/drivers/char/drm/drm/linux-2.6/
OPT_FLAGS = -march=i686 -msse -mmmx -mfpmath=sse -Os -pipe
-fomit-frame-pointer
SRC_DIRS = mesa
DRI_DIRS = dri_client unichrome
cd Mesa
make linux-dri-x86 --->> broken
su
cp lib/*_dri.so /usr/X11R6/lib/modules/dri/
tarring up.....
USE="mysql" emerge qt
emerge libmad pkgconfig glib libogg libvorbis libid3tag audiofile
emerge kdebase
login as user
echo "exec startkde" > ~/.xinitrc
in /etc/conf.d/local.start put
su <username> -c "startx > /dev/console 2>&1" &
make sure you have X already configured.
In /home/<username>/.xinitrc put the commands to start mythtv and any
other apps you want autostarted, each on it's on line with a space and &
like this:
Code:
mythtv &
someotherapp &
onemoreapp &
<< having used it for a while, and subsequently broken it, we're back to
the last tarball.. presumably post kde >>
tar up the broken one...
tar -cvpf epia-broken-28032005.tar
mv epia epia.old
tar -xvpf epia080205-kde.tar
boot up, can't mount nfs drive - restart server's nfs service, as we've
been moving xported dirs. Boots OK. Login as root
echo "exec startkde" > ~/.xinitrc
startx
copy my new asoundrc back to root's homedir. unmute IEC958 channels with
alsamixer
OK, let's install Myth
$ cd /opt
$ cvs -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs login
Logging in to :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs
CVS password: mythtv
$ cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout
mythtv mythvideo mythmusic
cd mythtv
./configure --disable-audio-arts --disable-joystick-menu --disable-ivtv
$ qmake mythtv.pro
$ make
make install
lots of errors - seems we don't have lirc.
emerge lirc
lircd won't start because the device is busy, so nano /etc/init.d/lircd
start() {
ebegin "Starting lircd"
setserial /dev/ttyS0 uart none
modprobe lirc_serial
# start-stop-daemon --start --quiet --exec /usr/sbin/lircd --
${LIRCD_OPTS}
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- -d
/dev/lirc/0
eend $?
rc-update add lircd default
copy over old lirc config files
cd mythtv
make clean
./configure --disable-audio-arts --disable-joystick-menu --disable-ivtv
qmake mythtv.pro
make
make still fails - looks like it can't find mp3lame
emerge lame
retried myth ok
[didn't do this cos I'm running as root]
chmod a+s /usr/local/bin/mythfrontend
cd ../mythvideo
qmake mythvideo.pro
make
make install
rc-update add syslog-ng default
lirc's not working. Mythvideo posters aren't there.
copied fstab over to fix posters. copied kernel files and .config over.
reemergeed lirc
nfs mounts were'nt there becasue I hadn't created the mount points.
mkdir'd them then mount -a.
recompile kernel with nfs v3 support
make && make modules_install
copied kernell to tftp folder
now to re-emerge lirc & alsa-driver
drm complains about versions - recompile and install drm via module. now Ok.
cp /etc/lircrc /root/.mythtv/lircrc
now it works, still with same dmesg crap
vids don't play... we dont have mplayer
ACCEPT_KEYWORDS=~x86 USE="-arts lirc -xmms" emerge mplayer
tarring up to epia-working-02042005
More information about the mythtv-users
mailing list