Archive for tutorials

Console fluff with FBsplash

So you have grown tired of the black and white of the console and need a bit of color to brighten your day. Before Bootsplash would have been your ticket to bliss but the recent rewrite that is now fbsplash is what you should be looking for. This tutorial is made for kernel 2.6.10 and spocks fbsplash patch, but with very little effort you should be able to use it for other kernel versions to

fbsplash is being developed by Spock for gentoo, he has done a fantastic job with this go to his page for more info and to pay tribute

Important note!

There are some problems with fbsplash and the 2.6.9 kernel where fbsplash automatically switches to verbose mode at boot, this is fixed in the 2.6.10 patch so please use that instead

Patch the kernel

You can patch the kernel with the fbsplash diff or perhaps with kolivas Ck4 patch, wich also contains alot of performance power for your desktop system.

Download patch for 2.6.10 here

go to your unpacked kernel source (should be in /usr/src/linux-2.6.10)

cd /usr/src/linux-2.6.10

and run the patch command:

patch -p1

Configure and compile your kernel

You need to configure the kernel for Framebuffer support, initial ramdisk and bootsplash. I suggest using vesa framebuffer since it is almost guaranteed to work with any graphics card.
make menuconfig
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.10
ln -s /lib/modules/2.6.10/build/System/map /boot/

create /dev/fbsplash

Fbsplash needs a device in your directory tree to function

The major and minor number needed can be found in /sys/class/misc/fbsplash/dev

cat /sys/class/misc/fbsplash/dev

For me this produces 10:63 (this can only be done after you reboot on your new kernel). Create the node with the command:

mknod /dev/fbsplash c 10 63

download and compile the gensplash utils

The utils are user space utilities for controlling your fbsplash. I had to install a jpeg and a png package to get these to configure.

apt-get install libpng3-dev libjpeg62-dev

Download the utils from here Untar your utils, compile and install them (note to get splashutils to install you must make a symlink named linux from your kernel dir to the splashutils folder where you are making the splashutils)

tar -xjf splashutils-0.9-pre10.tar.bz2
cd splashutils-0.9-pre10.tar.bz2
ln -s /usr/src/linux-2.6.10 linux
make install

This will give you several commands, I have a little initscript that I use for my bootsplash

Download my fbsplash script here

install a theme

You can download a debianized theme from here (remove .txt from name before unpack)

start with creating the splash directory and copy the theme into that.

mkdir /etc/splash
cp debian-1.tar.bz2 /etc/splash
cd /etc/splash
tar -xjf debian-1.tar.bz2

I also suggest you make a link for the current theme to be able to very quickly switch themes

ln -s /etc/splash/debian-1 /etc/splash/current

edit the rcS and rc scripts

For the progress bar to function you need to tell the /etc/init.d/rcS and /etc/init.d/rc to update the bar after each init script.

Here is my /etc/init.d/rcS

Here is my /etc/init.d/rc

There are probably many better ways to solve this but I ended up guessing approx how much to add per script and winged it, all I added in the scripts is clearly marked out in boxes of hashes.

generate the ramdisk image

With the commands given by splash utils you can generate a ramdisk image containing your fbsplash theme

splash_geninitramfs -v -g /boot/initrd.img-2.6.10 -r 1024x768 current

Tell grub to load the ramdisk and set up framebuffer

Edit your grub lines to look something like this

title Debian Gnu/Linux (2.6.10)
root (hd0,0)
kernel /boot/vmlinuz-2.6.10 ro root=/dev/hda1 video=vesafb:ywrap,pmipal,1024x768-32@85 splash=silent,theme:current
initrd /boot/initrd.img-2.6.10

Reboot in the ultimate console fluffiness

Now you should have a working fbsplash and will be able to boot in all the colors of your choice.

To change the splash on a console use the following

The following four commands will change your frame buffer theme on the fly, if you want to change a console you are not currently on, omit the setpic command

