Sunday, August 2, 2009

Winfast 2000 xp tv card on Arch linux


Well, my wintv card finally crapped out on me, so I popped in a spare tv card. This card is a leadtek winfast 2000 xp tv card and for whatever reason, the arch linux kernel misidentifies this card.

The arch wiki gives a good hint of what needs to be done.
http://wiki.archlinux.org/index.php/Tvcard

Ironically, the example card is the exact same model as my own card. The wiki must have been written when 2.4 kernels were the norms in arch, as it states to place the needed code in /etc/modules.conf. The code itself tells ya to place the code in /etc/modprobe.conf for v.2.6 kernels. Even this is incorrect at the moment as arch currently uses /etc/modprobe.d. So the correct placement of the code is /etc/modprobe.d/modprobe.conf.

Tvtime then was able to properly utilize the card.

Sunday, July 26, 2009

I'm back

Things went a little haywire there for a while, and my online writings went by the wayside. I do plan to update my blog here in a relatively timely fashion however.

So stay tuned for some good ole linux fun!

Tuesday, March 31, 2009

How to compile a slackware kernel

There are many reasons to build a new kernel in a distro like slackware. It could be that you bought a new usb camera or printer that the new kernel supports. Or perhaps a newer kernel has better support for your wifi card. Whatever the reason, we'll cover here how to build the latest and greatest on your box. At the time of this writing it's the first release of the 2.6.29 tree.

The first thing we need to do is to download the source from kernel.org. The 2.6 tree is found here.
http://www.kernel.org/pub/linux/kernel/v2.6/

Scroll down to the desired version to be compiled and select "copy link location". Then open a terminal and become root and change to your build environment. We'll use /usr/src as the default.

su -
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.tar.bz2

now we need to unpack the tar ball.

tar -jxf linux-2.6.29.tar.bz2


Next we're going to remove the current symlink to the linux directory and link to the new directory.

rm linux
ln -s linux-2.6.29 linux


Now we'll move into the build directory.

cd linux


To get this far means that you have a working kernel. So we're going to utilize the current kernel config to build our new kernel.

zcat /proc/config.gz > .config
make oldconfig


New additions to the kernel will be displayed and you can choose which ones you want to keep and in what form. It will ask you to keep them in module form (m), or you can select y for it to be built in to the kernel, or n for it to be left out. Simply hitting enter will do the default action, which the dialog will tell you what that is.

Next we can alter anything we want in the kernel itself.

make menuconfig


There are a couple of things I always change here. One is the processor support. Scroll to processor type and features, and then processor family. For my celeron M on this laptop I pick the pentium M option. For my core 2 duo system, I choose the core 2/ newer xeon option.

We then exit from the processor type and features menu back to the main menu.

Next we scroll down to Device Drivers and select it. Then we select usb support. Finally we modularize "USB Mass Storage Support" by pressing "m" while it is highlighted.

We click exit to exit out of our submenus all the way back to the main menu. Hitting exit one more time, will ask if you want to save the kernel configuration, to which we reply yes.

Now we want to build the kernel so we type

make all

This can take a while, depending on your processor, so grab a cup of coffee, read the paper and come back in a little while.

Once that completes, we'll grab a nice script by Dagmar to install the kernel in /boot.

wget http://dagmar.droplinegnome.org/experimental/installkernel
install -m 755 installkernel /sbin/


Then we execute the following to be able to use the new kernel

make modules_install
make install


These commands will install the new modules and copy the config, system.map, and kernel to the proper locations in /boot.

now we'll change to the /boot directory to modify a few things.

cd /boot


It's time to remove the current symlinks to config, System.map, and vmlinuz.

rm config
rm System.map
rm vmlinuz


and then link them to the new kernel.

ln -s config-2.6.29-smp config
ln -s System.map-2.6.29-smp System.map
ln -s vmlinuz-2.6.29-smp vmlinuz


At this point it's a good idea to create an initrd. For ext3 we use the following command. Note that sda3 is my root partition. be sure to alter yours accordingly.

mkinitrd -c -k 2.6.29-smp -m mbcache:jbd:ext3 -f ext3 -r /dev/sda3

For reiser it would be

mkinitrd -c -k 2.6.29-smp -m reiserfs

next, we'll edit lilo to use the initrd.gz. we add the following line above "root = /dev/sda3"
initrd = /boot/initrd.gz

so it will look something like this.

image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda3
label = Linux
read-only


Now we need to run lilo to update it.

/sbin/lilo


That's it. upon rebooting you should now be utilizing your shiny new 2.6.29 kernel. If you somehow messed something up, and you end up with a kernel panic, you can use your slackware 12.2 cd to boot your system in a pinch.

Good luck and happy slacking!

I borrowed heavily from this excellent guide on the dropline wiki.
http://wiki.droplinegnome.org/index.php?title=Building_a_new_2.6.x_kernel_with_Slackware_12.0

Saturday, March 21, 2009

How to use slackbuilds

I posted this on the hackmy forums and figure my blog is a good place for this as well. Enjoy Slackers!

If you're using slackware, you'll find there are many packages not "included" with the base distribution. Slack tends to use vanilla packages with little or no patching from how the application was intended by the author upstream... so this means that you can build virtually anything you need with the excellent build tools.

Utilizing slackbuilds from slackbuilds.org is a good way to do this.

First, we need to su to root so that we can build and install the packages. so we open a terminal and type

su -


then we need to create our build directory. this can be anywhere, but you may want to put it in your user's home directory. So we create the directory like so.. substitute your user name where "user" is listed.

mkdir /home/user/build


then we'll change directory to our build directory

cd /home/user/build


now we can begin building packages. navigate in your favorite web browser to http://slackbuilds.org/

On the right hand side of the screen you will find a search navigation tool, and the version number. So if you're using slackware 12.2, you select that and then search for the package you want to build. Let's try something simple like flash... which brings us to this page.
http://slackbuilds.org/result/?search=flash&sv=12.2

now at this point the different options available for building flash are listed. We'll simply go with flash-player-plugin so we can watch some videos on youtube.
http://slackbuilds.org/repository/12.2/multimedia/flash-player-plugin/

Now that we're on this page, we have access to the slackbuild tar ball and a link to the source required to compile it. It's a good idea to read the README file linked to at the bottom of the page and to peruse the slackbuild script.

Next we'll download the slackbuild in our terminal session using wget which is very reliable. Simply right click on the link to the slackbuild source under "Download slackbuild" and select "copy link location". Then type

wget


then leave a space and right click in the terminal and select paste. this will paste the location of the source slackbuild for you to download. then hit enter. so in this case it would look like this.

wget http://slackbuilds.org/slackbuilds/12.2/multimedia/flash-player-plugin.tar.gz


now we need to untar the archive

tar -zxf flash-player-plugin.tar.gz


now we need to see what directory has been created, and we can do this with ls

ls


it will show the directory. in this case it's "flash-player-plugin". so we'll change to that directory.

cd flash-player-plugin


now we'll download the source linked to on the slackbuild page under "Download Source"

wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz


we now want to make sure that our slackbuild is fine, so we can open a text editor and take a look to make sure everything seems fine. sometimes the slackbuild site doesn't link to the latest version available, so we can navigate to the homepage of the original author, download the source and edit the slackbuild. we'll cover that another time however and focus on installing this slackbuild.

next we have to ensure that the slackbuild is executable.

chmod +x flash-player-plugin.SlackBuild


now we're ready to build the package.

./flash-player-plugin.SlackBuild


the program will compile now, assuming we've met the needed dependencies. flash-player-plugin doesn't have any additional dependencies, so it should compile just fine on a stock slack install.

the created package is created and moved to /tmp, and the full file name is listed. we can either cd to the tmp directory and then use installpkg, or we can simply use the full path. so our next step is to install the package now.

installpkg /tmp/flash-player-plugin-10.0_r22-i386-1_SBo.tgz

congrats! you have just compiled your first slackware compliant package and installed it.

Thursday, March 12, 2009

ice ice archie


I've been working on a icewm rpm in pclos, and decided to port it to a pkgbuild in arch linux. I absolutely love the result. I used the ybutton.cc patch to give borderless buttons on the toolbar and it looks fantastic in my opinion.

Here's the revised pkgbuild. Be sure to modify the pkgbuild to use your path to the ybutton patch, or comment it out if you want borders on your buttons. I got the patch from the silverxp theme here.
http://sourceforge.net/projects/icewmsilverxp/

The theme used is called eleganceice and I got it from box-look.org
http://www.box-look.org/content/show.php/Elegance+Ice?content=65022

$Id: PKGBUILD 25822 2009-01-30 08:33:36Z eric $
# Maintainer: Eric Belanger
# Contributor: dorphell

pkgname=icewm
pkgver=1.2.37
pkgrel=1
pkgdesc="A Window Manager designed for speed, usability, and consistency"
arch=('i686' 'x86_64')
url="http://www.icewm.org/"
license=('LGPL')
depends=('gcc-libs' 'imlib' 'libxrandr' 'libxft' 'libsm' 'libxinerama' 'giflib')
source=(http://downloads.sourceforge.net/sourceforge/icewm/${pkgname}-${pkgver}.tar.gz icewm.desktop)
md5sums=('970a21588d26eb361020fd60a61a482c' 'a3ed467f0199792205b04272402a9945')
sha1sums=('bee1ca66d2282888807551bc28a65b08e4108027' '7dcb1f2c89792a35b687182584ed9baa0d34cc80')

build() {
cd ${srcdir}/${pkgname}-${pkgver} || return 1
cd src
patch < /path/to/patch/SilverXP-1.2.17-single-1/Linux/ybutton.cc.patch
cd ..
./configure --prefix=/usr --sysconfdir=/etc --with-imlib \
--enable-shaped-decorations --enable-gradients --enable-antialiasing || return 1
make || return 1
make DESTDIR=${pkgdir} install install-man install-docs || return 1
install -D -m644 ${srcdir}/icewm.desktop ${pkgdir}/etc/X11/sessions/icewm.desktop
}


here's a direct link as blogger doesn't format the pkgbuild correctly.
http://www.mediafire.com/download.php?22cngjjzyyw

Friday, February 27, 2009

icewm in pclos


I've been testing out the features of pclinuxos with the "big update" and I've been thinking about an icewm remaster. It's exceptionally lightweight and I've ironed out a few bugs, such as setting the dpi correctly for my monitor and customizing the panel a bit. Here's a pic of it so far.

Wednesday, February 18, 2009

Arch Linux 2009.2


There was a family issue at my sister's house in which her computer died, and a certain program had to be run that could only be done in windows.... so I wiped the hard disk with the perfectly working slack install and installed xp (ugh).

Needless to say, we ordered new parts for a computer and now I'm left with a laptop with windows xp on it.... this will never do! So after a quick perusal of distrowatch.com, I noticed that arch linux had a new release iso, so I figured why not?

The install was fairly straight forward.... One thing that I noticed was that my rc.conf didn't have any modules populating it... after checking the forums, I discovered that udev handles all that now, so I really only need to populate it with items that I want to blacklist. Nice eh?

I ensured that wireless tools and b43-fwcutter were installed and then had to figure out a way to get the firmware, as this laptop does not have a wired nic, only a wireless one. So I downloaded the firmware onto a usb stick on another computer and plugged the stick into the usb slot on the laptop. I checked /dev before and after inserting the stick to see what the stick came up as, and then I created a mount point in /mnt of usb... so it's /mnt/usb. The command to mount was mount -t usbfs /dev/sdb1 /mnt/usb. From here, I copied the firmware over to /tmp, extracted the tarball, cd'd into the driver directory and used b43fwcutter to installe the firmware. This allowed me to access my wireless network using wpa_supplicant and dhcpcd.

At this point I configured pacman and it was off to the races installing whatever I wished to. My girlfriend likes gnome and xfce and gets confused when I get all geeky and install something minimal like awesome or openbox... So to keep the peace, I figured xfce isn't TOO bloated and took the plunge.

The very first thing I noticed was that the fonts were AWFUL. So I searched the arch wiki and found clear instructions on lcd fonts on the fonts page. Then I enabled anti-aliasing for fonts, hinting and sub-pixel hinting
and the screen looks nice and sharp.

The standard vesa driver is fine, but there is full support for the graphics chip in this laptop with the r128 driver, so I installed that, set the bit depth to 16 for better performance and I'm back to 500 fps in glxgears. =p

I compiled a custom tuxonice kernel with the help of the aur and ran into a few problems. Tuxonice apparently doesn't like the uuid scheme of things, so I had to edit my /etc/fstab to the old /dev/sda way of doing things and then run mkswap on /dev/sda1 (my swap drive) for arch to detect the swap drive. I also kind of rushed through the wiki and missed a few steps with mkinitcpio and I was surprised that hibernate wasn't working. The second time through I took my time and got it right and now hibernate works as expected. I may try to get hibernate working from a graphical environment, but I'm not sure I'm going to bother. Logging out to the command line and running hibernate is not a big deal to me.

I'll keep you posted on how things are going!