splash_util --vc=0 --cmd=off
splash_util --vc=0 --theme=current --cmd=setcfg
splash_util --vc=0 --theme=current --cmd=setpic
splash_util --vc=0 --cmd=on


to have the fbsplash be set on all your consoles at boottime you need to fix a init.d script if you have no imagination or scripting skills you can download mine here Copy that script into /etc/init.d and name it fbsplash then adda symlink to this file in your default runlevel making sure it's the last thing loaded and it should work fine

ln -s /etc/init.d/fbsplash /etc/rc2.d/S99xfbsplash

Getting the bluez

So I decided to get with the program and set up bluetooth on my laptop to sync my phone (Ericsson T610) and to just be cooler than the next dude.

It turned out that it was a whole lot to fix for bluez … but when it works, it was time well spent.

kernel tweaking

bluez1.png so to start with I am running the 2.4.25 kernel since my machine dies when I load airo.o driver for my wlan card with 2.6.x

bluez2.png I started looking at what kernel tweaks I nedded, The first mistake I made was to add the bluetooth support under the USB options, later I found the bluetooth subsystem. At first I only added the bluetooth subsystem and none of the extra drivers this turned out to be another mistake. Most important apart from the bluetooth subsystem is the rfcomm since almost all (I still havent found any who doesnt) Blue apps use an rfcomm link between your bluetooth devices

I only added the SCO driver so that I could use the laptop as a headset to my phone. still working on this.

User space apps

To be able to control my bluetooth device and to find other devices I need some userspace tools. the easiest way to get these is to (on a debian system)

apt-get install bluez-*

If you know exactly what you are getting start your bluez demons and plug in the bluetooth device, if not just reboot and let init start the bluetooth services. Check with /var/log/syslog that your device registers as you stick it in it should look something like the cut out below, if you get no driver assigned either you dont have the right stuff in your kernel or you have a new bluetooth device the kernel doesnt recognize.

Apr  8 19:51:47 sting kernel: hub.c: new USB device
00:07.2-1, assigned address 4
Apr  8 19:51:48 sting hcid[655]: HCI dev 0 registered
Apr  8 19:51:48 sting hcid[655]: HCI dev 0 up
Apr  8 19:51:48 sting hcid[655]: Starting security manager 0

once loaded you can test your device with hcitool

olterman@sting:~$ hcitool dev
hci0    00:0D:88:9E:F1:BA

This means your device is working fine. The hexcode there is the id of your device and it works much lice the mac adress on your nic. So how about finding your precious phone or pda now…

olterman@sting:~$ hcitool scan
Scanning ...
00:0A:D9:9E:EE:BE       Olterman T610

Voila so we can see both sides of the wireless connection.


Time to send something over. The first thing to do is to set up a serial connection between your computer and the handheld. One nifty little app for this is obexftp (the debian package has the same name). but first we must find out what channel to send on (channels in bluetooth work like ports, and you have different services listening on diffent ports/channels)

olterman@sting:~$ sdptool search FTRN
Inquiring ...
Searching for FTRN on 00:0A:D9:9E:EE:BE ...
Service Name: OBEX File Transfer
Service RecHandle: 0x1000f
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

Here we see that Obex File transfer listens on channel 7 on device 00:0A:D9:9E:EE:BE So to send a file I run the following command (notice the 7 and the hexcode)

obexftp -b 00:0A:D9:9E:EE:BE -B 7 -p mycutepic.jpg

Using sdptool browse you can get all the services and their channels. Now if I want to receive something on the phone the easiest way to do it if on a gnome system is to install openobex-apps and obexserver the run obex server if you send a pic from your phone it will be received by the server and put in your homedir.

Synching contacts & calender with Evolution

Synching with evolution is very simple if you have your device up and running just download multisync with the irmc, irmc-bluetooth and evolution plugins and set up a syncronisation between evolution and irmc in irmc choose your bluetooth device.

%d bloggers like this: